Merge pull request #1506 from icgrp/syed/node_model_patch

Fixes get_node_for_wire by initializing self.node
This commit is contained in:
litghost 2020-11-30 12:25:03 -08:00 committed by GitHub
commit 489e438627
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -143,6 +143,11 @@ class NodeModel():
return self.nodes[tile, wire]
def _build_wire_to_node_map(self):
self.wire_to_node_map = {}
if self.nodes is None:
self._build_nodes()
for node, wires in self.nodes.items():
for tile_wire in wires:
assert tile_wire not in self.wire_to_node_map