aboutsummaryrefslogtreecommitdiffstats
path: root/passes/techmap/techmap.cc
diff options
context:
space:
mode:
authorEddie Hung <eddie@fpgeh.com>2019-07-09 12:16:33 -0700
committerEddie Hung <eddie@fpgeh.com>2019-07-09 12:16:33 -0700
commitbee5d2b21a721b5b2d28cc9326b3d51573167038 (patch)
tree464486a5bd584c36d7b4059b461fcb479115796e /passes/techmap/techmap.cc
parent93522b0ae15466297e45edecf55f7e33c4ebcc1c (diff)
parentc2db70f41e2697d141439c093813ae48f3b7a5d4 (diff)
downloadyosys-bee5d2b21a721b5b2d28cc9326b3d51573167038.tar.gz
yosys-bee5d2b21a721b5b2d28cc9326b3d51573167038.tar.bz2
yosys-bee5d2b21a721b5b2d28cc9326b3d51573167038.zip
Merge remote-tracking branch 'origin/eddie/fix1173' into xc7mux
Diffstat (limited to 'passes/techmap/techmap.cc')
-rw-r--r--passes/techmap/techmap.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/passes/techmap/techmap.cc b/passes/techmap/techmap.cc
index ab0bd3b54..ceb053825 100644
--- a/passes/techmap/techmap.cc
+++ b/passes/techmap/techmap.cc
@@ -649,10 +649,13 @@ struct TechmapWorker
unique_bit_id[bit] = unique_bit_id_counter++;
}
+ // Find highest bit set
int bits = 0;
for (int i = 0; i < 32; i++)
if (((unique_bit_id_counter-1) & (1 << i)) != 0)
bits = i;
+ // Increment index by one to get number of bits
+ bits++;
if (tpl->avail_parameters.count("\\_TECHMAP_BITS_CONNMAP_"))
parameters["\\_TECHMAP_BITS_CONNMAP_"] = bits;