Fix width of localparam created from genvar when using -gstrict-expr-width.
(cherry picked from commit c4883da334)
This commit is contained in:
parent
84b4ebee0c
commit
59b67b69f6
|
|
@ -966,7 +966,11 @@ bool PGenerate::generate_scope_loop_(Design*des, NetScope*container)
|
||||||
// block. Code within this scope thus has access to the
|
// block. Code within this scope thus has access to the
|
||||||
// genvar as a constant.
|
// genvar as a constant.
|
||||||
{
|
{
|
||||||
verinum genvar_verinum(genvar);
|
verinum genvar_verinum;
|
||||||
|
if (gn_strict_expr_width_flag)
|
||||||
|
genvar_verinum = verinum(genvar, integer_width);
|
||||||
|
else
|
||||||
|
genvar_verinum = verinum(genvar);
|
||||||
genvar_verinum.has_sign(true);
|
genvar_verinum.has_sign(true);
|
||||||
NetEConstParam*gp = new NetEConstParam(scope,
|
NetEConstParam*gp = new NetEConstParam(scope,
|
||||||
loop_index,
|
loop_index,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue