diff options
author | Eddie Hung <eddie.hung+gitlab@gmail.com> | 2018-07-21 19:03:35 +0000 |
---|---|---|
committer | Eddie Hung <eddie.hung+gitlab@gmail.com> | 2018-07-21 19:03:35 +0000 |
commit | f176ee48cdd6b508f6f26e7b2ccca97a680929cf (patch) | |
tree | 93d8b7f0baad5b504aff26acdba441ea6ba6d8c6 /ice40/arch_place.cc | |
parent | 3eecccc6f7f8c36994e9227adfc8ab1067ea287f (diff) | |
parent | 1f6897733b57f03cf7f5ccab46c27de811d42167 (diff) | |
download | nextpnr-f176ee48cdd6b508f6f26e7b2ccca97a680929cf.tar.gz nextpnr-f176ee48cdd6b508f6f26e7b2ccca97a680929cf.tar.bz2 nextpnr-f176ee48cdd6b508f6f26e7b2ccca97a680929cf.zip |
Merge branch 'redist_slack' into 'redist_slack'
Redist slack
See merge request eddiehung/nextpnr!5
Diffstat (limited to 'ice40/arch_place.cc')
-rw-r--r-- | ice40/arch_place.cc | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/ice40/arch_place.cc b/ice40/arch_place.cc index 1f2943a0..116ab7d3 100644 --- a/ice40/arch_place.cc +++ b/ice40/arch_place.cc @@ -108,21 +108,15 @@ bool Arch::isValidBelForCell(CellInfo *cell, BelId bel) const } else if (cell->type == id_sb_io) { return getBelPackagePin(bel) != ""; } else if (cell->type == id_sb_gb) { - bool is_reset = false, is_cen = false; NPNR_ASSERT(cell->ports.at(id_glb_buf_out).net != nullptr); - for (auto user : cell->ports.at(id_glb_buf_out).net->users) { - if (is_reset_port(this, user)) - is_reset = true; - if (is_enable_port(this, user)) - is_cen = true; - } + const NetInfo *net = cell->ports.at(id_glb_buf_out).net; IdString glb_net = getWireName(getWireBelPin(bel, PIN_GLOBAL_BUFFER_OUTPUT)); int glb_id = std::stoi(std::string("") + glb_net.str(this).back()); - if (is_reset && is_cen) + if (net->is_reset && net->is_enable) return false; - else if (is_reset) + else if (net->is_reset) return (glb_id % 2) == 0; - else if (is_cen) + else if (net->is_enable) return (glb_id % 2) == 1; else return true; |