diff options
author | Tristan Gingold <tgingold@free.fr> | 2019-12-02 21:18:37 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2019-12-02 21:18:37 +0100 |
commit | e6a643ea1db47dc5fcf3893a81b3193869edbc38 (patch) | |
tree | 9b72a932ffb8f43a4900a5098296fff22b120048 /src/vhdl/vhdl-annotations.adb | |
parent | d11ad2282157564dad9e53eccf9f2ec8a05bbda7 (diff) | |
download | ghdl-e6a643ea1db47dc5fcf3893a81b3193869edbc38.tar.gz ghdl-e6a643ea1db47dc5fcf3893a81b3193869edbc38.tar.bz2 ghdl-e6a643ea1db47dc5fcf3893a81b3193869edbc38.zip |
synth: support multiple synthesis.
Diffstat (limited to 'src/vhdl/vhdl-annotations.adb')
-rw-r--r-- | src/vhdl/vhdl-annotations.adb | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/vhdl/vhdl-annotations.adb b/src/vhdl/vhdl-annotations.adb index 9cf6d7931..6a4591430 100644 --- a/src/vhdl/vhdl-annotations.adb +++ b/src/vhdl/vhdl-annotations.adb @@ -16,6 +16,8 @@ -- Software Foundation, 59 Temple Place - Suite 330, Boston, MA -- 02111-1307, USA. +with Ada.Unchecked_Deallocation; + with Tables; with Simple_IO; with Vhdl.Std_Package; @@ -1337,6 +1339,32 @@ package body Vhdl.Annotations is end case; end Annotate; + procedure Initialize_Annotate is + begin + Info_Node.Init; + end Initialize_Annotate; + + procedure Finalize_Annotate + is + procedure Free is new Ada.Unchecked_Deallocation + (Sim_Info_Type, Sim_Info_Acc); + begin + Free (Global_Info); + for I in Info_Node.First .. Info_Node.Last loop + case Get_Kind (I) is + when Iir_Kind_Package_Body + | Iir_Kind_Function_Body + | Iir_Kind_Procedure_Body + | Iir_Kind_Protected_Type_Body => + -- Info is shared with the spec. + null; + when others => + Free (Info_Node.Table (I)); + end case; + end loop; + Info_Node.Free; + end Finalize_Annotate; + -- Disp annotations for an iir node. procedure Disp_Vhdl_Info (Node: Iir) is |