fixups for empty standard cells
This commit is contained in:
1 parent
f0b55eed27
commit
25ff1fb2dc
2 files changed
+9
-8
No files matched your search
@@ -448,7 +448,7 @@ class Circuit:
|
|||||||
node_map[n] = Node(self, f'{node.name}~{n.name}', n.kind)
|
node_map[n] = Node(self, f'{node.name}~{n.name}', n.kind)
|
||||||
elif len(n.outs) > 0 and len(n.ins) > 0: # output is also read by impl. circuit, need to add a fork.
|
elif len(n.outs) > 0 and len(n.ins) > 0: # output is also read by impl. circuit, need to add a fork.
|
||||||
node_map[n] = Node(self, f'{node.name}~{n.name}')
|
node_map[n] = Node(self, f'{node.name}~{n.name}')
|
||||||
elif len(n.ins) == 0 and len(n.outs) > 1: # input is read by multiple nodes, need to add fork.
|
elif len(n.ins) == 0 and len(n.outs) != 1: # input is read by multiple nodes (or no nodes), need to add fork.
|
||||||
node_map[n] = Node(self, f'{node.name}~{n.name}')
|
node_map[n] = Node(self, f'{node.name}~{n.name}')
|
||||||
for l in impl.lines: # add all internal lines to main circuit
|
for l in impl.lines: # add all internal lines to main circuit
|
||||||
if l.reader in node_map and l.driver in node_map:
|
if l.reader in node_map and l.driver in node_map:
|
||||||
|
|||||||
@@ -52,13 +52,14 @@ class VerilogTransformer(Transformer):
|
|||||||
@staticmethod
|
@staticmethod
|
||||||
def instantiation(args):
|
def instantiation(args):
|
||||||
pinmap = {}
|
pinmap = {}
|
||||||
for idx, pin in enumerate(args[2:]):
|
if args[2] is not None:
|
||||||
p = pin.children[0]
|
for idx, pin in enumerate(args[2:]):
|
||||||
if isinstance(p, tuple): # named pin
|
p = pin.children[0]
|
||||||
if p[1] is not None:
|
if isinstance(p, tuple): # named pin
|
||||||
pinmap[p[0]] = p[1]
|
if p[1] is not None:
|
||||||
else: # unnamed pin
|
pinmap[p[0]] = p[1]
|
||||||
pinmap[idx] = p
|
else: # unnamed pin
|
||||||
|
pinmap[idx] = p
|
||||||
return Instantiation(args[0], args[1], pinmap)
|
return Instantiation(args[0], args[1], pinmap)
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
|
|||||||
Reference in new issue
Block a user