diff options
-rw-r--r-- | src/grt/grt-avhpi_utils.adb | 9 | ||||
-rw-r--r-- | src/grt/grt-disp_rti.adb | 10 | ||||
-rw-r--r-- | src/grt/grt-fst.adb | 10 | ||||
-rw-r--r-- | src/grt/grt-vcd.adb | 4 | ||||
-rw-r--r-- | src/grt/grt-vital_annotate.adb | 8 |
5 files changed, 24 insertions, 17 deletions
diff --git a/src/grt/grt-avhpi_utils.adb b/src/grt/grt-avhpi_utils.adb index 77cd15579..62b37014b 100644 --- a/src/grt/grt-avhpi_utils.adb +++ b/src/grt/grt-avhpi_utils.adb @@ -28,17 +28,18 @@ with Grt.Errors; use Grt.Errors; package body Grt.Avhpi_Utils is function Get_Root_Entity (Root : VhpiHandleT) return VhpiHandleT is - Hdl : VhpiHandleT; + Hdl : VhpiHandleT; + Unit : VhpiHandleT; Error : AvhpiErrorT; begin - Vhpi_Handle (VhpiDesignUnit, Root, Hdl, Error); + Vhpi_Handle (VhpiDesignUnit, Root, Unit, Error); if Error /= AvhpiErrorOk then Internal_Error ("VhpiDesignUnit"); end if; - case Vhpi_Get_Kind (Hdl) is + case Vhpi_Get_Kind (Unit) is when VhpiArchBodyK => - Vhpi_Handle (VhpiPrimaryUnit, Hdl, Hdl, Error); + Vhpi_Handle (VhpiPrimaryUnit, Unit, Hdl, Error); if Error /= AvhpiErrorOk then Internal_Error ("VhpiPrimaryUnit"); end if; diff --git a/src/grt/grt-disp_rti.adb b/src/grt/grt-disp_rti.adb index b908a3c3b..823b9f1fe 100644 --- a/src/grt/grt-disp_rti.adb +++ b/src/grt/grt-disp_rti.adb @@ -882,18 +882,18 @@ package body Grt.Disp_Rti is Ctxt : Rti_Context; Indent : Natural) is - Addr, Bounds : Address; + Obj_Addr, Base, Bounds : Address; Obj_Type : Ghdl_Rti_Access; begin Disp_Obj_Header (Obj, Indent); - Addr := Loc_To_Addr (Obj.Common.Depth, Obj.Loc, Ctxt); + Obj_Addr := Loc_To_Addr (Obj.Common.Depth, Obj.Loc, Ctxt); Obj_Type := Obj.Obj_Type; - Disp_Subtype_Indication (Obj_Type, Ctxt, Addr); + Disp_Subtype_Indication (Obj_Type, Ctxt, Obj_Addr); Put (" := "); - Object_To_Base_Bounds (Obj_Type, Addr, Addr, Bounds); - Disp_Value (stdout, Obj_Type, Ctxt, Addr, Bounds, Is_Sig); + Object_To_Base_Bounds (Obj_Type, Obj_Addr, Base, Bounds); + Disp_Value (stdout, Obj_Type, Ctxt, Base, Bounds, Is_Sig); New_Line; end Disp_Object; diff --git a/src/grt/grt-fst.adb b/src/grt/grt-fst.adb index 7f689aa61..e2c7d2307 100644 --- a/src/grt/grt-fst.adb +++ b/src/grt/grt-fst.adb @@ -215,7 +215,7 @@ package body Grt.Fst is procedure Fst_Add_Signal (Sig : VhpiHandleT) is - Sig_Type, Sig_Base_Type : VhpiHandleT; + Sig_Typemark, Sig_Subtype, Sig_Base_Type : VhpiHandleT; Err : AvhpiErrorT; Vcd_El : Verilog_Wire_Info; Vt : fstVarType; @@ -325,18 +325,18 @@ package body Grt.Fst is end if; -- Extract type name. - Vhpi_Handle (VhpiSubtype, Sig, Sig_Type, Err); + Vhpi_Handle (VhpiSubtype, Sig, Sig_Subtype, Err); if Err /= AvhpiErrorOk then Avhpi_Error (Err); end if; - Vhpi_Handle (VhpiTypeMark, Sig_Type, Sig_Type, Err); + Vhpi_Handle (VhpiTypeMark, Sig_Subtype, Sig_Typemark, Err); if Err /= AvhpiErrorOk then Avhpi_Error (Err); end if; - Vhpi_Get_Str (VhpiNameP, Sig_Type, Type_Name, Type_Name_Len); + Vhpi_Get_Str (VhpiNameP, Sig_Typemark, Type_Name, Type_Name_Len); if Type_Name_Len = 0 then -- Try with the base type. - Vhpi_Handle (VhpiBaseType, Sig_Type, Sig_Base_Type, Err); + Vhpi_Handle (VhpiBaseType, Sig_Subtype, Sig_Base_Type, Err); if Err /= AvhpiErrorOk then Avhpi_Error (Err); end if; diff --git a/src/grt/grt-vcd.adb b/src/grt/grt-vcd.adb index aab295555..83d6c6f35 100644 --- a/src/grt/grt-vcd.adb +++ b/src/grt/grt-vcd.adb @@ -341,6 +341,7 @@ package body Grt.Vcd is Rti : Ghdl_Rti_Access; Error : AvhpiErrorT; Sig_Addr : Address; + Base : Address; Bounds : Address; Kind : Vcd_Var_Type; @@ -356,7 +357,8 @@ package body Grt.Vcd is Rti := Avhpi_Get_Rti (Sig_Type); Sig_Addr := Avhpi_Get_Address (Sig); - Object_To_Base_Bounds (Rti, Sig_Addr, Sig_Addr, Bounds); + Object_To_Base_Bounds (Rti, Sig_Addr, Base, Bounds); + Sig_Addr := Base; case Rti.Kind is when Ghdl_Rtik_Type_B1 diff --git a/src/grt/grt-vital_annotate.adb b/src/grt/grt-vital_annotate.adb index ca0d9231a..629148118 100644 --- a/src/grt/grt-vital_annotate.adb +++ b/src/grt/grt-vital_annotate.adb @@ -165,6 +165,7 @@ package body Grt.Vital_Annotate is Status : out Boolean) is pragma Unreferenced (Context); + New_Inst : VhpiHandleT; begin if Flag_Dump then Put (' '); @@ -173,7 +174,8 @@ package body Grt.Vital_Annotate is return; end if; - Find_Instance (Sdf_Inst, Sdf_Inst, Instance, Status); + Find_Instance (Sdf_Inst, New_Inst, Instance, Status); + Sdf_Inst := New_Inst; end Sdf_Instance; procedure Sdf_Instance_End (Context : Sdf_Context_Type; @@ -456,6 +458,7 @@ package body Grt.Vital_Annotate is is S, E : Natural; Ok : Boolean; + New_Top : VhpiHandleT; begin if Flag_Verbose then Put ("sdf annotate: "); @@ -485,13 +488,14 @@ package body Grt.Vital_Annotate is -- Path element. if E - 1 >= S then - Find_Instance (Sdf_Top, Sdf_Top, Arg (S .. E - 1), Ok); + Find_Instance (Sdf_Top, New_Top, Arg (S .. E - 1), Ok); if not Ok then Error_S ("cannot find instance '"); Diag_C (Arg (S .. E - 1)); Error_E ("' for sdf annotation"); return; end if; + Sdf_Top := New_Top; end if; end loop L1; |