aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/synth/synth-oper.adb4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/synth/synth-oper.adb b/src/synth/synth-oper.adb
index 6a31efdc5..d98e925a4 100644
--- a/src/synth/synth-oper.adb
+++ b/src/synth/synth-oper.adb
@@ -1127,13 +1127,15 @@ package body Synth.Oper is
| Iir_Predefined_Ieee_Std_Logic_Arith_Conv_Unsigned_Int =>
declare
Arg : constant Value_Acc := Get_Value (Subprg_Inst, Param1);
- Size : constant Value_Acc := Get_Value (Subprg_Inst, Param2);
+ Size : Value_Acc;
Arg_Net : Net;
begin
+ Size := Get_Value (Subprg_Inst, Param2);
if not Is_Const (Size) then
Error_Msg_Synth (+Expr, "to_unsigned size must be constant");
return Arg;
else
+ Strip_Const (Size);
-- FIXME: what if the arg is constant too ?
if Is_Const (Arg) then
return Eval_To_Unsigned