diff options
author | Tristan Gingold <tgingold@free.fr> | 2016-02-06 04:44:38 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2016-02-06 04:45:30 +0100 |
commit | b3403ccd4f9217b54592e964db419c83b3d86be1 (patch) | |
tree | d9f3e4907c90b6b36dbeef4e3d74f057d4ea3799 /src/vhdl/simulate/annotations.ads | |
parent | d8b55e17cad36f3f34f57434ab6c97b2c2afa964 (diff) | |
download | ghdl-b3403ccd4f9217b54592e964db419c83b3d86be1.tar.gz ghdl-b3403ccd4f9217b54592e964db419c83b3d86be1.tar.bz2 ghdl-b3403ccd4f9217b54592e964db419c83b3d86be1.zip |
simul: handle vhdl 2008.
Diffstat (limited to 'src/vhdl/simulate/annotations.ads')
-rw-r--r-- | src/vhdl/simulate/annotations.ads | 52 |
1 files changed, 31 insertions, 21 deletions
diff --git a/src/vhdl/simulate/annotations.ads b/src/vhdl/simulate/annotations.ads index a307e5394..3c605373a 100644 --- a/src/vhdl/simulate/annotations.ads +++ b/src/vhdl/simulate/annotations.ads @@ -39,6 +39,18 @@ package Annotations is -- Annotations are used to collect informations for elaboration and to -- locate iir_value_literal for signals, variables or constants. + -- The annotation depends on the kind of the node. + type Sim_Info_Kind is + (Kind_Block, Kind_Process, Kind_Frame, + Kind_Scalar_Type, Kind_File_Type, + Kind_Object, Kind_Signal, Kind_Range, + Kind_File, + Kind_Terminal, Kind_Quantity, + Kind_Environment); + + type Sim_Info_Type (Kind: Sim_Info_Kind); + type Sim_Info_Acc is access all Sim_Info_Type; + -- Scope corresponding to an object. type Scope_Kind_Type is ( @@ -59,7 +71,8 @@ package Annotations is when Scope_Kind_Frame => Depth : Scope_Depth_Type; when Scope_Kind_Pkg_Inst => - Pkg_Inst : Parameter_Slot_Type; + Pkg_Param : Parameter_Slot_Type; + Pkg_Parent : Sim_Info_Acc; when Scope_Kind_None => null; end case; @@ -68,43 +81,40 @@ package Annotations is type Instance_Slot_Type is new Integer; Invalid_Instance_Slot : constant Instance_Slot_Type := -1; - -- The annotation depends on the kind of the node. - type Sim_Info_Kind is - (Kind_Block, Kind_Process, Kind_Frame, - Kind_Scalar_Type, Kind_File_Type, - Kind_Object, Kind_Signal, Kind_Range, - Kind_File, - Kind_Terminal, Kind_Quantity, - Kind_Environment); - - type Sim_Info_Type (Kind: Sim_Info_Kind); - type Sim_Info_Acc is access all Sim_Info_Type; - -- Annotation for an iir node in order to be able to simulate it. type Sim_Info_Type (Kind: Sim_Info_Kind) is record case Kind is when Kind_Block | Kind_Frame - | Kind_Process => - -- Slot number in the parent (for blocks). - Inst_Slot : Instance_Slot_Type; - + | Kind_Process + | Kind_Environment => -- Scope level for this frame. Frame_Scope : Scope_Type; -- Number of objects/signals. Nbr_Objects : Object_Slot_Type; - -- Number of children (blocks, generate, instantiation). - Nbr_Instances : Instance_Slot_Type; + case Kind is + when Kind_Block => + -- Slot number in the parent (for blocks). + Inst_Slot : Instance_Slot_Type; + + -- Number of children (blocks, generate, instantiation). + Nbr_Instances : Instance_Slot_Type; + + when Kind_Environment => + Env_Slot : Object_Slot_Type; + + when others => + null; + end case; when Kind_Object | Kind_Signal | Kind_Range | Kind_File | Kind_Terminal - | Kind_Quantity - | Kind_Environment => + | Kind_Quantity => -- Block in which this object is declared in. Obj_Scope : Scope_Type; |