3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-23 00:55:32 +00:00

opt_lut: eliminate LUTs evaluating to constants or inputs.

This commit is contained in:
whitequark 2018-12-31 23:53:23 +00:00
parent 0a840dd883
commit 42c356c49c
4 changed files with 104 additions and 0 deletions

19
tests/opt/opt_lut_elim.il Normal file
View file

@ -0,0 +1,19 @@
module \test
wire input 1 \i
wire output 2 \o1
cell $lut $1
parameter \LUT 16'0110100110010110
parameter \WIDTH 4
connect \A { \i 3'000 }
connect \Y \o1
end
wire output 2 \o2
cell $lut $2
parameter \LUT 16'0110100010010110
parameter \WIDTH 4
connect \A { \i 3'000 }
connect \Y \o2
end
end

View file

@ -0,0 +1,3 @@
read_ilang opt_lut_elim.il
opt_lut
select -assert-count 0 t:$lut

View file

@ -1,2 +1,3 @@
read_ilang opt_lut_port.il
opt_lut
select -assert-count 2 t:$lut