diff options
author | Eddie Hung <eddie@fpgeh.com> | 2020-05-14 16:09:41 -0700 |
---|---|---|
committer | Eddie Hung <eddie@fpgeh.com> | 2020-05-14 16:09:41 -0700 |
commit | e7fd8912f041462bf044b6c93aa4b4db786d01c7 (patch) | |
tree | 27145059d8b3c84e782dbda2695c1bdd53d063d7 /tests/verilog | |
parent | 27b7ffc75444583bbecc70e2d7e2e84bc321f2cf (diff) | |
download | yosys-e7fd8912f041462bf044b6c93aa4b4db786d01c7.tar.gz yosys-e7fd8912f041462bf044b6c93aa4b4db786d01c7.tar.bz2 yosys-e7fd8912f041462bf044b6c93aa4b4db786d01c7.zip |
tests: attributes before task enable
Diffstat (limited to 'tests/verilog')
-rw-r--r-- | tests/verilog/task_attr.ys | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/verilog/task_attr.ys b/tests/verilog/task_attr.ys new file mode 100644 index 000000000..d6e75f85f --- /dev/null +++ b/tests/verilog/task_attr.ys @@ -0,0 +1,28 @@ +read_verilog <<EOT +module top; + task foo; + endtask + + always @* + (* foo *) foo; + + initial + if (0) $info("bar"); +endmodule +EOT +# Since task enables are not an RTLIL object, +# any attributes on their AST get dropped +select -assert-none a:* a:src %d + + +logger -expect error "syntax error, unexpected ATTR_BEGIN" 1 +design -reset +read_verilog <<EOT +module top; + task foo; + endtask + + always @* + foo (* foo *); +endmodule +EOT |