aboutsummaryrefslogtreecommitdiffstats
path: root/tests/verilog/param_no_default_unbound_2.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/param_no_default_unbound_2.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/param_no_default_unbound_2.ys')
-rw-r--r--tests/verilog/param_no_default_unbound_2.ys12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/verilog/param_no_default_unbound_2.ys b/tests/verilog/param_no_default_unbound_2.ys
new file mode 100644
index 000000000..4b7f3b028
--- /dev/null
+++ b/tests/verilog/param_no_default_unbound_2.ys
@@ -0,0 +1,12 @@
+read_verilog -sv <<EOF
+module Example #(
+ parameter X, Y
+);
+endmodule
+module top;
+ Example e();
+endmodule
+EOF
+
+logger -expect error "Parameter `\\X' has no default value and has not been overridden!" 1
+hierarchy -top top