Skip to content

Commit

Permalink
setundef: Add test for -blackbox
Browse files Browse the repository at this point in the history
  • Loading branch information
KrystalDelusion committed Dec 10, 2024
1 parent 15b1423 commit 1d374fd
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions tests/various/setundef_blackbox.ys
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
read_verilog -specify << EOT
module top(input a, b, output o);
wire c, d;
bb bb1 (.a (a), .b (b), .o (c));
wb wb1 (.a (a), .b (b), .o (d));
some_mod some_inst (.a (c), .b (d), .o (o));
endmodule

(* blackbox *)
module bb(input a, b, output o);
assign o = a | b;
specify
(a => o) = 1;
endspecify
endmodule

(* whitebox *)
module wb(input a, b, output o);
assign o = a ^ b;
endmodule

module some_mod(input a, b, output o);
assign o = a & b;
endmodule
EOT

select top

select -assert-count 2 =t:?b
setundef -blackbox -anyseq
select -assert-count 2 t:$anyseq
select -assert-count 0 =t:?b

0 comments on commit 1d374fd

Please sign in to comment.