Increment _TECHMAP_BITS_CONNMAP_ by one since counting from zero
authorEddie Hung <eddie@fpgeh.com>
Tue, 9 Jul 2019 19:14:00 +0000 (12:14 -0700)
committerEddie Hung <eddie@fpgeh.com>
Tue, 9 Jul 2019 19:14:00 +0000 (12:14 -0700)
passes/techmap/techmap.cc

index ab0bd3b54f034361ae8cf68083e1fda8bf3ad317..ceb0538255a12c919b3a64d14cdd0b04b7a16513 100644 (file)
@@ -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;