mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-28 03:15:50 +00:00
cutpoint: Test -blackbox with parameter
Modify `cutpoint_blackbox.ys` to check that parameters on blackbox modules are maintained after the cutpoint. Also adjusts the test to check that each instance gets the `$anyseq` cell.
This commit is contained in:
parent
8e9c96518c
commit
cd7ac4f9c4
1 changed files with 18 additions and 12 deletions
|
@ -1,13 +1,14 @@
|
||||||
read_verilog -specify << EOT
|
read_verilog -specify << EOT
|
||||||
module top(input a, b, output o);
|
module top(input a, b, output o);
|
||||||
wire c, d;
|
wire c, d, e;
|
||||||
bb bb1 (.a (a), .b (b), .o (c));
|
bb #(.SOME_PARAM(1)) bb1 (.a (a), .b (b), .o (c));
|
||||||
wb wb1 (.a (a), .b (b), .o (d));
|
bb #(.SOME_PARAM(2)) bb2 (.a (a), .b (b), .o (d));
|
||||||
some_mod some_inst (.a (c), .b (d), .o (o));
|
wb wb1 (.a (a), .b (b), .o (e));
|
||||||
|
some_mod some_inst (.a (c), .b (d), .c (e), .o (o));
|
||||||
endmodule
|
endmodule
|
||||||
|
|
||||||
(* blackbox *)
|
(* blackbox *)
|
||||||
module bb(input a, b, output o);
|
module bb #( parameter SOME_PARAM=0 ) (input a, b, output o);
|
||||||
assign o = a | b;
|
assign o = a | b;
|
||||||
specify
|
specify
|
||||||
(a => o) = 1;
|
(a => o) = 1;
|
||||||
|
@ -19,15 +20,20 @@ module wb(input a, b, output o);
|
||||||
assign o = a ^ b;
|
assign o = a ^ b;
|
||||||
endmodule
|
endmodule
|
||||||
|
|
||||||
module some_mod(input a, b, output o);
|
module some_mod(input a, b, c, output o);
|
||||||
assign o = a & b;
|
assign o = a & (b | c);
|
||||||
endmodule
|
endmodule
|
||||||
EOT
|
EOT
|
||||||
|
|
||||||
select top
|
hierarchy -top top
|
||||||
|
|
||||||
select -assert-count 0 t:$anyseq
|
select -assert-count 0 t:$anyseq
|
||||||
select -assert-count 2 =t:?b
|
select -assert-count 3 =t:?b
|
||||||
cutpoint -blackbox =*
|
cutpoint -blackbox
|
||||||
select -assert-count 2 t:$anyseq
|
|
||||||
select -assert-count 2 t:?b
|
select -assert-count 3 =t:?b
|
||||||
|
select -assert-count 2 r:SOME_PARAM
|
||||||
|
select -assert-count 1 r:SOME_PARAM=1
|
||||||
|
|
||||||
|
flatten
|
||||||
|
select -assert-count 3 t:$anyseq
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue