Skip to content

Commit fa83889

Browse files
committed
Make wiring up ports common code and fix invert case
1 parent 239996b commit fa83889

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

chipflow_lib/platforms/sim.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,8 @@ def instantiate_ports(self, m: Module):
7373
for component, iface in pinlock.port_map.items():
7474
for k, v in iface.items():
7575
for name, port in v.items():
76-
self._ports[port.port_name] = io.SimulationPort(port.direction, port.width, invert=port.invert, name=f"{component}-{name}")
76+
invert = port.invert if port.invert else False
77+
self._ports[port.port_name] = io.SimulationPort(port.direction, port.width, invert=invert, name=f"{component}-{name}")
7778

7879
for clock, name in self._config["chipflow"]["clocks"].items():
7980
if name not in pinlock.package.clocks:

0 commit comments

Comments
 (0)