Fix begin/end in generate
authordalance <dalance@gmail.com>
Wed, 11 Nov 2020 03:03:37 +0000 (12:03 +0900)
committerdalance <dalance@gmail.com>
Wed, 11 Nov 2020 03:03:37 +0000 (12:03 +0900)
tests/simple/const_branch_finish.v
tests/simple/generate.v

index 8166688e60c492c63db94ce2a60d16d60f0b718b..f585be87a97c59c49255b20ece335545b6c7f58d 100644 (file)
@@ -21,9 +21,6 @@ module top;
                end
        end
        generate
-               begin : unconditional_block
-                       initial `CONSTANT_CHECK
-               end
                if (WIDTH == 32) begin : conditional_block
                        initial `CONSTANT_CHECK
                end
index 12327b36eb8426e2ef0d1f18cd26f370eb7efacc..667f400967e0b43168fa25af66df144aa629fea5 100644 (file)
@@ -167,7 +167,7 @@ module gen_test7;
        reg [2:0] out2;
        wire [2:0] out3;
        generate
-               begin : cond
+               if (1) begin : cond
                        reg [2:0] sub_out1;
                        reg [2:0] sub_out2;
                        wire [2:0] sub_out3;
@@ -215,9 +215,9 @@ module gen_test8;
 
        wire [1:0] x = 2'b11;
        generate
-               begin : A
+               if (1) begin : A
                        wire [1:0] x;
-                       begin : B
+                       if (1) begin : B
                                wire [1:0] x = 2'b00;
                                `ASSERT(x == 0)
                                `ASSERT(A.x == 2)
@@ -228,7 +228,7 @@ module gen_test8;
                                `ASSERT(gen_test8.A.C.x == 1)
                                `ASSERT(gen_test8.A.B.x == 0)
                        end
-                       begin : C
+                       if (1) begin : C
                                wire [1:0] x = 2'b01;
                                `ASSERT(x == 1)
                                `ASSERT(A.x == 2)