Skip to content

Commit

Permalink
splitfanout: added blackbox, alu, booth to test
Browse files Browse the repository at this point in the history
  • Loading branch information
widlarizer committed Dec 13, 2024
1 parent 70fbcab commit 84bdaf6
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions tests/various/splitfanout.ys
Original file line number Diff line number Diff line change
Expand Up @@ -347,3 +347,43 @@ select -assert-count 1 t:$logic_not
design -load postopt
select -assert-count 2 t:$logic_not
design -reset

# Cell is a blackbox
read_verilog <<EOT
(* blackbox *)
module MY_AND(input A, B, output Y);
endmodule
module top(input A, B, output Y, Z);
wire X;
MY_AND a(A,B,X);
assign Y = X;
assign Z = X;
endmodule
EOT
proc -noopt
hierarchy
select -assert-count 1 t:MY_AND
splitfanout
select -assert-count 2 t:MY_AND
design -reset

# A less trivial design
read_verilog ../sat/alu.v
proc -noopt
equiv_opt splitfanout
design -load preopt
select -assert-count 5 t:$dff
design -load postopt
select -assert-count 8 t:$dff
design -reset

# Booth-encoded 4x4->8 multiplier smoke test
read_verilog <<EOT
module top(input [3:0] A, input [3:0] B, output [7:0] Y);
assign Y = A * B;
endmodule
EOT
booth
show
equiv_opt splitfanout
design -reset

0 comments on commit 84bdaf6

Please sign in to comment.