summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTristan Gingold2015-11-30 06:43:17 +0100
committerTristan Gingold2015-11-30 20:10:25 +0100
commit7379c1371f2a83edbdf125a20b7565be983932dc (patch)
treef46d8486d4fce2666f3c6a2e6764075967406659 /src
parentc3845fa138a76f1369e20bc54016094a75da4df2 (diff)
downloadghdl-7379c1371f2a83edbdf125a20b7565be983932dc.tar.gz
ghdl-7379c1371f2a83edbdf125a20b7565be983932dc.tar.bz2
ghdl-7379c1371f2a83edbdf125a20b7565be983932dc.zip
Fix ghdl_simul build.
Diffstat (limited to 'src')
-rw-r--r--src/ghdldrv/ghdlsimul.adb4
-rw-r--r--src/vhdl/simulate/elaboration.adb16
-rw-r--r--src/vhdl/simulate/file_operation.adb8
-rw-r--r--src/vhdl/simulate/simulation.adb18
4 files changed, 15 insertions, 31 deletions
diff --git a/src/ghdldrv/ghdlsimul.adb b/src/ghdldrv/ghdlsimul.adb
index bf886e0..89d9f27 100644
--- a/src/ghdldrv/ghdlsimul.adb
+++ b/src/ghdldrv/ghdlsimul.adb
@@ -152,14 +152,14 @@ package body Ghdlsimul is
elsif Arg.all = "--stats" then
Simulation.Disp_Stats := True;
elsif Arg.all = "-i" then
+ Simulation.Flag_Debugger := True;
Simulation.Flag_Interractive := True;
else
Decode_Option (Arg.all, Status);
case Status is
when Decode_Option_Last =>
exit;
- when Decode_Option_Help =>
- -- FIXME: is that correct ?
+ when Decode_Option_Stop =>
exit;
when Decode_Option_Ok =>
null;
diff --git a/src/vhdl/simulate/elaboration.adb b/src/vhdl/simulate/elaboration.adb
index 18fcd10..a70a4ab 100644
--- a/src/vhdl/simulate/elaboration.adb
+++ b/src/vhdl/simulate/elaboration.adb
@@ -27,7 +27,6 @@ with Name_Table;
with File_Operation;
with Debugger; use Debugger;
with Iir_Chains; use Iir_Chains;
-with Sem_Names;
with Grt.Types; use Grt.Types;
with Simulation.AMS; use Simulation.AMS;
with Areapools; use Areapools;
@@ -1009,19 +1008,6 @@ package body Elaboration is
end loop;
end Elaborate_Generic_Map_Aspect;
- -- Return TRUE if EXPR is a signal name.
- function Is_Signal (Expr : Iir) return Boolean
- is
- Obj : Iir;
- begin
- Obj := Sem_Names.Name_To_Object (Expr);
- if Obj /= Null_Iir then
- return Is_Signal_Object (Obj);
- else
- return False;
- end if;
- end Is_Signal;
-
-- LRM93 12.2.3 The Port Clause
procedure Elaborate_Port_Declaration
(Instance : Block_Instance_Acc;
@@ -1112,7 +1098,7 @@ package body Elaboration is
and then Get_Out_Conversion (Assoc) = Null_Iir
then
Actual := Get_Actual (Assoc);
- if Is_Signal (Actual) then
+ if Is_Signal_Name (Actual) then
-- Association with a signal
Init_Expr := Execute_Signal_Init_Value
(Actual_Instance, Actual);
diff --git a/src/vhdl/simulate/file_operation.adb b/src/vhdl/simulate/file_operation.adb
index 33700fd..7addb3a 100644
--- a/src/vhdl/simulate/file_operation.adb
+++ b/src/vhdl/simulate/file_operation.adb
@@ -262,7 +262,7 @@ package body File_Operation is
Str : Iir_Value_Literal_Acc;
Length : Iir_Value_Literal_Acc)
is
- Res : Ghdl_Untruncated_Text_Read_Result;
+ Len : Std_Integer;
Val_Len : constant Ghdl_Index_Type :=
Ghdl_Index_Type (Str.Bounds.D (1).Length);
Val_Str : aliased Std_String_Uncons (1 .. Val_Len);
@@ -271,12 +271,12 @@ package body File_Operation is
To_Std_String_Boundp (Val_Bnd'Address));
begin
Ghdl_Untruncated_Text_Read
- (Res'Unrestricted_Access, File.File, Val'Unrestricted_Access);
- for I in 1 .. Res.Len loop
+ (File.File, Val'Unrestricted_Access, Len'Unrestricted_Access);
+ for I in 1 .. Len loop
Str.Val_Array.V (Iir_Index32 (I)).E32 :=
Character'Pos (Val_Str (Ghdl_Index_Type (I)));
end loop;
- Length.I64 := Ghdl_I64 (Res.Len);
+ Length.I64 := Ghdl_I64 (Len);
end Untruncated_Text_Read;
procedure Read_Binary (File: Iir_Value_Literal_Acc;
diff --git a/src/vhdl/simulate/simulation.adb b/src/vhdl/simulate/simulation.adb
index da15b87..97d80dc 100644
--- a/src/vhdl/simulate/simulation.adb
+++ b/src/vhdl/simulate/simulation.adb
@@ -25,7 +25,6 @@ with Types; use Types;
with Debugger; use Debugger;
with Simulation.AMS.Debugger;
with Areapools; use Areapools;
-with Grt.Stacks;
with Grt.Signals;
with Grt.Processes;
with Grt.Main;
@@ -546,7 +545,7 @@ package body Simulation is
-- LRM93 8.1
-- It also causes the execution of the corresponding process
-- statement to be suspended.
- Grt.Processes.Ghdl_Process_Wait_Wait;
+ Grt.Processes.Ghdl_Process_Wait_Suspend;
Instance.In_Wait_Flag := True;
Release (Marker, Expr_Pool);
return True;
@@ -554,7 +553,7 @@ package body Simulation is
-- LRM93 8.1
-- The suspended process will resume, at the latest, immediately
-- after the timeout interval has expired.
- if not Grt.Processes.Ghdl_Process_Wait_Has_Timeout then
+ if not Grt.Processes.Ghdl_Process_Wait_Timed_Out then
-- Compute the condition clause only if the timeout has not
-- expired.
@@ -572,7 +571,7 @@ package body Simulation is
-- re-suspend.
-- Such re-suspension does not involve the recalculation of
-- the timeout interval.
- Grt.Processes.Ghdl_Process_Wait_Wait;
+ Grt.Processes.Ghdl_Process_Wait_Suspend;
return True;
end if;
end if;
@@ -588,15 +587,15 @@ package body Simulation is
end Execute_Wait_Statement;
function To_Instance_Acc is new Ada.Unchecked_Conversion
- (System.Address, Grt.Stacks.Instance_Acc);
+ (System.Address, Grt.Processes.Instance_Acc);
- procedure Process_Executer (Self : Grt.Stacks.Instance_Acc);
+ procedure Process_Executer (Self : Grt.Processes.Instance_Acc);
pragma Convention (C, Process_Executer);
- procedure Process_Executer (Self : Grt.Stacks.Instance_Acc)
+ procedure Process_Executer (Self : Grt.Processes.Instance_Acc)
is
function To_Process_State_Acc is new Ada.Unchecked_Conversion
- (Grt.Stacks.Instance_Acc, Process_State_Acc);
+ (Grt.Processes.Instance_Acc, Process_State_Acc);
Process : Process_State_Acc renames
To_Process_State_Acc (Self);
@@ -909,7 +908,7 @@ package body Simulation is
use Grt.Processes;
El : Iir;
Instance : Block_Instance_Acc;
- Instance_Grt : Grt.Stacks.Instance_Acc;
+ Instance_Grt : Grt.Processes.Instance_Acc;
begin
Processes_State := new Process_State_Array (1 .. Processes_Table.Last);
@@ -1654,7 +1653,6 @@ package body Simulation is
procedure Simulation_Entity (Top_Conf : Iir_Design_Unit) is
begin
Top_Config := Top_Conf;
- Grt.Processes.One_Stack := True;
Grt.Errors.Error_Hook := Debug_Error'Access;