diff options
Diffstat (limited to 'src/vhdl')
-rw-r--r-- | src/vhdl/simulate/elaboration.adb | 4 | ||||
-rw-r--r-- | src/vhdl/simulate/elaboration.ads | 9 | ||||
-rw-r--r-- | src/vhdl/simulate/execution.adb | 1 |
3 files changed, 13 insertions, 1 deletions
diff --git a/src/vhdl/simulate/elaboration.adb b/src/vhdl/simulate/elaboration.adb index 14a915ec2..33868a804 100644 --- a/src/vhdl/simulate/elaboration.adb +++ b/src/vhdl/simulate/elaboration.adb @@ -21,7 +21,6 @@ with Str_Table; with Errorout; use Errorout; with Evaluation; with Execution; use Execution; ---with Simulation; use Simulation; with Iirs_Utils; use Iirs_Utils; with Libraries; with Name_Table; @@ -318,8 +317,11 @@ package body Elaboration is Obj_Info : constant Sim_Info_Acc := Get_Info (Obj); Res : Block_Instance_Acc; begin + Nbr_Block_Instances := Nbr_Block_Instances + 1; + Res := new Block_Instance_Type' (Max_Objs => Obj_Info.Nbr_Objects, + Id => Nbr_Block_Instances, Block_Scope => Obj_Info.Frame_Scope, Up_Block => Father, Label => Stmt, diff --git a/src/vhdl/simulate/elaboration.ads b/src/vhdl/simulate/elaboration.ads index b7ff6b70c..91cb04f7b 100644 --- a/src/vhdl/simulate/elaboration.ads +++ b/src/vhdl/simulate/elaboration.ads @@ -39,6 +39,12 @@ package Elaboration is type Objects_Array is array (Object_Slot_Type range <>) of Iir_Value_Literal_Acc; + type Block_Instance_Id is new Natural; + No_Block_Instance_Id : constant Block_Instance_Id := 0; + + -- Number of block instances and also Id of the last one. + Nbr_Block_Instances : Block_Instance_Id := 0; + -- A block instance with its architecture/entity declaration is an -- instancied entity. @@ -46,6 +52,8 @@ package Elaboration is -- Flag for wait statement: true if not yet executed. In_Wait_Flag : Boolean; + Id : Block_Instance_Id; + -- Useful informations for a dynamic block (ie, a frame). -- The scope level and an access to the block of upper scope level. Block_Scope : Scope_Type; @@ -142,6 +150,7 @@ package Elaboration is type Package_Instances_Array is array (Pkg_Index_Type range <>) of Block_Instance_Acc; type Package_Instances_Array_Acc is access Package_Instances_Array; + Package_Instances : Package_Instances_Array_Acc; -- Disconnections. For each disconnection specification, the elaborator diff --git a/src/vhdl/simulate/execution.adb b/src/vhdl/simulate/execution.adb index 573f44495..b391ee575 100644 --- a/src/vhdl/simulate/execution.adb +++ b/src/vhdl/simulate/execution.adb @@ -3320,6 +3320,7 @@ package body Execution is (Alloc_Block_Instance (Instance_Pool, Block_Instance_Type'(Max_Objs => Func_Info.Nbr_Objects, + Id => No_Block_Instance_Id, Block_Scope => Get_Info (Label).Frame_Scope, Up_Block => Up_Block, Label => Label, |