diff options
author | Tristan Gingold <tgingold@free.fr> | 2017-02-22 07:51:27 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2017-02-22 07:51:27 +0100 |
commit | c1e39ee2038b36ac1d7455f42a33564133e8d6ea (patch) | |
tree | a6835ab789f591f95ad81b86e405dffa835418c5 /src/grt/grt-waves.adb | |
parent | 58e1d46280fa86b0c369d9134d51b90771b9a25c (diff) | |
download | ghdl-c1e39ee2038b36ac1d7455f42a33564133e8d6ea.tar.gz ghdl-c1e39ee2038b36ac1d7455f42a33564133e8d6ea.tar.bz2 ghdl-c1e39ee2038b36ac1d7455f42a33564133e8d6ea.zip |
rtis/vcd/ghw: handle record subtypes.
Diffstat (limited to 'src/grt/grt-waves.adb')
-rw-r--r-- | src/grt/grt-waves.adb | 50 |
1 files changed, 34 insertions, 16 deletions
diff --git a/src/grt/grt-waves.adb b/src/grt/grt-waves.adb index 43ae4ec73..8e2751268 100644 --- a/src/grt/grt-waves.adb +++ b/src/grt/grt-waves.adb @@ -637,9 +637,9 @@ package body Grt.Waves is end; when Ghdl_Rtik_Type_Array => declare - Arr : Ghdl_Rtin_Type_Array_Acc; + Arr : constant Ghdl_Rtin_Type_Array_Acc := + To_Ghdl_Rtin_Type_Array_Acc (Rti); begin - Arr := To_Ghdl_Rtin_Type_Array_Acc (Rti); Create_String_Id (Arr.Name); Create_Type (Arr.Element, N_Ctxt); for I in 1 .. Arr.Nbr_Dim loop @@ -648,9 +648,9 @@ package body Grt.Waves is end; when Ghdl_Rtik_Subtype_Scalar => declare - Sub : Ghdl_Rtin_Subtype_Scalar_Acc; + Sub : constant Ghdl_Rtin_Subtype_Scalar_Acc := + To_Ghdl_Rtin_Subtype_Scalar_Acc (Rti); begin - Sub := To_Ghdl_Rtin_Subtype_Scalar_Acc (Rti); Create_String_Id (Sub.Name); Create_Type (Sub.Basetype, N_Ctxt); end; @@ -690,6 +690,14 @@ package body Grt.Waves is Create_Type (El.Eltype, N_Ctxt); end loop; end; + when Ghdl_Rtik_Subtype_Record => + declare + Rec : constant Ghdl_Rtin_Subtype_Composite_Acc := + To_Ghdl_Rtin_Subtype_Composite_Acc (Rti); + begin + Create_String_Id (Rec.Name); + Create_Type (Rec.Basetype, N_Ctxt); + end; when others => Internal_Error ("wave.create_type"); -- Internal_Error ("wave.create_type: does not handle " & @@ -1200,6 +1208,8 @@ package body Grt.Waves is return Ghw_Rtik_Type_Array; when Ghdl_Rtik_Type_Record => return Ghw_Rtik_Type_Record; + when Ghdl_Rtik_Subtype_Record => + return Ghw_Rtik_Subtype_Record; when Ghdl_Rtik_Subtype_Scalar => return Ghw_Rtik_Subtype_Scalar; when Ghdl_Rtik_Type_I32 => @@ -1302,9 +1312,9 @@ package body Grt.Waves is when Ghdl_Rtik_Type_B1 | Ghdl_Rtik_Type_E8 => declare - Enum : Ghdl_Rtin_Type_Enum_Acc; + Enum : constant Ghdl_Rtin_Type_Enum_Acc := + To_Ghdl_Rtin_Type_Enum_Acc (Rti); begin - Enum := To_Ghdl_Rtin_Type_Enum_Acc (Rti); Write_String_Id (Enum.Name); Wave_Put_ULEB128 (Ghdl_E32 (Enum.Nbr)); for I in 1 .. Enum.Nbr loop @@ -1333,9 +1343,9 @@ package body Grt.Waves is end; when Ghdl_Rtik_Type_Array => declare - Arr : Ghdl_Rtin_Type_Array_Acc; + Arr : constant Ghdl_Rtin_Type_Array_Acc := + To_Ghdl_Rtin_Type_Array_Acc (Rti); begin - Arr := To_Ghdl_Rtin_Type_Array_Acc (Rti); Write_String_Id (Arr.Name); Write_Type_Id (Arr.Element, Ctxt); Wave_Put_ULEB128 (Ghdl_E32 (Arr.Nbr_Dim)); @@ -1345,10 +1355,10 @@ package body Grt.Waves is end; when Ghdl_Rtik_Type_Record => declare - Rec : Ghdl_Rtin_Type_Record_Acc; + Rec : constant Ghdl_Rtin_Type_Record_Acc := + To_Ghdl_Rtin_Type_Record_Acc (Rti); El : Ghdl_Rtin_Element_Acc; begin - Rec := To_Ghdl_Rtin_Type_Record_Acc (Rti); Write_String_Id (Rec.Name); Wave_Put_ULEB128 (Ghdl_E32 (Rec.Nbrel)); for I in 1 .. Rec.Nbrel loop @@ -1357,11 +1367,19 @@ package body Grt.Waves is Write_Type_Id (El.Eltype, Ctxt); end loop; end; + when Ghdl_Rtik_Subtype_Record => + declare + Arr : constant Ghdl_Rtin_Subtype_Composite_Acc := + To_Ghdl_Rtin_Subtype_Composite_Acc (Rti); + begin + Write_String_Id (Arr.Name); + Write_Type_Id (Arr.Basetype, Ctxt); + end; when Ghdl_Rtik_Subtype_Scalar => declare - Sub : Ghdl_Rtin_Subtype_Scalar_Acc; + Sub : constant Ghdl_Rtin_Subtype_Scalar_Acc := + To_Ghdl_Rtin_Subtype_Scalar_Acc (Rti); begin - Sub := To_Ghdl_Rtin_Subtype_Scalar_Acc (Rti); Write_String_Id (Sub.Name); Write_Type_Id (Sub.Basetype, Ctxt); Write_Range @@ -1374,18 +1392,18 @@ package body Grt.Waves is | Ghdl_Rtik_Type_I64 | Ghdl_Rtik_Type_F64 => declare - Base : Ghdl_Rtin_Type_Scalar_Acc; + Base : constant Ghdl_Rtin_Type_Scalar_Acc := + To_Ghdl_Rtin_Type_Scalar_Acc (Rti); begin - Base := To_Ghdl_Rtin_Type_Scalar_Acc (Rti); Write_String_Id (Base.Name); end; when Ghdl_Rtik_Type_P32 | Ghdl_Rtik_Type_P64 => declare - Base : Ghdl_Rtin_Type_Physical_Acc; + Base : constant Ghdl_Rtin_Type_Physical_Acc := + To_Ghdl_Rtin_Type_Physical_Acc (Rti); Unit : Ghdl_Rti_Access; begin - Base := To_Ghdl_Rtin_Type_Physical_Acc (Rti); Write_String_Id (Base.Name); Wave_Put_ULEB128 (Ghdl_U32 (Base.Nbr)); for I in 1 .. Base.Nbr loop |