mirror of
https://github.com/YosysHQ/yosys
synced 2025-11-29 08:49:53 +00:00
tests: Tidy up bug3515
Add base case where mapping is possible for sanity checking.
This commit is contained in:
parent
ba31a02578
commit
a8e8746fc0
1 changed files with 23 additions and 13 deletions
|
|
@ -1,21 +1,31 @@
|
|||
# base case is able to map
|
||||
read_verilog << EOF
|
||||
module mod_and_or (
|
||||
input a,
|
||||
input b,
|
||||
input c,
|
||||
input d,
|
||||
module and_x3 (
|
||||
input a, b, c, d,
|
||||
output reg y
|
||||
);
|
||||
|
||||
always @(a,b,c,d) begin
|
||||
y <= (a&b)|(c&d);
|
||||
end
|
||||
assign y = (a&b)&(c&d);
|
||||
endmodule
|
||||
EOF
|
||||
hierarchy -top and_x3
|
||||
opt
|
||||
extract -map ./bug3515.v
|
||||
select -assert-count 1 t:mod_74x08_3
|
||||
|
||||
# more needles than haystacks; not able to map
|
||||
design -reset
|
||||
read_verilog << EOF
|
||||
module mod_and_or (
|
||||
input a, b, c, d,
|
||||
output reg y
|
||||
);
|
||||
|
||||
assign y = (a&b)|(c&d);
|
||||
endmodule
|
||||
EOF
|
||||
hierarchy -top mod_and_or
|
||||
proc
|
||||
opt
|
||||
techmap -map ./bug3515.v
|
||||
proc
|
||||
extract -map ./bug3515.v -verbose
|
||||
proc
|
||||
extract -map ./bug3515.v
|
||||
select -assert-count 2 t:$and
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue