Skip to content

Commit

Permalink
fixed problems caused merging
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobdbrown4 committed Oct 23, 2023
1 parent 21c586b commit f765418
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
8 changes: 4 additions & 4 deletions spydrnet/parsers/verilog/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -1397,13 +1397,13 @@ def create_assignment_instance(self, width):
instance.reference = definition
return instance

def connect_wires_for_assign(self, out_wires, in_wires
# self, l_cable, l_left, l_right, r_cable, r_left, r_right
def connect_wires_for_assign(
self, l_cable, l_left, l_right, r_cable, r_left, r_right
):
"""connect the wires in r_left to the wires in l_left"""

# out_wires = self.get_wires_from_cable(l_cable, l_left, l_right)
# in_wires = self.get_wires_from_cable(r_cable, r_left, r_right)
out_wires = self.get_wires_from_cable(l_cable, l_left, l_right)
in_wires = self.get_wires_from_cable(r_cable, r_left, r_right)

# min because we don't need extra pins since only what can will assign.
width = min(len(out_wires), len(in_wires))
Expand Down
4 changes: 1 addition & 3 deletions tests/spydrnet/parsers/verilog/tests/test_verilogParser.py
Original file line number Diff line number Diff line change
Expand Up @@ -1607,9 +1607,7 @@ def test_connect_assigned_wires(self):
i_cable = parser.current_definition.create_cable(name="c2")
o_cable.create_wires(4)
i_cable.create_wires(4)
l_wires = parser.get_wires_from_cable(o_cable, 1, 0)
r_wires = parser.get_wires_from_cable(i_cable, 3, 2)
parser.connect_wires_for_assign(l_wires, r_wires)
parser.connect_wires_for_assign(o_cable, 1, 0, i_cable, 3, 2)

instance = next(parser.current_definition.get_instances("SDN_VERILOG_ASSIGNMENT*"))
for pin in instance.pins:
Expand Down

0 comments on commit f765418

Please sign in to comment.