diff --git a/bfasst/utils/sdn_helpers.py b/bfasst/utils/sdn_helpers.py index 5e8fd2e5c..66576892b 100644 --- a/bfasst/utils/sdn_helpers.py +++ b/bfasst/utils/sdn_helpers.py @@ -96,17 +96,20 @@ def build_nets(self): for net in self.nets: net.determine_is_connected() - def get_const0_wire(self): - const0 = [wire for wire in self.top.get_wires() if wire.cable.name == r"\"] - if not const0: + def get_const_wire(self, is_gnd): + """Get the const0 or const1 wire""" + name = r"\" if not is_gnd else r"\" + + const = [wire for wire in self.top.get_wires() if wire.cable.name == name] + if not const: # Create const0 wire - const0_cable = self.top.reference.create_cable( - name=r"\", is_downto=True, is_scalar=True, lower_index=0, wires=1 + const_cable = self.top.reference.create_cable( + name=name, is_downto=True, is_scalar=True, lower_index=0, wires=1 ) - const0 = const0_cable.wires[0] + const = const_cable.wires[0] else: - const0 = const0[0] - return const0 + const = const[0] + return const @property def nets(self): @@ -167,8 +170,8 @@ def __init__(self, wire): self.wire = wire self.alias_wires = [] self.driver_pin = None - self.is_vdd = None - self.is_gnd = None + self.is_vdd = False + self.is_gnd = False self.is_connected = None def add_alias_wire(self, wire): @@ -346,7 +349,4 @@ def properties(self): return self.instance.data.get("VERILOG.Parameters") def get_pin(self, name, index=0): - try: - return self.pins_by_name_and_index[(name, index)] - except KeyError: - return SdnInstanceWrapper.GND_PIN + return self.pins_by_name_and_index[(name, index)] diff --git a/requirements.txt b/requirements.txt index e1c72354e..8f5917cd3 100644 --- a/requirements.txt +++ b/requirements.txt @@ -14,3 +14,4 @@ requests scp spydrnet @ git+https://github.com/byuccl/spydrnet@next_release werkzeug +boolean.py diff --git a/third_party/gmt_tools b/third_party/gmt_tools index bc5515895..a41ad35e7 160000 --- a/third_party/gmt_tools +++ b/third_party/gmt_tools @@ -1 +1 @@ -Subproject commit bc55158957662ea5b1f9bde933ff912e9160c276 +Subproject commit a41ad35e7bd77cb24434215b76e9ec3c04c1ac8b