aboutsummaryrefslogtreecommitdiffstats
path: root/passes/techmap/techmap.cc
diff options
context:
space:
mode:
authorEddie Hung <eddie@fpgeh.com>2019-07-09 12:14:00 -0700
committerEddie Hung <eddie@fpgeh.com>2019-07-09 12:14:00 -0700
commitc2db70f41e2697d141439c093813ae48f3b7a5d4 (patch)
tree38e9a5982995c9a183b1ea47561603aa9562d479 /passes/techmap/techmap.cc
parent00d8a9dce2c014214161518546021db79a8eac43 (diff)
downloadyosys-c2db70f41e2697d141439c093813ae48f3b7a5d4.tar.gz
yosys-c2db70f41e2697d141439c093813ae48f3b7a5d4.tar.bz2
yosys-c2db70f41e2697d141439c093813ae48f3b7a5d4.zip
Increment _TECHMAP_BITS_CONNMAP_ by one since counting from zero
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;