89
private void createInstance(Cell parent, VerilogData verilogData,
90
VerilogData.VerilogModule module, Cell icon, CellInstance info)
92
NodeInst cellInst = NodeInst.newInstance(icon, getNextLocation(parent), 10, 10, parent,
93
Orientation.IDENT, info.name, 0);
95
List<String> localPorts = new ArrayList<String>();
97
for (CellInstance.PortInfo port : info.list)
101
String portLocal = port.local;
103
// It is unknown how many pins are coming in the stream
104
if (portLocal.contains("{"))
106
StringTokenizer parse = new StringTokenizer(portLocal, "{,}", false); // extracting pins
107
while (parse.hasMoreTokens())
109
String name = parse.nextToken();
110
name = name.replaceAll(" ", "");
111
localPorts.add(name);
115
localPorts.add(portLocal);
117
for (String s : localPorts)
119
NodeInst pin = pinsMap.get(s);
123
int index = s.indexOf("[");
126
s = s.substring(0, index);
127
pin = pinsMap.get(s);
133
if (s.equals("vss")) // ground
135
pin = readSupply(module, false, s);
140
System.out.println("Unknown signal " + s + " in cell " + parent.describe(false));
141
PrimitiveNode primitive = (port.isBus) ? Schematics.tech().busPinNode : Schematics.tech().wirePinNode;
142
pin = NodeInst.newInstance(primitive, getNextLocation(parent),
143
primitiveWidth, primitiveHeight,
144
// primitive.getDefWidth(), primitive.getDefHeight(),
145
parent, Orientation.IDENT, null/*s*/, 0);
150
// ArcProto node = (port.isBus) ? Schematics.tech.bus_arc : Schematics.tech.wire_arc;
151
ArcProto node = (pin.getProto() == Schematics.tech().busPinNode) ? Schematics.tech().bus_arc : Schematics.tech().wire_arc;
152
PortInst ex = cellInst.findPortInst(port.ex.getName());
153
ArcInst ai = ArcInst.makeInstanceBase(node, 0.0,
154
// ArcInst ai = ArcInst.makeInstanceFull(node, 0.0 /*node.getDefaultLambdaFullWidth()*/,
155
pin.getOnlyPortInst(), ex, null, null, s);
157
ai.setFixedAngle(false);
89
// private void createInstance(Cell parent, VerilogData verilogData,
90
// VerilogData.VerilogModule module, Cell icon, CellInstance info)
92
// NodeInst cellInst = NodeInst.newInstance(icon, getNextLocation(parent), 10, 10, parent,
93
// Orientation.IDENT, info.name, 0);
95
// List<String> localPorts = new ArrayList<String>();
97
// for (CellInstance.PortInfo port : info.list)
99
// localPorts.clear();
101
// String portLocal = port.local;
103
// // It is unknown how many pins are coming in the stream
104
// if (portLocal.contains("{"))
106
// StringTokenizer parse = new StringTokenizer(portLocal, "{,}", false); // extracting pins
107
// while (parse.hasMoreTokens())
109
// String name = parse.nextToken();
110
// name = name.replaceAll(" ", "");
111
// localPorts.add(name);
115
// localPorts.add(portLocal);
117
// for (String s : localPorts)
119
// NodeInst pin = pinsMap.get(s);
123
// int index = s.indexOf("[");
126
// s = s.substring(0, index);
127
// pin = pinsMap.get(s);
133
// if (s.equals("vss")) // ground
135
// pin = readSupply(module, false, s);
139
// if (Job.getDebug())
140
// System.out.println("Unknown signal " + s + " in cell " + parent.describe(false));
141
// PrimitiveNode primitive = (port.isBus) ? Schematics.tech().busPinNode : Schematics.tech().wirePinNode;
142
// pin = NodeInst.newInstance(primitive, getNextLocation(parent),
143
// primitiveWidth, primitiveHeight,
144
//// primitive.getDefWidth(), primitive.getDefHeight(),
145
// parent, Orientation.IDENT, null/*s*/, 0);
146
// pinsMap.put(s, pin);
150
//// ArcProto node = (port.isBus) ? Schematics.tech.bus_arc : Schematics.tech.wire_arc;
151
// ArcProto node = (pin.getProto() == Schematics.tech().busPinNode) ? Schematics.tech().bus_arc : Schematics.tech().wire_arc;
152
// PortInst ex = cellInst.findPortInst(port.ex.getName());
153
// ArcInst ai = ArcInst.makeInstanceBase(node, 0.0,
154
//// ArcInst ai = ArcInst.makeInstanceFull(node, 0.0 /*node.getDefaultLambdaFullWidth()*/,
155
// pin.getOnlyPortInst(), ex, null, null, s);
156
// assert(ai != null);
157
// ai.setFixedAngle(false);
162
162
private NodeInst readSupply(VerilogData.VerilogModule module, boolean power, String name)