aboutsummaryrefslogtreecommitdiffstats
path: root/src/vhdl/simulate
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2016-02-11 07:54:09 +0100
committerTristan Gingold <tgingold@free.fr>2016-02-14 13:52:33 +0100
commit99049b0dfebc774c7dfd6d3dc075159b1d3645fd (patch)
tree793553336b4fdc28185076799e828668e969261d /src/vhdl/simulate
parentc766b691210c1c3e25c58fbbbe68de14784a62b1 (diff)
downloadghdl-99049b0dfebc774c7dfd6d3dc075159b1d3645fd.tar.gz
ghdl-99049b0dfebc774c7dfd6d3dc075159b1d3645fd.tar.bz2
ghdl-99049b0dfebc774c7dfd6d3dc075159b1d3645fd.zip
simul: return the exit status set by std.env
Diffstat (limited to 'src/vhdl/simulate')
-rw-r--r--src/vhdl/simulate/execution.adb6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/vhdl/simulate/execution.adb b/src/vhdl/simulate/execution.adb
index 3d6cfd3d3..692289a57 100644
--- a/src/vhdl/simulate/execution.adb
+++ b/src/vhdl/simulate/execution.adb
@@ -42,6 +42,7 @@ with Grt_Interface;
with Grt.Values;
with Grt.Errors;
with Grt.Std_Logic_1164;
+with Grt.Lib;
with Sem_Inst;
package body Execution is
@@ -1560,8 +1561,9 @@ package body Execution is
File_Operation.Untruncated_Text_Read
(Args (0), Args (1), Args (2));
when Std_Names.Name_Control_Simulation =>
- Put_Line (Standard_Error, "simulation finished");
- raise Simulation_Finished;
+ Grt.Lib.Ghdl_Control_Simulation
+ (Args (0).B1, Args (1).B1, Std_Integer (Args (2).I64));
+ -- Do not return.
when others =>
Error_Msg_Exec ("unsupported foreign procedure call", Stmt);
end case;