private void AddISEInstantiation(Tile t) { LibElemInst instance = new LibElemInst(); instance.AnchorLocation = t.Location; instance.InstanceName = GetNextInstanceName(); instance.LibraryElementName = LibraryElementName; instance.SliceNumber = SliceNumber; instance.SliceName = t.Slices[(int)SliceNumber].SliceName; LibraryElementInstanceManager.Instance.Add(instance); // mark source as blocked ExcludeInstantiationSourcesFromBlocking markSrc = new ExcludeInstantiationSourcesFromBlocking(); markSrc.AnchorLocation = t.Location; markSrc.LibraryElementName = LibraryElementName; CommandExecuter.Instance.Execute(markSrc); SaveLibraryElementInstantiation saveCmd = new SaveLibraryElementInstantiation(); saveCmd.AddDesignConfig = false; saveCmd.InsertPrefix = true; saveCmd.InstanceName = instance.InstanceName; saveCmd.NetlistContainerName = NetlistContainerName; CommandExecuter.Instance.Execute(saveCmd); }
protected override void DoCommandAction() { LibraryElement libElement = Objects.Library.Instance.GetElement(LibraryElementName); Tile anchor = FPGA.FPGA.Instance.GetTile(AnchorLocation); if (libElement.ResourceShape.Anchor.AnchorSliceNumber >= anchor.Slices.Count) { throw new ArgumentException("Too few slices on tile " + anchor.Location + ". Expecting " + libElement.ResourceShape.Anchor.AnchorSliceNumber + " but found " + anchor.Slices.Count + " slice."); } if (IdentifierManager.Instance.IsMatch(anchor.Location, IdentifierManager.RegexTypes.Interconnect)) { anchor = FPGATypes.GetCLTile(anchor).FirstOrDefault(); } if (AutoClearModuleSlot) { //this.FastAutoClearModuleSlotBeforeInstantiation(libElement, Enumerable.Repeat(anchor, 1)); AutoClearModuleSlotBeforeInstantiation(libElement, Enumerable.Repeat(anchor, 1)); } LibElemInst instantiation = new LibElemInst(); instantiation.AnchorLocation = AnchorLocation; instantiation.InstanceName = Hierarchy + InstanceName; instantiation.LibraryElementName = LibraryElementName; instantiation.SliceNumber = libElement.ResourceShape.Anchor.AnchorSliceNumber; instantiation.SliceName = anchor.Slices[(int)libElement.ResourceShape.Anchor.AnchorSliceNumber].SliceName; LibraryElementInstanceManager.Instance.Add(instantiation); // mark source as blocked ExcludeInstantiationSourcesFromBlocking markSrc = new ExcludeInstantiationSourcesFromBlocking(); markSrc.AnchorLocation = AnchorLocation; markSrc.LibraryElementName = LibraryElementName; CommandExecuter.Instance.Execute(markSrc); SaveLibraryElementInstantiation saveCmd = new SaveLibraryElementInstantiation(); saveCmd.AddDesignConfig = false; saveCmd.InsertPrefix = true; saveCmd.InstanceName = InstanceName; saveCmd.NetlistContainerName = NetlistContainerName; CommandExecuter.Instance.Execute(saveCmd); if (AutoFuse) { FuseNets fuseCmd = new FuseNets(); fuseCmd.NetlistContainerName = NetlistContainerName; fuseCmd.Mute = Mute; fuseCmd.Profile = Profile; fuseCmd.PrintProgress = PrintProgress; CommandExecuter.Instance.Execute(fuseCmd); } }
protected override void DoCommandAction() { NetlistContainer netlistContainer = GetNetlistContainer(); Slice anchor = FPGA.FPGA.Instance.GetSlice(SliceName); LibraryElement libElement = Objects.Library.Instance.GetElement(LibraryElementName); if (anchor == null) { throw new ArgumentException("Can not find Slice " + SliceName); } if (AutoClearModuleSlot) { AutoClearModuleSlotBeforeInstantiation(libElement, Enumerable.Repeat(anchor.ContainingTile, 1)); } LibElemInst instantiation = new LibElemInst(); instantiation.AnchorLocation = anchor.ContainingTile.Location; instantiation.InstanceName = Hierarchy + InstanceName; instantiation.LibraryElementName = LibraryElementName; instantiation.SliceNumber = anchor.ContainingTile.GetSliceNumberByName(SliceName); instantiation.SliceName = SliceName; LibraryElementInstanceManager.Instance.Add(instantiation); // mark source as blocked ExcludeInstantiationSourcesFromBlocking markSrc = new ExcludeInstantiationSourcesFromBlocking(); markSrc.AnchorLocation = anchor.ContainingTile.Location; markSrc.LibraryElementName = LibraryElementName; CommandExecuter.Instance.Execute(markSrc); SaveLibraryElementInstantiation saveCmd = new SaveLibraryElementInstantiation(); saveCmd.AddDesignConfig = false; saveCmd.InsertPrefix = true; saveCmd.InstanceName = InstanceName; saveCmd.NetlistContainerName = NetlistContainerName; CommandExecuter.Instance.Execute(saveCmd); if (AutoFuse) { FuseNets fuseCmd = new FuseNets(); fuseCmd.NetlistContainerName = NetlistContainerName; fuseCmd.Mute = Mute; fuseCmd.Profile = Profile; fuseCmd.PrintProgress = PrintProgress; CommandExecuter.Instance.Execute(fuseCmd); } }
private void AddVivadoInstantiation(Tile t) { LibraryElement libElement = Objects.Library.Instance.GetElement(LibraryElementName); if (libElement.VivadoConnectionPrimitive) { // bei Vivado 4 LUT6-Instanzen erstellen, eine mit Inputs und Output, drei davon dann nur mit Output // only VivaodConnection primitves contains SubElements bool checkResources = true; foreach (LibraryElement other in libElement.SubElements) { LibElemInst instance = new LibElemInst(); instance.AnchorLocation = t.Location; instance.InstanceName = GetNextInstanceName(); instance.LibraryElementName = other.Name; instance.SliceNumber = SliceNumber; instance.SliceName = t.Slices[(int)SliceNumber].SliceName; LibraryElementInstanceManager.Instance.Add(instance); ExcludeInstantiationSourcesFromBlocking markSrc = new ExcludeInstantiationSourcesFromBlocking(); markSrc.AnchorLocation = t.Location; markSrc.LibraryElementName = other.Name; markSrc.CheckResources = checkResources; // mark source as blocked, only check onces checkResources = false; CommandExecuter.Instance.Execute(markSrc); SaveLibraryElementInstantiation saveCmd = new SaveLibraryElementInstantiation(); saveCmd.AddDesignConfig = false; saveCmd.InsertPrefix = true; saveCmd.InstanceName = instance.InstanceName; saveCmd.NetlistContainerName = NetlistContainerName; CommandExecuter.Instance.Execute(saveCmd); } } else { // for normal moduleas use ISE code AddISEInstantiation(t); } }