diff options
-rw-r--r-- | src/vhdl/simulate/annotations.adb | 19 | ||||
-rw-r--r-- | src/vhdl/simulate/annotations.ads | 10 |
2 files changed, 22 insertions, 7 deletions
diff --git a/src/vhdl/simulate/annotations.adb b/src/vhdl/simulate/annotations.adb index 484b9911d..ac5be1962 100644 --- a/src/vhdl/simulate/annotations.adb +++ b/src/vhdl/simulate/annotations.adb @@ -108,7 +108,8 @@ package body Annotations is | Kind_Process | Kind_Frame | Kind_Scalar_Type - | Kind_File_Type => + | Kind_File_Type + | Kind_Extra => raise Internal_Error; end case; Set_Info (Obj, Info); @@ -1257,10 +1258,13 @@ package body Annotations is -- Disp annotations for an iir node. procedure Disp_Vhdl_Info (Node: Iir) is use Ada.Text_IO; - Indent: Count; - Info: Sim_Info_Acc; + Info : constant Sim_Info_Acc := Get_Info (Node); + Indent : Count; begin - Info := Get_Info (Node); + if Info = null then + return; + end if; + Indent := Col; case Info.Kind is when Kind_Block => @@ -1281,7 +1285,8 @@ package body Annotations is Put_Line ("-- slot:" & Object_Slot_Type'Image (Info.Slot) & ", scope:" & Image (Info.Obj_Scope)); when Kind_Scalar_Type - | Kind_File_Type => + | Kind_File_Type + | Kind_Extra => null; end case; end Disp_Vhdl_Info; @@ -1313,7 +1318,9 @@ package body Annotations is | Kind_Terminal | Kind_Quantity | Kind_Environment | Kind_PSL => Put_Line ("slot:" & Object_Slot_Type'Image (Info.Slot) - & ", scope:" & Image (Info.Obj_Scope)); + & ", scope:" & Image (Info.Obj_Scope)); + when Kind_Extra => + Put_Line ("extra:" & Extra_Slot_Type'Image (Info.Extra_Slot)); when Kind_Scalar_Type => Put_Line ("scalar type: " & Iir_Value_Kind'Image (Info.Scalar_Mode)); diff --git a/src/vhdl/simulate/annotations.ads b/src/vhdl/simulate/annotations.ads index 8960258a2..9b99f977d 100644 --- a/src/vhdl/simulate/annotations.ads +++ b/src/vhdl/simulate/annotations.ads @@ -36,6 +36,10 @@ package Annotations is type Pkg_Index_Type is new Natural; Nbr_Packages : Pkg_Index_Type := 0; + -- For Kind_Extra: a number. Kind_Extra is not used by annotations, and + -- is free for another pass like preelab. + type Extra_Slot_Type is new Natural; + -- Annotations are used to collect informations for elaboration and to -- locate iir_value_literal for signals, variables or constants. @@ -47,7 +51,8 @@ package Annotations is Kind_File, Kind_Terminal, Kind_Quantity, Kind_Environment, - Kind_PSL); + Kind_PSL, + Kind_Extra); type Sim_Info_Type (Kind: Sim_Info_Kind); type Sim_Info_Acc is access all Sim_Info_Type; @@ -127,6 +132,9 @@ package Annotations is when Kind_File_Type => File_Signature : String_Acc; + + when Kind_Extra => + Extra_Slot : Extra_Slot_Type; end case; end record; |