diff options
author | Eddie Hung <e.hung@imperial.ac.uk> | 2018-07-25 17:41:23 -0700 |
---|---|---|
committer | Eddie Hung <e.hung@imperial.ac.uk> | 2018-07-25 17:41:23 -0700 |
commit | 7c8c13aba14ee51851506e0c1cfc0c995db21102 (patch) | |
tree | fc2f58e44bf0f21b76f8ea31485458ddf5c60df6 /ice40/arch.h | |
parent | 1fa738bd881f2951465586ae20f81f33743db73f (diff) | |
parent | 7a8e8999d21205044e707a2765dc444531d69cef (diff) | |
download | nextpnr-7c8c13aba14ee51851506e0c1cfc0c995db21102.tar.gz nextpnr-7c8c13aba14ee51851506e0c1cfc0c995db21102.tar.bz2 nextpnr-7c8c13aba14ee51851506e0c1cfc0c995db21102.zip |
Merge remote-tracking branch 'origin/master' into redist_slack
Diffstat (limited to 'ice40/arch.h')
-rw-r--r-- | ice40/arch.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/ice40/arch.h b/ice40/arch.h index a4d43cd4..bdd43901 100644 --- a/ice40/arch.h +++ b/ice40/arch.h @@ -740,6 +740,18 @@ struct Arch : BaseCtx IdString id_cen, id_clk, id_sr; IdString id_i0, id_i1, id_i2, id_i3; IdString id_dff_en, id_neg_clk; + + // ------------------------------------------------- + BelPin getIOBSharingPLLPin(BelId pll, PortPin pll_pin) const + { + auto wire = getBelPinWire(pll, pll_pin); + for (auto src_bel : getWireBelPins(wire)) { + if (getBelType(src_bel.bel) == TYPE_SB_IO && src_bel.pin == PIN_D_IN_0) { + return src_bel; + } + } + NPNR_ASSERT_FALSE("Expected PLL pin to share an output with an SB_IO D_IN_{0,1}"); + } }; NEXTPNR_NAMESPACE_END |