3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-23 00:55:32 +00:00

Merge pull request #2057 from YosysHQ/eddie/fix_task_attr

verilog: support attributes before (not after) task identifier (but 13 s/r conflicts)
This commit is contained in:
Eddie Hung 2020-05-21 11:00:36 -07:00 committed by GitHub
commit 574812d9a5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 37 additions and 11 deletions

View file

@ -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