aboutsummaryrefslogtreecommitdiffstats
path: root/tests/verilog/localparam_no_default_1.ys
diff options
context:
space:
mode:
authorZachary Snow <zach@zachjs.com>2021-03-02 10:43:53 -0500
committerZachary Snow <zach@zachjs.com>2021-03-02 10:43:53 -0500
commitd738b2c1272b02d8799e9feda83b1eae8ba10c07 (patch)
tree5edd76126d7c9969f3dfd695e7fad415d364fec9 /tests/verilog/localparam_no_default_1.ys
parent375af199ef4df45ccf02c66e0171b4282c6cf1eb (diff)
downloadyosys-d738b2c1272b02d8799e9feda83b1eae8ba10c07.tar.gz
yosys-d738b2c1272b02d8799e9feda83b1eae8ba10c07.tar.bz2
yosys-d738b2c1272b02d8799e9feda83b1eae8ba10c07.zip
sv: support for parameters without default values
- Modules with a parameter without a default value will be automatically deferred until the hierarchy pass - Allows for parameters without defaults as module items, rather than just int the `parameter_port_list`, despite being forbidden in the LRM - Check for parameters without defaults that haven't been overriden - Add location info to parameter/localparam declarations
Diffstat (limited to 'tests/verilog/localparam_no_default_1.ys')
-rw-r--r--tests/verilog/localparam_no_default_1.ys17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/verilog/localparam_no_default_1.ys b/tests/verilog/localparam_no_default_1.ys
new file mode 100644
index 000000000..426a48a1c
--- /dev/null
+++ b/tests/verilog/localparam_no_default_1.ys
@@ -0,0 +1,17 @@
+logger -expect-no-warnings
+read_verilog -sv <<EOF
+module Module #(
+ localparam X = 1
+);
+endmodule
+EOF
+
+design -reset
+
+logger -expect error "localparam initialization is missing!" 1
+read_verilog <<EOF
+module Module #(
+ localparam X
+);
+endmodule
+EOF