Closed mdko closed 3 years ago
Question: should we also make a wrapper function, replace_wire(orig_wire, new_wire, block=None)
, that just callsreplace_wires({orig_wire: new_wire}, block=block)
? If not, we should instead rename replace_wire_fast
to replace_wire
.
replace_wire
is incorrect, I believe. In line 101, it usesnew_src
when it should be usingnew_dst
. In addition, iterating overblock.logic
in lines 85 and 96 causes alterations toblock.logic
in lines 92 and 103, respectively, to cause a "Set changed size during iteration" error.In addition, this was only used in
wire_transform
, which has a single unit test. I think we can instead just use and exportreplace_wire_fast
andreplace_wires
, and usereplace_wire_fast
wherereplace_wire
was used inwire_transform
.