From b6af90fe20bc92631061c48c328f3c6e4760e4df Mon Sep 17 00:00:00 2001 From: Zachary Snow Date: Sun, 21 Feb 2021 14:45:21 -0500 Subject: verilog: fix sizing of constant args for tasks/functions - Simplify synthetic localparams for normal calls to update their width - This step was inadvertently removed alongside `added_mod_children` - Support redeclaration of constant function arguments - `eval_const_function` never correctly handled this, but the issue was not exposed in the existing tests until the recent change to always attempt constant function evaluation when all-const args are used - Check asserts in const_arg_loop and const_func tests - Add coverage for width mismatch error cases --- tests/verilog/func_arg_mismatch_4.ys | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 tests/verilog/func_arg_mismatch_4.ys (limited to 'tests/verilog/func_arg_mismatch_4.ys') diff --git a/tests/verilog/func_arg_mismatch_4.ys b/tests/verilog/func_arg_mismatch_4.ys new file mode 100644 index 000000000..87ec1c299 --- /dev/null +++ b/tests/verilog/func_arg_mismatch_4.ys @@ -0,0 +1,12 @@ +logger -expect error "Incompatible re-declaration of constant function wire" 1 +read_verilog -sv <