diff options
author | Clifford Wolf <clifford@clifford.at> | 2019-06-07 12:08:42 +0200 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2019-06-07 12:08:42 +0200 |
commit | a3bbc5365bc8ed411ab437a6baea5596531933a8 (patch) | |
tree | b4baf6d5eb444c6e462d874aa21601e5654e3c3c /tests | |
parent | 169de05f3be779dd936ed5e0efea6a6055d5b187 (diff) | |
parent | ac10e7d96da4965751fd60a8dd42a8998c011c39 (diff) | |
download | yosys-a3bbc5365bc8ed411ab437a6baea5596531933a8.tar.gz yosys-a3bbc5365bc8ed411ab437a6baea5596531933a8.tar.bz2 yosys-a3bbc5365bc8ed411ab437a6baea5596531933a8.zip |
Merge branch 'pr_elab_sys_tasks' of https://github.com/udif/yosys into clifford/pr983
Diffstat (limited to 'tests')
-rw-r--r-- | tests/various/elab_sys_tasks.sv | 30 | ||||
-rw-r--r-- | tests/various/elab_sys_tasks.ys | 1 |
2 files changed, 31 insertions, 0 deletions
diff --git a/tests/various/elab_sys_tasks.sv b/tests/various/elab_sys_tasks.sv new file mode 100644 index 000000000..774d85b32 --- /dev/null +++ b/tests/various/elab_sys_tasks.sv @@ -0,0 +1,30 @@ +module test; +localparam X=1; +genvar i; +generate +if (X == 1) + $info("X is 1"); +if (X == 1) + $warning("X is 1"); +else + $error("X is not 1"); +case (X) + 1: $info("X is 1 in a case statement"); +endcase +//case (X-1) +// 1: $warn("X is 2"); +// default: $warn("X might be anything in a case statement"); +//endcase +for (i = 0; i < 3; i = i + 1) +begin + case(i) + 0: $info; + 1: $warning; + default: $info("default case statemnent"); + endcase +end + +$info("This is a standalone $info(). Next $info has no parameters"); +$info; +endgenerate +endmodule diff --git a/tests/various/elab_sys_tasks.ys b/tests/various/elab_sys_tasks.ys new file mode 100644 index 000000000..45bee3a60 --- /dev/null +++ b/tests/various/elab_sys_tasks.ys @@ -0,0 +1 @@ +read_verilog -sv elab_sys_tasks.sv |