Support parameter value ranges on localparams

Verilog-AMS defines parameter value ranges which can restrict the value
that can be assigned to a parameter. It defines this for both `parameter`
and `localparam`. Currently it is only implemented for `parameter`. Support
it for `localparam` as well for consistency.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
This commit is contained in:
Lars-Peter Clausen 2022-01-23 21:06:38 +01:00
parent ac040dae42
commit 0b30894f81
1 changed files with 2 additions and 2 deletions

View File

@ -5688,10 +5688,10 @@ parameter_assign
;
localparam_assign
: IDENTIFIER '=' expression
: IDENTIFIER '=' expression parameter_value_ranges_opt
{ PExpr*tmp = $3;
pform_set_parameter(@1, lex_strings.make($1), true, param_data_type,
tmp, 0);
tmp, $4);
delete[]$1;
}
;