mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-23 00:55:32 +00:00
Add check of begin/end labels for genblock
Signed-off-by: Kamil Rakoczy <krakoczy@antmicro.com>
This commit is contained in:
parent
baf1875307
commit
98c4feb72f
2 changed files with 28 additions and 0 deletions
26
tests/verilog/block_labels.ys
Normal file
26
tests/verilog/block_labels.ys
Normal file
|
@ -0,0 +1,26 @@
|
|||
read_verilog <<EOT
|
||||
module foo;
|
||||
|
||||
genvar a = 0;
|
||||
for (a = 0; a < 10; a++) begin : a
|
||||
end : a
|
||||
endmodule
|
||||
EOT
|
||||
read_verilog <<EOT
|
||||
module foo2;
|
||||
|
||||
genvar a = 0;
|
||||
for (a = 0; a < 10; a++) begin : a
|
||||
end
|
||||
endmodule
|
||||
EOT
|
||||
|
||||
logger -expect error "Begin label \(a\) and end label \(b\) don't match\." 1
|
||||
read_verilog <<EOT
|
||||
module foo3;
|
||||
|
||||
genvar a = 0;
|
||||
for (a = 0; a < 10; a++) begin : a
|
||||
end : b
|
||||
endmodule
|
||||
EOT
|
Loading…
Add table
Add a link
Reference in a new issue