diff options
author | gingold | 2009-09-23 01:27:43 +0000 |
---|---|---|
committer | gingold | 2009-09-23 01:27:43 +0000 |
commit | 96f253a7da077fa1b39f7531ab7ea446ad5f10ec (patch) | |
tree | f8384ef94da436a9de65baa41589e2d1910ca1ac /translate/grt/grt-signals.adb | |
parent | 998b7c816c7a675eeefde03d4a05b2b8614207ed (diff) | |
download | ghdl-96f253a7da077fa1b39f7531ab7ea446ad5f10ec.tar.gz ghdl-96f253a7da077fa1b39f7531ab7ea446ad5f10ec.tar.bz2 ghdl-96f253a7da077fa1b39f7531ab7ea446ad5f10ec.zip |
Improve handling of non-sensitized processes.
Diffstat (limited to 'translate/grt/grt-signals.adb')
-rw-r--r-- | translate/grt/grt-signals.adb | 31 |
1 files changed, 13 insertions, 18 deletions
diff --git a/translate/grt/grt-signals.adb b/translate/grt/grt-signals.adb index 1cdd1b5..bbbc736 100644 --- a/translate/grt/grt-signals.adb +++ b/translate/grt/grt-signals.adb @@ -266,9 +266,9 @@ package body Grt.Signals is / System.Storage_Unit); end Size; - Id : Process_Id; + Proc : Process_Acc; begin - Id := Get_Current_Process_Id; + Proc := Get_Current_Process; if Sign.S.Nbr_Drivers = 0 then Check_New_Source (Sign); Sign.S.Drivers := Malloc (Size (1)); @@ -276,7 +276,7 @@ package body Grt.Signals is else -- Do not create a driver twice. for I in 0 .. Sign.S.Nbr_Drivers - 1 loop - if Sign.S.Drivers (I).Proc = Id then + if Sign.S.Drivers (I).Proc = Proc then return True; end if; end loop; @@ -287,7 +287,7 @@ package body Grt.Signals is Sign.S.Drivers (Sign.S.Nbr_Drivers - 1) := (First_Trans => Trans, Last_Trans => Trans, - Proc => Id); + Proc => Proc); return False; end Ghdl_Signal_Add_Driver; @@ -444,14 +444,14 @@ package body Grt.Signals is function Find_Driver (Sig : Ghdl_Signal_Ptr) return Ghdl_Index_Type is - Id : Process_Id; + Proc : Process_Acc; begin if Sig.S.Drivers = null then Error ("assignment to a signal without any driver"); end if; - Id := Get_Current_Process_Id; + Proc := Get_Current_Process; for I in 0 .. Sig.S.Nbr_Drivers - 1 loop - if Sig.S.Drivers (I).Proc = Id then + if Sig.S.Drivers (I).Proc = Proc then return I; end if; end loop; @@ -460,14 +460,14 @@ package body Grt.Signals is function Get_Driver (Sig : Ghdl_Signal_Ptr) return Driver_Acc is - Id : Process_Id; + Proc : Process_Acc; begin if Sig.S.Drivers = null then return null; end if; - Id := Get_Current_Process_Id; + Proc := Get_Current_Process; for I in 0 .. Sig.S.Nbr_Drivers - 1 loop - if Sig.S.Drivers (I).Proc = Id then + if Sig.S.Drivers (I).Proc = Proc then return Sig.S.Drivers (I)'Access; end if; end loop; @@ -1815,11 +1815,11 @@ package body Grt.Signals is end Call_Conversion_Function; procedure Resume_Process_If_Event - (Sig : Ghdl_Signal_Ptr; Proc : Process_Id) + (Sig : Ghdl_Signal_Ptr; Proc : Process_Acc) is El : Action_List_Acc; begin - El := new Action_List'(Kind => Action_Process, + El := new Action_List'(Dynamic => False, Proc => Proc, Next => Sig.Event_List); Sig.Event_List := El; @@ -2745,12 +2745,7 @@ package body Grt.Signals is El := Sig.Event_List; while El /= null loop - case El.Kind is - when Action_Process => - Resume_Process (El.Proc); - when Action_Signal => - Internal_Error ("set_effective_value"); - end case; + Resume_Process (El.Proc); El := El.Next; end loop; end if; |