mirror of
https://github.com/steveicarus/iverilog.git
synced 2026-09-05 16:56:06 +02:00
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.
This commit is contained in:
+2
-2
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user