Fix for br967 - allow real value for repeat statement loop length.
This commit is contained in:
parent
6aa8e49b09
commit
ce5c4ca8ba
|
|
@ -5013,6 +5013,10 @@ NetProc* PRepeat::elaborate(Design*des, NetScope*scope) const
|
|||
des->errors += 1;
|
||||
return 0;
|
||||
}
|
||||
// If the expression is real, convert to an integer. 64 bits
|
||||
// should be more enough for any real use case.
|
||||
if (expr->expr_type() == IVL_VT_REAL)
|
||||
expr = cast_to_int4(expr, 64);
|
||||
|
||||
NetProc*stat = statement_->elaborate(des, scope);
|
||||
if (stat == 0) return 0;
|
||||
|
|
|
|||
Loading…
Reference in New Issue