From: whitequark Date: Wed, 5 Dec 2018 19:27:48 +0000 (+0000) Subject: lut2mux: handle 1-bit INIT constant in $lut cells. X-Git-Tag: yosys-0.9~386^2 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d1f2cb01dcde4bd8972e28df9e600a4060b77344;p=yosys.git lut2mux: handle 1-bit INIT constant in $lut cells. This pass already handles INIT constants shorter than 2^width, but that was not done for the recursion base case. --- diff --git a/passes/techmap/lut2mux.cc b/passes/techmap/lut2mux.cc index d32bbff14..a4ed79550 100644 --- a/passes/techmap/lut2mux.cc +++ b/passes/techmap/lut2mux.cc @@ -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 {