diff options
Diffstat (limited to 'src/vhdl/vhdl-sem_decls.ads')
-rw-r--r-- | src/vhdl/vhdl-sem_decls.ads | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/vhdl/vhdl-sem_decls.ads b/src/vhdl/vhdl-sem_decls.ads index f22cd8791..3ab43adf8 100644 --- a/src/vhdl/vhdl-sem_decls.ads +++ b/src/vhdl/vhdl-sem_decls.ads @@ -75,9 +75,14 @@ package Vhdl.Sem_Decls is procedure Pop_Signals_Declarative_Part (Cell: in Implicit_Signal_Declaration_Type); - -- Declare an implicit signal. + -- Declare an implicit signal. This is called from sem_names when a + -- signal attribute is analyzed. procedure Add_Declaration_For_Implicit_Signal (Sig : Iir); + -- Append declaration SIG (for an anonymous signal) to the current + -- declarative part. + procedure Add_Implicit_Declaration (Sig : Iir); + private type Implicit_Signal_Declaration_Type is record -- Declaration or statement than will contain implicit declarations. @@ -92,10 +97,13 @@ private -- If True, declarations of DECLS_PARENT have already been analyzed. -- So implicit declarations are appended to the parent, and the last - -- declaration is LAST_DECL. + -- declaration is LAST_DECL. This is the usual case when attribute + -- signals are used in statements. -- If False, declarations are being analyzed. Implicit declarations -- are appended to IMPLICIT_DECL/LAST_ATTRIBUTE_SIGNAL and will be - -- inserted before the current declaration. + -- inserted before the current declaration. This can happen if a + -- attribute signal is used in a declaration, the attribute signal + -- must be declared before it is used. Decls_Analyzed : Boolean; -- Last declaration in the region. If an implicit_decl is createed, it |