diff options
author | Sylvain Munaut <tnt@246tNt.com> | 2018-11-16 22:55:57 +0100 |
---|---|---|
committer | Sylvain Munaut <tnt@246tNt.com> | 2018-11-19 18:20:20 +0100 |
commit | 5fb3353557853178c2787ea8a80afddf5ace8a4d (patch) | |
tree | 0c502e22c0d0ee5142d3d3d17e1c43eaba480133 /ice40 | |
parent | 8c69a3bba3d72dd445f1003d470c3ed5ed06c5d4 (diff) | |
download | nextpnr-5fb3353557853178c2787ea8a80afddf5ace8a4d.tar.gz nextpnr-5fb3353557853178c2787ea8a80afddf5ace8a4d.tar.bz2 nextpnr-5fb3353557853178c2787ea8a80afddf5ace8a4d.zip |
ice40/pack: Allow PLL to be constrained via 'BEL' attributes
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Diffstat (limited to 'ice40')
-rw-r--r-- | ice40/pack.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/ice40/pack.cc b/ice40/pack.cc index d0142fa3..c7614830 100644 --- a/ice40/pack.cc +++ b/ice40/pack.cc @@ -886,6 +886,16 @@ static void pack_special(Context *ctx) log_error("Could not constrain PLL '%s' to any PLL Bel (too many PLLs?)\n", packed->name.c_str(ctx)); } + } else { + pll_bel = ctx->getBelByName(ctx->id(packed->attrs[ctx->id("BEL")])); + if (ctx->getBelType(pll_bel) != id_ICESTORM_PLL) + log_error("PLL '%s' is constrained to BEL %s which isn't a ICESTORM_PLL BEL\n", + packed->name.c_str(ctx), ctx->getBelName(pll_bel).c_str(ctx)); + if (ctx->isBelLocked(pll_bel)) + log_error("PLL '%s' is constrained to locked BEL %s\n", packed->name.c_str(ctx), + ctx->getBelName(pll_bel).c_str(ctx)); + log_info(" constrained PLL '%s' to %s\n", packed->name.c_str(ctx), + ctx->getBelName(pll_bel).c_str(ctx)); } // Delete the original PACKAGEPIN net if needed. |