3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-07 09:55:20 +00:00
yosys/tests/simple/matching_end_labels.sv
Zachary Snow f2c2d73f36 sv: fix up end label checking
- disallow [gen]blocks with an end label but not begin label
- check validity of module end label
- fix memory leak of package name and end label
- fix memory leak of module end label
2021-06-16 21:48:05 -04:00

30 lines
556 B
Systemverilog

module top(
output reg [7:0]
out1, out2, out3, out4
);
initial begin
begin : blk1
reg x;
x = 1;
end
out1 = blk1.x;
begin : blk2
reg x;
x = 2;
end : blk2
out2 = blk2.x;
end
if (1) begin
if (1) begin : blk3
reg x;
assign x = 3;
end
assign out3 = blk3.x;
if (1) begin : blk4
reg x;
assign x = 4;
end : blk4
assign out4 = blk4.x;
end
endmodule