aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ghdldrv/ghdlsimul.adb2
-rw-r--r--src/vhdl/simulate/execution.adb6
2 files changed, 6 insertions, 2 deletions
diff --git a/src/ghdldrv/ghdlsimul.adb b/src/ghdldrv/ghdlsimul.adb
index c5e950836..2f28e7c09 100644
--- a/src/ghdldrv/ghdlsimul.adb
+++ b/src/ghdldrv/ghdlsimul.adb
@@ -184,6 +184,8 @@ package body Ghdlsimul is
Grtlink.Flag_String := Flags.Flag_String;
Simulation.Simulation_Entity (Top_Conf);
+
+ Set_Exit_Status (Exit_Status (Grt.Errors.Exit_Status));
end Run;
function Decode_Option (Option : String) return Boolean
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;