Add signed/unsigned tests
authorKamil Rakoczy <krakoczy@antmicro.com>
Fri, 26 Jun 2020 13:35:35 +0000 (15:35 +0200)
committerKamil Rakoczy <krakoczy@antmicro.com>
Fri, 26 Jun 2020 13:38:20 +0000 (15:38 +0200)
Signed-off-by: Kamil Rakoczy <krakoczy@antmicro.com>
tests/various/signed.ys [new file with mode: 0644]

diff --git a/tests/various/signed.ys b/tests/various/signed.ys
new file mode 100644 (file)
index 0000000..2319a5d
--- /dev/null
@@ -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