From f1aa7093feed385e83266b0221672cae28b3365f Mon Sep 17 00:00:00 2001 From: David Shah Date: Tue, 25 Sep 2018 15:52:32 +0100 Subject: ice40: Fix carry packer bug Signed-off-by: David Shah --- ice40/pack.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ice40/pack.cc') 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); } -- cgit v1.2.3