diff options
author | David Shah <dave@ds0.me> | 2019-06-07 11:55:20 +0100 |
---|---|---|
committer | David Shah <dave@ds0.me> | 2019-06-07 11:55:20 +0100 |
commit | 15a1d4f582e9d1706665fd862ade9ef3671ec8d6 (patch) | |
tree | 8990169c09b0e1087aa00924a132ddb68c858430 /ecp5/pack.cc | |
parent | 1093d7e1228272ca73114bbc4415c48d6cba76ed (diff) | |
download | nextpnr-15a1d4f582e9d1706665fd862ade9ef3671ec8d6.tar.gz nextpnr-15a1d4f582e9d1706665fd862ade9ef3671ec8d6.tar.bz2 nextpnr-15a1d4f582e9d1706665fd862ade9ef3671ec8d6.zip |
ecp5: Use an attribute to store is_global
Signed-off-by: David Shah <dave@ds0.me>
Diffstat (limited to 'ecp5/pack.cc')
-rw-r--r-- | ecp5/pack.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/ecp5/pack.cc b/ecp5/pack.cc index 5b924759..20130aad 100644 --- a/ecp5/pack.cc +++ b/ecp5/pack.cc @@ -1508,7 +1508,8 @@ class Ecp5Packer std::unique_ptr<NetInfo> promoted_ecknet(new NetInfo); promoted_ecknet->name = eckname; - promoted_ecknet->is_global = true; // Prevents router etc touching this special net + promoted_ecknet->attrs[ctx->id("ECP5_IS_GLOBAL")] = + "1"; // Prevents router etc touching this special net eclk.buf = promoted_ecknet.get(); NPNR_ASSERT(!ctx->nets.count(eckname)); ctx->nets[eckname] = std::move(promoted_ecknet); @@ -1654,7 +1655,7 @@ class Ecp5Packer port.c_str(ctx), ci->name.c_str(ctx), usr.port.c_str(ctx), usr.cell->name.c_str(ctx)); } - pn->is_global = true; + pn->attrs[ctx->id("ECP5_IS_GLOBAL")] = "1"; } for (auto zport : @@ -2470,6 +2471,9 @@ void Arch::assignArchInfo() ci->sliceInfo.has_l6mux = true; } } + for (auto net : sorted(nets)) { + net.second->is_global = bool_or_default(net.second->attrs, id("ECP5_IS_GLOBAL")); + } } NEXTPNR_NAMESPACE_END |