From f8181550a62857bf2d73710b0952af16726eba6c Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Tue, 23 Feb 2016 06:55:52 +0100 Subject: translate: separate decl and stmt elab subprograms. --- src/vhdl/translate/trans.ads | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/vhdl/translate/trans.ads') diff --git a/src/vhdl/translate/trans.ads b/src/vhdl/translate/trans.ads index 63db84bd8..e97d6a0c3 100644 --- a/src/vhdl/translate/trans.ads +++ b/src/vhdl/translate/trans.ads @@ -192,6 +192,9 @@ package Trans is function Add_Pointer (Ptr : O_Enode; Offset : O_Enode; Res_Ptr : O_Tnode) return O_Enode; + type Elab_Kind is (Elab_Decls, Elab_Stmts); + type O_Dnode_Elab is array (Elab_Kind) of O_Dnode; + package Chap10 is -- There are three data storage kind: global, local or instance. -- For example, a constant can have: @@ -349,6 +352,9 @@ package Trans is -- Create a prefixed identifier from a string. function Create_Identifier (Str : String) return O_Ident; + -- Create an identifier for an elaboration procedure. + function Create_Elab_Identifier (Kind : Elab_Kind) return O_Ident; + -- Create an identifier for a variable. -- IE, if the variable is global, prepend the prefix, -- if the variable belong to an instance, no prefix is added. @@ -1380,7 +1386,8 @@ package Trans is Block_Id : Nat32; -- Subprogram which elaborates the block (for entity or arch). - Block_Elab_Subprg : O_Dnode; + Block_Elab_Subprg : O_Dnode_Elab; + -- Size of the block instance. Block_Instance_Size : O_Dnode; -- cgit v1.2.3