aboutsummaryrefslogtreecommitdiffstats
path: root/passes/opt/opt_lut.cc
diff options
context:
space:
mode:
authorEddie Hung <eddie@fpgeh.com>2019-08-12 11:32:10 -0700
committerEddie Hung <eddie@fpgeh.com>2019-08-12 11:32:10 -0700
commitf890cfb63b71ae7b09e19c290ec70c358dcbe9cd (patch)
treeea7602c378e794b5e7448361ba2a41d2d6a49c13 /passes/opt/opt_lut.cc
parentab1d63a56595f11e10a5326bd83ce84d08badabe (diff)
parent78b30bbb1102047585d1a2eac89b1c7f5ca7344e (diff)
downloadyosys-f890cfb63b71ae7b09e19c290ec70c358dcbe9cd.tar.gz
yosys-f890cfb63b71ae7b09e19c290ec70c358dcbe9cd.tar.bz2
yosys-f890cfb63b71ae7b09e19c290ec70c358dcbe9cd.zip
Merge remote-tracking branch 'origin/master' into xc7dsp
Diffstat (limited to 'passes/opt/opt_lut.cc')
-rw-r--r--passes/opt/opt_lut.cc6
1 files changed, 6 insertions, 0 deletions
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;