aboutsummaryrefslogtreecommitdiffstats
path: root/tests/verilog/task_attr.ys
diff options
context:
space:
mode:
authorPeter Crozier <peter@crozier.com>2020-06-03 17:19:28 +0100
committerGitHub <noreply@github.com>2020-06-03 17:19:28 +0100
commit0d3f7ea011288e1a1fadd4ae27f1e8a57d729053 (patch)
tree07bde0d9f492233728070234aed2abd45fbd464d /tests/verilog/task_attr.ys
parent17f050d3c6b8934141c42f96a3418de67a687b2c (diff)
parent46ed0db2ec883a4ce330c81f321511e36e35c0b3 (diff)
downloadyosys-0d3f7ea011288e1a1fadd4ae27f1e8a57d729053.tar.gz
yosys-0d3f7ea011288e1a1fadd4ae27f1e8a57d729053.tar.bz2
yosys-0d3f7ea011288e1a1fadd4ae27f1e8a57d729053.zip
Merge branch 'master' into struct
Diffstat (limited to 'tests/verilog/task_attr.ys')
-rw-r--r--tests/verilog/task_attr.ys28
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