aboutsummaryrefslogtreecommitdiffstats
path: root/ice40
diff options
context:
space:
mode:
authormyrtle <gatecat@ds0.me>2023-02-13 10:25:07 +0100
committerGitHub <noreply@github.com>2023-02-13 10:25:07 +0100
commitb5125aac314ed346ed5a86eb62d89e21727887d1 (patch)
tree239b134201a565d8bb38f73cef613f87de9a3dd2 /ice40
parentba3801e010cf01a702c4829a66e955ab2ddc4423 (diff)
parent9e8f8b7b45b4060531190259b2cfaae4d18819f1 (diff)
downloadnextpnr-b5125aac314ed346ed5a86eb62d89e21727887d1.tar.gz
nextpnr-b5125aac314ed346ed5a86eb62d89e21727887d1.tar.bz2
nextpnr-b5125aac314ed346ed5a86eb62d89e21727887d1.zip
Merge pull request #1090 from rowanG077/ecp5-propagate-dcsc-clk-ct
ecp5: Propagate clock constraints through DCSC
Diffstat (limited to 'ice40')
-rw-r--r--ice40/pack.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/ice40/pack.cc b/ice40/pack.cc
index c9811721..f8944685 100644
--- a/ice40/pack.cc
+++ b/ice40/pack.cc
@@ -132,10 +132,12 @@ static void pack_nonlut_ffs(Context *ctx)
static bool net_is_constant(const Context *ctx, NetInfo *net, bool &value)
{
+ auto gnd = ctx->id("$PACKER_GND_NET");
+ auto vcc = ctx->id("$PACKER_VCC_NET");
if (net == nullptr)
return false;
- if (net->name == ctx->id("$PACKER_GND_NET") || net->name == ctx->id("$PACKER_VCC_NET")) {
- value = (net->name == ctx->id("$PACKER_VCC_NET"));
+ if (net->name.in(gnd, vcc)) {
+ value = (net->name == vcc);
return true;
} else {
return false;