diff options
author | Eddie Hung <eddie@fpgeh.com> | 2020-05-11 10:26:08 -0700 |
---|---|---|
committer | Eddie Hung <eddie@fpgeh.com> | 2020-05-25 07:36:53 -0700 |
commit | 29d84339bf9ec8f1d2be3fa20f81843f3ee08324 (patch) | |
tree | 476433f7676b6cb933d62c88d93dda01e1489e20 /tests | |
parent | 88bddb37c91e8fe136e5c9cc2ade20fadccd1946 (diff) | |
download | yosys-29d84339bf9ec8f1d2be3fa20f81843f3ee08324.tar.gz yosys-29d84339bf9ec8f1d2be3fa20f81843f3ee08324.tar.bz2 yosys-29d84339bf9ec8f1d2be3fa20f81843f3ee08324.zip |
tests: add an generate-else test too
Diffstat (limited to 'tests')
-rw-r--r-- | tests/verilog/bug2037.ys | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/tests/verilog/bug2037.ys b/tests/verilog/bug2037.ys index afe92022e..42c4b8f5d 100644 --- a/tests/verilog/bug2037.ys +++ b/tests/verilog/bug2037.ys @@ -7,3 +7,37 @@ module test (); if (y) (* foo *) ; endmodule EOT + + +design -reset +logger -expect warning "Attribute\(s\) attached to null statement\. Ignoring\." 3 # cumulative +logger -expect-no-warnings +read_verilog <<EOT +module test (); + localparam y = 1; + always @(*) + if (y) (* foo *) ; else (* bar *) ; +endmodule +EOT + + +design -reset +logger -expect warning "Attribute\(s\) attached to null statement\. Ignoring\." 4 # cumulative +logger -expect-no-warnings +read_verilog <<EOT +module test (); + localparam y = 1; + generate if (y) (* foo *) ; endgenerate +endmodule +EOT + + +design -reset +logger -expect warning "Attribute\(s\) attached to null statement\. Ignoring\." 6 # cumulative +logger -expect-no-warnings +read_verilog <<EOT +module test (); + localparam y = 1; + generate if (y) (* foo *) ; else (* bar *); endgenerate +endmodule +EOT |