diff options
Diffstat (limited to 'ice40/pack.cc')
-rw-r--r-- | ice40/pack.cc | 6 |
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; |