aboutsummaryrefslogtreecommitdiffstats
path: root/tests/various
diff options
context:
space:
mode:
authorclairexen <claire@symbioticeda.com>2020-07-01 16:41:32 +0200
committerGitHub <noreply@github.com>2020-07-01 16:41:32 +0200
commit7450ee7f8a547aa72d3afa0638af2190cc52c6a9 (patch)
tree3c965859c5758a818a62303fedc92abded2ccfd8 /tests/various
parent8ce4f8790ecf33f7df19e0fb54a749abe026831d (diff)
parent76a34dc5f3a60c89efeaa3378ca0e2700a8aebd2 (diff)
downloadyosys-7450ee7f8a547aa72d3afa0638af2190cc52c6a9.tar.gz
yosys-7450ee7f8a547aa72d3afa0638af2190cc52c6a9.tar.bz2
yosys-7450ee7f8a547aa72d3afa0638af2190cc52c6a9.zip
Merge pull request #2203 from antmicro/fix-grammar
Signed and macro grammar update
Diffstat (limited to 'tests/various')
-rw-r--r--tests/various/signed.ys28
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/various/signed.ys b/tests/various/signed.ys
new file mode 100644
index 000000000..2319a5da1
--- /dev/null
+++ b/tests/various/signed.ys
@@ -0,0 +1,28 @@
+# SV LRM A2.2.1
+
+read_verilog -sv <<EOT
+module test_signed();
+parameter integer signed a = 0;
+parameter integer unsigned b = 0;
+
+endmodule
+EOT
+
+design -reset
+read_verilog -sv <<EOT
+module test_signed();
+parameter logic signed [7:0] a = 0;
+parameter logic unsigned [7:0] b = 0;
+
+endmodule
+EOT
+
+design -reset
+logger -expect error "syntax error, unexpected TOK_INTEGER" 1
+read_verilog -sv <<EOT
+module test_signed();
+parameter signed integer a = 0;
+parameter unsigned integer b = 0;
+
+endmodule
+EOT