Skip to content

Commit b04b325

Browse files
committed
Suggestion: Move parameter into module in number_test
I'm working on validating a parser for Verilog-AMS, which is basically vanilla verilog + extensions + some backports from SystemVerilog. Because of this shared heritage, quite a number of the tests in this repository are applicable and helpful. The number_test tests are useful also, because they test lexing of numberic literals. There are two tests (_3 and _4) that test SystemVerilog extensions, but the remainder are Vanilla verilog modulo the fact that `parameter` statements can't appear at top level in vanilla Verilog. By moving the parameter statements inside the model, the test would be valid in both vanilla and System Verilog. I understand that this is not a Verilog-AMS test suite, but I was hoping you might be open to generalizing the test files where the particular feature being tested itself is not a SystemVerilog extension, such that we may share some of these testcases between this repository and our Verilog-AMS test suite.
1 parent 3aa74ac commit b04b325

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+55
-110
lines changed

tests/generic/number/number_test_0.sv

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
:description: Test
44
:tags: 5.6.4 5.7.1 5.7.2
55
*/
6-
parameter foo = 0;
7-
86
module test;
7+
parameter foo = 0;
98
endmodule

tests/generic/number/number_test_1.sv

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
:description: Test
44
:tags: 5.6.4 5.7.1 5.7.2
55
*/
6-
parameter int foo = 0;
7-
86
module test;
7+
parameter integer foo = 0;
98
endmodule

tests/generic/number/number_test_10.sv

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
:description: Test
44
:tags: 5.6.4 5.7.1 5.7.2
55
*/
6-
parameter int foo = 1'bx;
7-
86
module test;
7+
parameter integer foo = 1'bx;
98
endmodule

tests/generic/number/number_test_11.sv

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
:description: Test
44
:tags: 5.6.4 5.7.1 5.7.2
55
*/
6-
parameter int foo = 1 'b x;
7-
86
module test;
7+
parameter integer foo = 1 'b x;
98
endmodule

tests/generic/number/number_test_12.sv

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
:description: Test
44
:tags: 5.6.4 5.7.1 5.7.2
55
*/
6-
parameter int foo = 1'bz;
7-
86
module test;
7+
parameter integer foo = 1'bz;
98
endmodule

tests/generic/number/number_test_13.sv

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
:description: Test
44
:tags: 5.6.4 5.7.1 5.7.2
55
*/
6-
parameter int foo = 4'bxxxx;
7-
86
module test;
7+
parameter integer foo = 4'bxxxx;
98
endmodule

tests/generic/number/number_test_14.sv

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
:description: Test
44
:tags: 5.6.4 5.7.1 5.7.2
55
*/
6-
parameter int foo = 4'bzzzz;
7-
86
module test;
7+
parameter integer foo = 4'bzzzz;
98
endmodule

tests/generic/number/number_test_15.sv

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
:description: Test
44
:tags: 5.6.4 5.7.1 5.7.2
55
*/
6-
parameter int foo = 4'sb1111;
7-
86
module test;
7+
parameter integer foo = 4'sb1111;
98
endmodule

tests/generic/number/number_test_16.sv

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
:description: Test
44
:tags: 5.6.4 5.7.1 5.7.2
55
*/
6-
parameter int foo = 4'Sb0000;
7-
86
module test;
7+
parameter integer foo = 4'Sb0000;
98
endmodule

tests/generic/number/number_test_2.sv

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
:description: Test
44
:tags: 5.6.4 5.7.1 5.7.2
55
*/
6-
parameter int foo = '0;
7-
86
module test;
7+
parameter integer foo = '0;
98
endmodule

0 commit comments

Comments
 (0)