diff options
author | Tristan Gingold | 2015-03-07 07:30:07 +0100 |
---|---|---|
committer | Tristan Gingold | 2015-03-07 07:30:07 +0100 |
commit | 8af64459f397e5037dd7e25317491edad39d8006 (patch) | |
tree | 13476a4fe7a97c9dc62df4d03bf33045e2920b04 /src/grt/grt-vital_annotate.adb | |
parent | ad4ac5499e426cff9b76479e8ff6250a32fcbb57 (diff) | |
download | ghdl-8af64459f397e5037dd7e25317491edad39d8006.tar.gz ghdl-8af64459f397e5037dd7e25317491edad39d8006.tar.bz2 ghdl-8af64459f397e5037dd7e25317491edad39d8006.zip |
Implement ticket 37: add switch -gNAME=VAL to override top entity generics.
Diffstat (limited to 'src/grt/grt-vital_annotate.adb')
-rw-r--r-- | src/grt/grt-vital_annotate.adb | 36 |
1 files changed, 2 insertions, 34 deletions
diff --git a/src/grt/grt-vital_annotate.adb b/src/grt/grt-vital_annotate.adb index 3ff0890..1b5ae47 100644 --- a/src/grt/grt-vital_annotate.adb +++ b/src/grt/grt-vital_annotate.adb @@ -28,6 +28,7 @@ with Grt.Astdio; use Grt.Astdio; with Grt.Stdio; use Grt.Stdio; with Grt.Options; with Grt.Avhpi; use Grt.Avhpi; +with Grt.Avhpi_Utils; use Grt.Avhpi_Utils; with Grt.Errors; use Grt.Errors; package body Grt.Vital_Annotate is @@ -40,22 +41,6 @@ package body Grt.Vital_Annotate is Flag_Dump : Boolean := False; Flag_Verbose : constant Boolean := False; - function Name_Compare (Handle : VhpiHandleT; - Name : String; - Property : VhpiStrPropertyT := VhpiNameP) - return Boolean - is - Obj_Name : String (1 .. Name'Length); - Len : Natural; - begin - Vhpi_Get_Str (Property, Handle, Obj_Name, Len); - if Len = Name'Length and then Obj_Name = Name then - return True; - else - return False; - end if; - end Name_Compare; - -- Note: RES may alias CUR. procedure Find_Instance (Cur : VhpiHandleT; Res : out VhpiHandleT; @@ -204,24 +189,8 @@ package body Grt.Vital_Annotate is when VhpiRootInstK => declare Hdl : VhpiHandleT; - Error : AvhpiErrorT; begin - Status := False; - Vhpi_Handle (VhpiDesignUnit, Sdf_Inst, Hdl, Error); - if Error /= AvhpiErrorOk then - Internal_Error ("VhpiDesignUnit"); - return; - end if; - case Vhpi_Get_Kind (Hdl) is - when VhpiArchBodyK => - Vhpi_Handle (VhpiPrimaryUnit, Hdl, Hdl, Error); - if Error /= AvhpiErrorOk then - Internal_Error ("VhpiPrimaryUnit"); - return; - end if; - when others => - Internal_Error ("sdf_instance_end"); - end case; + Hdl := Get_Root_Entity (Sdf_Inst); Status := Name_Compare (Hdl, Context.Celltype (1 .. Context.Celltype_Len)); end; @@ -483,7 +452,6 @@ package body Grt.Vital_Annotate is end if; end Sdf_Generic; - procedure Annotate (Arg : String) is S, E : Natural; |