projects
/
yosys.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
27b7ffc
)
tests: attributes before task enable
author
Eddie Hung
<eddie@fpgeh.com>
Thu, 14 May 2020 23:09:41 +0000
(16:09 -0700)
committer
Eddie Hung
<eddie@fpgeh.com>
Thu, 14 May 2020 23:09:41 +0000
(16:09 -0700)
tests/verilog/task_attr.ys
[new file with mode: 0644]
patch
|
blob
diff --git a/tests/verilog/task_attr.ys
b/tests/verilog/task_attr.ys
new file mode 100644
(file)
index 0000000..
d6e75f8
--- /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