summaryrefslogtreecommitdiff
path: root/simulate/execution.adb
diff options
context:
space:
mode:
authorTristan Gingold2014-06-27 05:10:13 +0200
committerTristan Gingold2014-06-27 05:10:13 +0200
commit788ee650988ef93a947c6804c45dda54ed7d7c4f (patch)
tree6ae777e238be257900fdf2110b10da4a07b541c0 /simulate/execution.adb
parent7fe7bdb1b5b0250c213526208a03445f58fba92d (diff)
downloadghdl-788ee650988ef93a947c6804c45dda54ed7d7c4f.tar.gz
ghdl-788ee650988ef93a947c6804c45dda54ed7d7c4f.tar.bz2
ghdl-788ee650988ef93a947c6804c45dda54ed7d7c4f.zip
simulate: fix nbr_objects, improve display of arrays.
Diffstat (limited to 'simulate/execution.adb')
-rw-r--r--simulate/execution.adb17
1 files changed, 15 insertions, 2 deletions
diff --git a/simulate/execution.adb b/simulate/execution.adb
index 3568e9d..146660f 100644
--- a/simulate/execution.adb
+++ b/simulate/execution.adb
@@ -653,6 +653,13 @@ package body Execution is
raise Internal_Error;
end case;
+ when Iir_Predefined_Integer_Minimum =>
+ Eval_Right;
+ Result := Create_I64_Value (Ghdl_I64'Min (Left.I64, Right.I64));
+ when Iir_Predefined_Integer_Maximum =>
+ Eval_Right;
+ Result := Create_I64_Value (Ghdl_I64'Max (Left.I64, Right.I64));
+
when Iir_Predefined_Floating_Mul =>
Eval_Right;
Result := Create_F64_Value (Left.F64 * Right.F64);
@@ -687,6 +694,13 @@ package body Execution is
Eval_Right;
Result := Boolean_To_Lit (Left.F64 >= Right.F64);
+ when Iir_Predefined_Floating_Minimum =>
+ Eval_Right;
+ Result := Create_F64_Value (Ghdl_F64'Min (Left.F64, Right.F64));
+ when Iir_Predefined_Floating_Maximum =>
+ Eval_Right;
+ Result := Create_F64_Value (Ghdl_F64'Max (Left.F64, Right.F64));
+
when Iir_Predefined_Integer_Physical_Mul =>
Eval_Right;
Result := Create_I64_Value (Left.I64 * Right.I64);
@@ -793,8 +807,7 @@ package body Execution is
when others =>
Error_Msg ("execute_implicit_function: unimplemented " &
- Iir_Predefined_Functions'Image
- (Get_Implicit_Definition (Expr)));
+ Iir_Predefined_Functions'Image (Func));
raise Internal_Error;
end case;
return Result;