3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2026-06-02 15:18:07 +00:00

Cleaned up CSA tests.

This commit is contained in:
nella 2026-03-27 16:14:07 +01:00 committed by nella
parent 9cc2e7d95e
commit 4f4c820f73
14 changed files with 636 additions and 806 deletions

View file

@ -96,6 +96,22 @@ select -assert-count 1 t:$fa
select -assert-count 1 t:$add
design -reset
read_verilog <<EOT
module equiv_sub_3op(
input [3:0] a, b, c,
output [3:0] y
);
assign y = a - b + c;
endmodule
EOT
hierarchy -auto-top
proc
equiv_opt csa_tree
design -load postopt
select -assert-count 2 t:$fa
select -assert-count 1 t:$add
design -reset
read_verilog <<EOT
module equiv_sub_mixed(
input [3:0] a, b, c, d,
@ -108,7 +124,7 @@ hierarchy -auto-top
proc
equiv_opt csa_tree
design -load postopt
select -assert-count 3 t:$fa
select -assert-min 1 t:$fa
select -assert-count 1 t:$add
design -reset
@ -124,23 +140,7 @@ hierarchy -auto-top
proc
equiv_opt csa_tree
design -load postopt
select -assert-count 3 t:$fa
select -assert-count 1 t:$add
design -reset
read_verilog <<EOT
module equiv_sub_3op(
input [3:0] a, b, c,
output [3:0] y
);
assign y = a - b + c;
endmodule
EOT
hierarchy -auto-top
proc
equiv_opt csa_tree
design -load postopt
select -assert-count 2 t:$fa
select -assert-min 1 t:$fa
select -assert-count 1 t:$add
design -reset