aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/synth/synth-expr.adb10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/synth/synth-expr.adb b/src/synth/synth-expr.adb
index 3c2504322..5c0abe189 100644
--- a/src/synth/synth-expr.adb
+++ b/src/synth/synth-expr.adb
@@ -1197,6 +1197,16 @@ package body Synth.Expr is
Error_Msg_Synth (+Expr, "non-constant mod not supported");
return null;
end if;
+ when Iir_Predefined_Integer_Exp =>
+ if Is_Const (Left) and then Is_Const (Right) then
+ return Create_Value_Discrete
+ (Left.Scal ** Natural (Right.Scal),
+ Get_Value_Type (Syn_Inst, Get_Type (Expr)));
+ else
+ Error_Msg_Synth
+ (+Expr, "non-constant exponentiation not supported");
+ return null;
+ end if;
when Iir_Predefined_Integer_Less_Equal =>
if Is_Const (Left) and then Is_Const (Right) then
return Create_Value_Discrete