aboutsummaryrefslogtreecommitdiffstats
path: root/passes/techmap/techmap.cc
diff options
context:
space:
mode:
authorEddie Hung <eddie@fpgeh.com>2019-07-10 16:05:41 -0700
committerEddie Hung <eddie@fpgeh.com>2019-07-10 16:05:41 -0700
commit052060f10906ca859d2313b86800e110bd34b79f (patch)
tree356107e4270feb84046b984a98e0874f1436b2d9 /passes/techmap/techmap.cc
parent35fd9b04731d3bc944e1471b96668ef0cf7b51f1 (diff)
parentbb2144ae733f1a2c5e629a8251bfbdcc15559aa4 (diff)
downloadyosys-052060f10906ca859d2313b86800e110bd34b79f.tar.gz
yosys-052060f10906ca859d2313b86800e110bd34b79f.tar.bz2
yosys-052060f10906ca859d2313b86800e110bd34b79f.zip
Merge remote-tracking branch 'origin/master' into xaig_dff
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;