aboutsummaryrefslogtreecommitdiffstats
path: root/ice40/pack.cc
diff options
context:
space:
mode:
authorDavid Shah <davey1576@gmail.com>2018-09-25 15:52:32 +0100
committerDavid Shah <davey1576@gmail.com>2018-09-25 15:52:32 +0100
commitf1aa7093feed385e83266b0221672cae28b3365f (patch)
treea4afc4f4827b9f18840d3717a645d9490453323e /ice40/pack.cc
parent09ddcb67d33f61c186bdb21fd8db9bb9b175d2f0 (diff)
downloadnextpnr-f1aa7093feed385e83266b0221672cae28b3365f.tar.gz
nextpnr-f1aa7093feed385e83266b0221672cae28b3365f.tar.bz2
nextpnr-f1aa7093feed385e83266b0221672cae28b3365f.zip
ice40: Fix carry packer bug
Signed-off-by: David Shah <davey1576@gmail.com>
Diffstat (limited to 'ice40/pack.cc')
-rw-r--r--ice40/pack.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/ice40/pack.cc b/ice40/pack.cc
index 7c853e0e..45d1489f 100644
--- a/ice40/pack.cc
+++ b/ice40/pack.cc
@@ -159,7 +159,7 @@ static void pack_carries(Context *ctx)
exhausted_cells.find(usr.cell->name) == exhausted_cells.end()) {
// This clause stops us double-packing cells
i0_matches.insert(usr.cell->name);
- if (!i1_net) {
+ if (!i1_net && !usr.cell->ports.at(ctx->id("I2")).net) {
// I1 is don't care when disconnected, duplicate I0
i1_matches.insert(usr.cell->name);
}
@@ -174,7 +174,7 @@ static void pack_carries(Context *ctx)
exhausted_cells.find(usr.cell->name) == exhausted_cells.end()) {
// This clause stops us double-packing cells
i1_matches.insert(usr.cell->name);
- if (!i0_net) {
+ if (!i0_net && !usr.cell->ports.at(ctx->id("I1")).net) {
// I0 is don't care when disconnected, duplicate I1
i0_matches.insert(usr.cell->name);
}