Skip to content

Commit

Permalink
Merge pull request #329 from byuccl/phys_to_logical_lut_splitting
Browse files Browse the repository at this point in the history
Pysical to logical LUT splitting
  • Loading branch information
jgoeders authored Nov 16, 2023
2 parents dad4a19 + e6b00fa commit c29da3f
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 15 deletions.
28 changes: 14 additions & 14 deletions bfasst/utils/sdn_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"\<const0>"]
if not const0:
def get_const_wire(self, is_gnd):
"""Get the const0 or const1 wire"""
name = r"\<const1>" if not is_gnd else r"\<const0>"

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"\<const0>", 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):
Expand Down Expand Up @@ -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):
Expand Down Expand Up @@ -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)]
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ requests
scp
spydrnet @ git+https://github.com/byuccl/spydrnet@next_release
werkzeug
boolean.py
2 changes: 1 addition & 1 deletion third_party/gmt_tools

0 comments on commit c29da3f

Please sign in to comment.