aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSylvain Munaut <tnt@246tNt.com>2018-11-16 22:55:57 +0100
committerSylvain Munaut <tnt@246tNt.com>2018-11-19 18:20:20 +0100
commit5fb3353557853178c2787ea8a80afddf5ace8a4d (patch)
tree0c502e22c0d0ee5142d3d3d17e1c43eaba480133
parent8c69a3bba3d72dd445f1003d470c3ed5ed06c5d4 (diff)
downloadnextpnr-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>
-rw-r--r--ice40/pack.cc10
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.