mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-23 17:15:33 +00:00
cutpoint: Add -blackbox option
Replace the contents of all blackboxes in the design with a formal cut point. Includes test script.
This commit is contained in:
parent
3410e10ed5
commit
583771ef5b
2 changed files with 58 additions and 2 deletions
33
tests/various/cutpoint_blackbox.ys
Normal file
33
tests/various/cutpoint_blackbox.ys
Normal file
|
@ -0,0 +1,33 @@
|
|||
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 0 t:$anyseq
|
||||
select -assert-count 2 =t:?b
|
||||
cutpoint -blackbox =*
|
||||
select -assert-count 2 t:$anyseq
|
||||
select -assert-count 2 t:?b
|
Loading…
Add table
Add a link
Reference in a new issue