diff options
author | gatecat <gatecat@ds0.me> | 2022-03-01 16:38:48 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-01 16:38:48 +0000 |
commit | 0a70b9c992c06a7553725b3742052eb95abd5f20 (patch) | |
tree | d1d8436576bad3424031c5ce435d76717fef196e /generic/viaduct_helpers.cc | |
parent | d8bea3ccfc7b6e925a9fd63c9172748ea0420e88 (diff) | |
parent | 86699b42f619960bfefd4d0b479dd44a90527ea4 (diff) | |
download | nextpnr-0a70b9c992c06a7553725b3742052eb95abd5f20.tar.gz nextpnr-0a70b9c992c06a7553725b3742052eb95abd5f20.tar.bz2 nextpnr-0a70b9c992c06a7553725b3742052eb95abd5f20.zip |
Merge pull request #925 from YosysHQ/gatecat/netlist-iv
Switch to potentially-sparse net users array
Diffstat (limited to 'generic/viaduct_helpers.cc')
-rw-r--r-- | generic/viaduct_helpers.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/generic/viaduct_helpers.cc b/generic/viaduct_helpers.cc index 10c3b802..a92d0de1 100644 --- a/generic/viaduct_helpers.cc +++ b/generic/viaduct_helpers.cc @@ -96,7 +96,7 @@ int ViaductHelpers::constrain_cell_pairs(const pool<CellTypePort> &src_ports, co continue; if (!src_ports.count(CellTypePort(ci.type, port.first))) continue; - if (!allow_fanout && port.second.net->users.size() > 1) + if (!allow_fanout && port.second.net->users.entries() > 1) continue; for (auto &usr : port.second.net->users) { if (!sink_ports.count(CellTypePort(usr))) @@ -151,7 +151,7 @@ void ViaductHelpers::replace_constants(CellTypePort vcc_driver, CellTypePort gnd NetInfo *replace = (ni.driver.cell->type == ctx->id("VCC")) ? vcc_net : gnd_net; for (auto &usr : ni.users) { usr.cell->ports.at(usr.port).net = replace; - replace->users.push_back(usr); + usr.cell->ports.at(usr.port).user_idx = replace->users.add(usr); } trim_cells.push_back(ni.driver.cell->name); trim_nets.push_back(ni.name); |