aboutsummaryrefslogtreecommitdiffstats
path: root/passes/techmap/extract.cc
diff options
context:
space:
mode:
Diffstat (limited to 'passes/techmap/extract.cc')
-rw-r--r--passes/techmap/extract.cc5
1 files changed, 1 insertions, 4 deletions
diff --git a/passes/techmap/extract.cc b/passes/techmap/extract.cc
index b8c349f5c..92bcafc00 100644
--- a/passes/techmap/extract.cc
+++ b/passes/techmap/extract.cc
@@ -729,13 +729,10 @@ struct ExtractPass : public Pass {
int portCounter = 1;
for (auto wire : wires) {
- RTLIL::Wire *newWire = new RTLIL::Wire;
- newWire->name = wire->name;
- newWire->width = wire->width;
+ RTLIL::Wire *newWire = newMod->addWire(wire->name, wire->width);
newWire->port_id = portCounter++;
newWire->port_input = true;
newWire->port_output = true;
- newMod->add(newWire);
}
for (auto cell : cells) {