diff options
author | David Shah <davey1576@gmail.com> | 2018-11-26 18:11:16 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-26 18:11:16 +0000 |
commit | 86108bfd395352af2342177eba6453cd8a58bdfa (patch) | |
tree | 510f698705c96b2def9f7b20732ceaf4eabe09b4 /ice40/arch.h | |
parent | 5a1190ade259259fa31cf6a9f35ec3794bbaeb08 (diff) | |
parent | 584e8c58a61748b88639336ad5defb41d5389c3a (diff) | |
download | nextpnr-86108bfd395352af2342177eba6453cd8a58bdfa.tar.gz nextpnr-86108bfd395352af2342177eba6453cd8a58bdfa.tar.bz2 nextpnr-86108bfd395352af2342177eba6453cd8a58bdfa.zip |
Merge pull request #149 from smunaut/issue_148
Fixes for global promotion
Diffstat (limited to 'ice40/arch.h')
-rw-r--r-- | ice40/arch.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ice40/arch.h b/ice40/arch.h index e8c597c9..10255dbe 100644 --- a/ice40/arch.h +++ b/ice40/arch.h @@ -884,6 +884,13 @@ struct Arch : BaseCtx } NPNR_ASSERT_FALSE("Expected PLL pin to share an output with an SB_IO D_IN_{0,1}"); } + + int getDrivenGlobalNetwork(BelId bel) const + { + NPNR_ASSERT(getBelType(bel) == id_SB_GB); + IdString glb_net = getWireName(getBelPinWire(bel, id_GLOBAL_BUFFER_OUTPUT)); + return std::stoi(std::string("") + glb_net.str(this).back()); + } }; void ice40DelayFuzzerMain(Context *ctx); |