mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-23 17:15:33 +00:00
Merge 73618d862b
into 314842d2a0
This commit is contained in:
commit
008be3b744
3 changed files with 124 additions and 0 deletions
20
tests/verilog/genblk_wire.sv
Normal file
20
tests/verilog/genblk_wire.sv
Normal file
|
@ -0,0 +1,20 @@
|
|||
module gold(a, b);
|
||||
output wire [1:0] a;
|
||||
input wire [1:0] b;
|
||||
genvar i;
|
||||
for (i = 0; i < 2; i++) begin
|
||||
wire x;
|
||||
assign x = b[i];
|
||||
assign a[i] = x;
|
||||
end
|
||||
endmodule
|
||||
|
||||
module gate(a, b);
|
||||
output wire [1:0] a;
|
||||
input wire [1:0] b;
|
||||
genvar i;
|
||||
for (i = 0; i < 2; i++) begin
|
||||
assign x = b[i];
|
||||
assign a[i] = x;
|
||||
end
|
||||
endmodule
|
16
tests/verilog/genblk_wire.ys
Normal file
16
tests/verilog/genblk_wire.ys
Normal file
|
@ -0,0 +1,16 @@
|
|||
#logger -expect warning "Identifier `\\genblk1[0].x' is implicitly declared." 1
|
||||
#logger -expect warning "Identifier `\\genblk1[1].x' is implicitly declared." 1
|
||||
read_verilog -sv genblk_wire.sv
|
||||
|
||||
select -assert-count 1 gate/genblk1[0].x
|
||||
select -assert-count 1 gate/genblk1[1].x
|
||||
select -assert-count 0 gate/genblk1[2].x
|
||||
|
||||
select -assert-count 1 gold/genblk1[0].x
|
||||
select -assert-count 1 gold/genblk1[1].x
|
||||
select -assert-count 0 gold/genblk1[2].x
|
||||
|
||||
proc
|
||||
equiv_make gold gate equiv
|
||||
equiv_simple
|
||||
equiv_status -assert
|
Loading…
Add table
Add a link
Reference in a new issue