From b548dec070f49eeb959daff2af47f2345d4f952c Mon Sep 17 00:00:00 2001 From: Stephen Williams Date: Mon, 29 Sep 2008 22:04:28 -0700 Subject: [PATCH] Width of identifier accounts for expression minimum When the test_width method is called with a expression min width, then the PEIdent::test_width needs to honor that minimum. --- elab_expr.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/elab_expr.cc b/elab_expr.cc index d799ccd6f..dbed27030 100644 --- a/elab_expr.cc +++ b/elab_expr.cc @@ -1446,12 +1446,12 @@ unsigned PEIdent::test_width(Design*des, NetScope*scope, } if (use_width != UINT_MAX) - return use_width; + return max(use_width, min); // The width of a signal expression is the width of the signal. if (net != 0) { expr_type = net->data_type(); - return net->vector_width(); + return max(net->vector_width(), (unsigned long)min); } // The width of a parameter name is the width of the range for