// チップのconst_assignを処理 void ProcesConstAssign( NetComponents libParts, DeclaredObjectContainer design, Dictionary <StdLogic, Net> representingNet) { foreach (var constAssign in chip.constAssignMappings) { Net assignedNet; if (constAssign.Value.baseName.ToLower() == "open") { var tempSignal = new StdLogic(design.signalNameGenerator.getSignalName()); assignedNet = representingNet[tempSignal] = new Net(".temp"); } else { var assignedSignalName = constAssign.Value; if (!design.signalTable.ContainsKey(assignedSignalName.baseName)) { throw new CompilerException( string.Format(@"Signal ""{0}"", which is specified in component ""{1}"" is not defined in the design file", assignedSignalName.baseName, chip.chipName)); } var assignedSignal = design.signalTable[assignedSignalName]; if (!(assignedSignal is StdLogic)) { throw new CompilerException( string.Format(@"Signal ""{0}"", which is specified in component ""{1}"" is not std_logic", assignedSignalName.baseName, chip.chipName)); } assignedNet = representingNet[(StdLogic)assignedSignal]; } if (!constAssign.Key.attribute.ContainsKey("pin_assign")) { throw new CompilerException( string.Format(@"Port signal ""{0}"" of chip ""{1}"" does not have attribute ""pin_assignment""", constAssign.Key.name, chip.chipName)); } int portPin = (int)constAssign.Key.attribute["pin_assign"]; assignedNet.adjacentNodes.Add(new Node(libParts, portPin)); } }
public Node(NetComponents libParts, int pin) { this.netComponent = libParts; this.pin = pin; }