From: Eddie Hung Date: Wed, 7 Aug 2019 20:12:28 +0000 (-0700) Subject: opt_lut to ignore LUT cells, or those that drive bits, with (* keep *) X-Git-Tag: working-ls180~1159^2 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f69410daaf68cd3cef5e365df9b27c623ce589a7;p=yosys.git opt_lut to ignore LUT cells, or those that drive bits, with (* keep *) --- diff --git a/passes/opt/opt_lut.cc b/passes/opt/opt_lut.cc index 587ef878a..4c199ba72 100644 --- a/passes/opt/opt_lut.cc +++ b/passes/opt/opt_lut.cc @@ -101,6 +101,12 @@ struct OptLutWorker { if (cell->type == "$lut") { + if (cell->has_keep_attr()) + continue; + SigBit lut_output = cell->getPort("\\Y"); + if (lut_output.wire->get_bool_attribute("\\keep")) + continue; + int lut_width = cell->getParam("\\WIDTH").as_int(); SigSpec lut_input = cell->getPort("\\A"); int lut_arity = 0;