private List <Command> GetCommandsForModule() { List <Command> cmds = new List <Command>(); // shared by static and partial cmds.AddRange(GetSelectAreaCommands()); List <Command> tunnelCommnds = new List <Command>(); // i/o foreach (FPGATypes.InterfaceDirection direction in Enum.GetValues(typeof(FPGATypes.InterfaceDirection))) { // how many columns of connection macros will we instantiate? IEnumerable <Signal> signals = Objects.InterfaceManager.Instance.Signals.Where(s => s.SignalDirection.Equals(direction) && s.PartialRegion.Equals(IslandName) && (s.SignalMode.Equals("in") || s.SignalMode.Equals("out"))); int ioColumns = 1; if (signals.Any()) { ioColumns = 1 + signals.Max(s => s.Column); List <Command> placementCommands = GetPlacementCommands(direction, ConnectionPrimitiveName, IslandName + "_" + direction + "_", ioColumns, 4); cmds.AddRange(GetTunnelCommands(direction, placementCommands)); cmds.AddRange(placementCommands); } } PrintVHDLWrapper printCmd = new PrintVHDLWrapper(); printCmd.InstantiationFilter = "^" + IslandName; printCmd.EntityName = "static_placeholder_" + IslandName; printCmd.FileName = VHDLWrapper; printCmd.Append = false; printCmd.CreateBackupFile = true; cmds.Add(printCmd); InvertSelection invCmd = new InvertSelection(); invCmd.Comment = "for building the module we need UCF constraints the currenlty selected partial area"; cmds.Add(invCmd); // insert a * to match all if the generate labels cmds.AddRange(GetProhibitAndLocationConstraints("*inst_static_placeholder_" + IslandName + "/")); SelectFenceAroundUserSelection selFenceCmd = new SelectFenceAroundUserSelection(); selFenceCmd.UserSelectionType = IslandName; selFenceCmd.Size = 12; selFenceCmd.Comment = "we could block the current selection, however blocking only a fence around the partial area is faster, thus select a fence around the partial area"; cmds.Add(selFenceCmd); // add the tunnel commands cmds.AddRange(tunnelCommnds); cmds.AddRange(GetBlockCommands()); return(cmds); }
private void m_btnPrintWrapper_Click(object sender, EventArgs e) { PrintVHDLWrapper printCmd = new PrintVHDLWrapper(); printCmd.Append = m_fileSelVHDLWrapper.Append; printCmd.CreateBackupFile = true; printCmd.EntityName = m_txtEntityName.Text; printCmd.FileName = m_fileSelVHDLWrapper.FileName; printCmd.InstantiationFilter = m_libElInstSelector.InstanceFilter; Commands.CommandExecuter.Instance.Execute(printCmd); }
private List <Command> GetCommandsForStaticSystem() { List <Command> cmds = new List <Command>(); cmds.AddRange(GetSelectAreaCommands()); // i/o foreach (FPGATypes.InterfaceDirection direction in Enum.GetValues(typeof(FPGATypes.InterfaceDirection))) { // how many columns of connection macros will we instantiate? IEnumerable <Signal> signals = Objects.InterfaceManager.Instance.Signals.Where(s => s.SignalDirection.Equals(direction) && s.PartialRegion.Equals(IslandName) && (s.SignalMode.Equals("in") || s.SignalMode.Equals("out"))); int ioColumns = 1; if (signals.Any()) { ioColumns = 1 + signals.Max(s => s.Column); List <Command> placementCommands = GetPlacementCommands(direction, ConnectionPrimitiveName, IslandName + "_" + direction + "_", ioColumns, 4); cmds.AddRange(GetTunnelCommands(direction, placementCommands)); cmds.AddRange(placementCommands); } } PrintVHDLWrapper printCmd = new PrintVHDLWrapper(); printCmd.InstantiationFilter = "^" + IslandName; printCmd.EntityName = IslandName; printCmd.FileName = VHDLWrapper; printCmd.Append = false; printCmd.CreateBackupFile = true; cmds.Add(printCmd); string instantiationTemplate = Path.GetDirectoryName(VHDLWrapper) + Path.DirectorySeparatorChar + Path.GetFileNameWithoutExtension(VHDLWrapper) + "_instantation" + Path.GetExtension(VHDLWrapper); PrintVHDLWrapperInstantiation printInstCmd = new PrintVHDLWrapperInstantiation(); printInstCmd.InstantiationFilter = "^" + IslandName; printInstCmd.EntityName = IslandName; printInstCmd.FileName = instantiationTemplate; printInstCmd.Append = false; printInstCmd.CreateBackupFile = true; cmds.Add(printInstCmd); cmds.AddRange(GetProhibitAndLocationConstraints("inst_" + IslandName + "/")); cmds.AddRange(GetBlockCommands()); return(cmds); }