diff options
author | gatecat <gatecat@ds0.me> | 2022-02-16 18:13:22 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-16 18:13:22 +0000 |
commit | 61d1db16be2c68cf6ae8b4d2ff3266b5c7086ad2 (patch) | |
tree | 379b38c06745919df0e87c1be1410e16793b0925 /ecp5/globals.cc | |
parent | 25c47e5b7e12d232cac9408b7d6d339ee11793b7 (diff) | |
parent | 76683a1e3c123d28deff750c38467c6377936879 (diff) | |
download | nextpnr-61d1db16be2c68cf6ae8b4d2ff3266b5c7086ad2.tar.gz nextpnr-61d1db16be2c68cf6ae8b4d2ff3266b5c7086ad2.tar.bz2 nextpnr-61d1db16be2c68cf6ae8b4d2ff3266b5c7086ad2.zip |
Merge pull request #918 from YosysHQ/gatecat/netlist-ii
Refactor pt2, barnacle cleanup
Diffstat (limited to 'ecp5/globals.cc')
-rw-r--r-- | ecp5/globals.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/ecp5/globals.cc b/ecp5/globals.cc index cc2208e0..844c596b 100644 --- a/ecp5/globals.cc +++ b/ecp5/globals.cc @@ -299,8 +299,8 @@ class Ecp5GlobalRouter dedicated_routing = false; if (drv.cell == nullptr) { return 0; - } else if (drv.cell->attrs.count(ctx->id("BEL"))) { - drv_bel = ctx->getBelByNameStr(drv.cell->attrs.at(ctx->id("BEL")).as_string()); + } else if (drv.cell->attrs.count(id_BEL)) { + drv_bel = ctx->getBelByNameStr(drv.cell->attrs.at(id_BEL).as_string()); } else { // Check if driver is a singleton BelId last_bel; @@ -399,7 +399,7 @@ class Ecp5GlobalRouter { BelId best_bel; WireId best_bel_pclkcib; - bool using_ce = get_net_or_empty(dcc, ctx->id("CE")) != nullptr; + bool using_ce = get_net_or_empty(dcc, id_CE) != nullptr; wirelen_t best_wirelen = 9999999; bool dedicated_routing = false; for (auto bel : ctx->getBels()) { @@ -492,8 +492,8 @@ class Ecp5GlobalRouter dccptr = dcc.get(); ctx->cells[dcc->name] = std::move(dcc); } - glbptr->attrs[ctx->id("ECP5_IS_GLOBAL")] = 1; - if (str_or_default(dccptr->attrs, ctx->id("BEL"), "") == "") + glbptr->attrs[id_ECP5_IS_GLOBAL] = 1; + if (str_or_default(dccptr->attrs, id_BEL, "") == "") place_dcc_dcs(dccptr); return glbptr; } @@ -514,8 +514,8 @@ class Ecp5GlobalRouter log_info("Promoting globals...\n"); auto clocks = get_clocks(); for (auto clock : clocks) { - bool is_noglobal = bool_or_default(clock->attrs, ctx->id("noglobal"), false) || - bool_or_default(clock->attrs, ctx->id("ECP5_IS_GLOBAL"), false); + bool is_noglobal = bool_or_default(clock->attrs, id_noglobal, false) || + bool_or_default(clock->attrs, id_ECP5_IS_GLOBAL, false); if (is_noglobal) continue; log_info(" promoting clock net %s to global network\n", clock->name.c_str(ctx)); |