diff options
Diffstat (limited to 'src/grt/grt-vcd.adb')
-rw-r--r-- | src/grt/grt-vcd.adb | 59 |
1 files changed, 30 insertions, 29 deletions
diff --git a/src/grt/grt-vcd.adb b/src/grt/grt-vcd.adb index 95a724c76..b44090ed5 100644 --- a/src/grt/grt-vcd.adb +++ b/src/grt/grt-vcd.adb @@ -49,8 +49,8 @@ with Grt.Rtis; use Grt.Rtis; with Grt.Rtis_Addr; use Grt.Rtis_Addr; with Grt.Rtis_Types; use Grt.Rtis_Types; with Grt.Vstrings; -with Grt.Wave_Opt_File; use Grt.Wave_Opt_File; -with Grt.Wave_Opt_File.Tree_Reading; use Grt.Wave_Opt_File.Tree_Reading; +with Grt.Wave_Opt; use Grt.Wave_Opt; +with Grt.Wave_Opt.Design; use Grt.Wave_Opt.Design; pragma Elaborate_All (Grt.Table); package body Grt.Vcd is @@ -532,12 +532,12 @@ package body Grt.Vcd is end Add_Signal; procedure Vcd_Put_Hierarchy - (Inst : VhpiHandleT; Wave_Elem : Wave_Opt_File.Elem_Acc) + (Inst : VhpiHandleT; Wave_Elem : Wave_Opt.Elem_Acc) is Decl_It : VhpiHandleT; Decl : VhpiHandleT; Error : AvhpiErrorT; - Wave_Elem_Child : Wave_Opt_File.Elem_Acc; + Wave_Elem_Child : Wave_Opt.Elem_Acc; begin Vhpi_Iterator (VhpiDecls, Inst, Decl_It, Error); if Error /= AvhpiErrorOk then @@ -554,17 +554,17 @@ package body Grt.Vcd is return; end if; - Wave_Elem_Child := Get_Cursor - (Avhpi_Get_Base_Name (Decl), Wave_Elem, Is_Signal => True); - if Is_Displayed (Wave_Elem_Child) then - case Vhpi_Get_Kind (Decl) is - when VhpiPortDeclK - | VhpiSigDeclK => + case Vhpi_Get_Kind (Decl) is + when VhpiPortDeclK + | VhpiSigDeclK => + Wave_Elem_Child := Get_Cursor + (Wave_Elem, Avhpi_Get_Base_Name (Decl), Is_Signal => True); + if Is_Displayed (Wave_Elem_Child) then Add_Signal (Decl); - when others => - null; - end case; - end if; + end if; + when others => + null; + end case; end loop; -- Extract sub-scopes. @@ -585,13 +585,14 @@ package body Grt.Vcd is Avhpi_Error (Error); return; end if; - Wave_Elem_Child := Get_Cursor (Avhpi_Get_Base_Name (Decl), Wave_Elem); - if Is_Displayed (Wave_Elem_Child) then - case Vhpi_Get_Kind (Decl) is - when VhpiIfGenerateK - | VhpiForGenerateK - | VhpiBlockStmtK - | VhpiCompInstStmtK => + case Vhpi_Get_Kind (Decl) is + when VhpiIfGenerateK + | VhpiForGenerateK + | VhpiBlockStmtK + | VhpiCompInstStmtK => + Wave_Elem_Child := Get_Cursor + (Wave_Elem, Avhpi_Get_Base_Name (Decl)); + if Is_Displayed (Wave_Elem_Child) then Vcd_Put ("$scope module "); Vcd_Put_Name (Decl); Vcd_Putc (' '); @@ -599,10 +600,10 @@ package body Grt.Vcd is Vcd_Put_Hierarchy (Decl, Wave_Elem_Child); Vcd_Put ("$upscope "); Vcd_Put_End; - when others => - null; - end case; - end if; + end if; + when others => + null; + end case; end loop; end Vcd_Put_Hierarchy; @@ -872,7 +873,7 @@ package body Grt.Vcd is Pack : VhpiHandleT; Error : AvhpiErrorT; Root : VhpiHandleT; - Wave_Elem : Wave_Opt_File.Elem_Acc; + Wave_Elem : Wave_Opt.Elem_Acc; begin -- Do nothing if there is no VCD file to generate. if Vcd_Close = null then @@ -893,7 +894,7 @@ package body Grt.Vcd is Avhpi_Error (Error); return; end if; - Wave_Elem := Get_Top_Cursor (Avhpi_Get_Base_Name (Pack), Pkg); + Wave_Elem := Get_Top_Cursor (Pkg, Avhpi_Get_Base_Name (Pack)); if Is_Displayed (Wave_Elem) then Vcd_Put_Hierarchy (Pack, Wave_Elem); end if; @@ -901,11 +902,11 @@ package body Grt.Vcd is -- Then top entity. Get_Root_Inst (Root); - Wave_Elem := Get_Top_Cursor (Avhpi_Get_Base_Name (Root), Entity); + Wave_Elem := Get_Top_Cursor (Entity, Avhpi_Get_Base_Name (Root)); if Is_Displayed (Wave_Elem) then Vcd_Put_Hierarchy (Root, Wave_Elem); end if; - Wave_Opt_File.Tree_Reading.Check_If_All_Found; + Wave_Opt.Design.Last_Checks; -- End of header. Vcd_Put ("$enddefinitions "); |