aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSergiusz Bazanski <q3k@q3k.org>2018-07-25 11:47:24 +0100
committerSergiusz Bazanski <q3k@q3k.org>2018-07-25 11:47:24 +0100
commitdb4f2d23180e9c62600e5e6cd744d9eb273a112e (patch)
treebc4f9036ca6c618489bc7c99f0ef5aa44a8d4947
parent14a501969af0023c7396d41a0116e706c68cf5ed (diff)
downloadnextpnr-db4f2d23180e9c62600e5e6cd744d9eb273a112e.tar.gz
nextpnr-db4f2d23180e9c62600e5e6cd744d9eb273a112e.tar.bz2
nextpnr-db4f2d23180e9c62600e5e6cd744d9eb273a112e.zip
ice40: check PLL PACKAGEPIN drives only PLL, cosmetics
-rw-r--r--ice40/pack.cc11
1 files changed, 7 insertions, 4 deletions
diff --git a/ice40/pack.cc b/ice40/pack.cc
index 4aa558e6..91dcf846 100644
--- a/ice40/pack.cc
+++ b/ice40/pack.cc
@@ -550,13 +550,13 @@ static std::unique_ptr<CellInfo> spliceLUT(Context *ctx, CellInfo *ci, IdString
NPNR_ASSERT(port.net != nullptr);
// Create pass-through LUT.
- std::unique_ptr<CellInfo> pt =
- create_ice_cell(ctx, ctx->id("ICESTORM_LC"), ci->name.str(ctx) + "$nextpnr_ice40_pack_pll_lc");
+ std::unique_ptr<CellInfo> pt = create_ice_cell(ctx, ctx->id("ICESTORM_LC"),
+ ci->name.str(ctx) + "$nextpnr_" + portId.str(ctx) + "_lut_through");
pt->params[ctx->id("LUT_INIT")] = "65280"; // output is always I3
// Create LUT output net.
std::unique_ptr<NetInfo> out_net = std::unique_ptr<NetInfo>(new NetInfo);
- out_net->name = ctx->id(ci->name.str(ctx) + "$nextnr_ice40_pack_pll_net");
+ out_net->name = ctx->id(ci->name.str(ctx) + "$nextnr_" + portId.str(ctx) + "_lut_through_net");
out_net->driver.cell = pt.get();
out_net->driver.port = ctx->id("O");
pt->ports.at(ctx->id("O")).net = out_net.get();
@@ -738,6 +738,10 @@ static void pack_special(Context *ctx)
ci->name.c_str(ctx), ctx->getBelPackagePin(packagepin_bel).c_str(),
ctx->getBelPackagePin(pll_sb_io_belpin.bel).c_str());
}
+ if (pad_packagepin_net->users.size() != 1) {
+ log_error(" PLL '%s' clock input '%s' can only drive PLL\n", ci->name.c_str(ctx),
+ pad_packagepin_net->name.c_str(ctx));
+ }
// Set an attribute about this PLL's PAD SB_IO.
packed->attrs[ctx->id("BEL_PAD_INPUT")] = packagepin_bel_name->second;
// Remove the connection from the SB_IO to the PLL.
@@ -757,7 +761,6 @@ static void pack_special(Context *ctx)
// Delete the original PACKAGEPIN net if needed.
if (pad_packagepin_net != nullptr) {
for (auto user : pad_packagepin_net->users) {
- log_info(" deleting %s from %s\n", user.port.c_str(ctx), user.cell->name.c_str(ctx));
user.cell->ports.erase(user.port);
}
ctx->nets.erase(pad_packagepin_net->name);