lut2mux: handle 1-bit INIT constant in $lut cells.
authorwhitequark <whitequark@whitequark.org>
Wed, 5 Dec 2018 19:27:48 +0000 (19:27 +0000)
committerwhitequark <whitequark@whitequark.org>
Wed, 5 Dec 2018 19:27:48 +0000 (19:27 +0000)
This pass already handles INIT constants shorter than 2^width, but
that was not done for the recursion base case.

passes/techmap/lut2mux.cc

index d32bbff14835122baae593f2f86fb7ab673cd381..a4ed795507c898b387ba4b6dd253d22a650b99f2 100644 (file)
@@ -32,7 +32,7 @@ int lut2mux(Cell *cell)
 
        if (GetSize(sig_a) == 1)
        {
-               cell->module->addMuxGate(NEW_ID, lut[0], lut[1], sig_a, sig_y);
+               cell->module->addMuxGate(NEW_ID, lut.extract(0)[0], lut.extract(1)[0], sig_a, sig_y);
        }
        else
        {