mirror of
https://github.com/YosysHQ/yosys
synced 2026-03-03 20:24:38 +00:00
add lut2bmux
This commit is contained in:
parent
64a933d77b
commit
7bea55f783
3 changed files with 81 additions and 0 deletions
22
tests/techmap/lut2bmux.ys
Normal file
22
tests/techmap/lut2bmux.ys
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
read_rtlil << EOT
|
||||
module \top
|
||||
wire width 4 input 0 \A
|
||||
wire output 1 \Y
|
||||
|
||||
cell $lut $0
|
||||
parameter \WIDTH 4
|
||||
parameter \LUT 16'b0110100110010110
|
||||
connect \A \A
|
||||
connect \Y \Y
|
||||
end
|
||||
end
|
||||
EOT
|
||||
|
||||
hierarchy -auto-top
|
||||
|
||||
# Prove lut2bmux preserves behavior
|
||||
equiv_opt -assert lut2bmux
|
||||
|
||||
# And check the structural rewrite happened
|
||||
select -assert-count 0 t:$lut
|
||||
select -assert-count 1 t:$bmux r:WIDTH=1 r:S_WIDTH=4 %i
|
||||
Loading…
Add table
Add a link
Reference in a new issue