diff options
author | Tristan Gingold <tgingold@free.fr> | 2019-12-26 18:05:51 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2019-12-28 18:45:25 +0100 |
commit | a52af2f98e34648a2a9b056b11da518a60a6c6cd (patch) | |
tree | 32e150cfbe061e6f20d0c3d4cb57e23abb0f315e /src/vhdl/vhdl-utils.ads | |
parent | 8a5fe99b279b1ce1ea7fe4313a24d0f3a399149d (diff) | |
download | ghdl-a52af2f98e34648a2a9b056b11da518a60a6c6cd.tar.gz ghdl-a52af2f98e34648a2a9b056b11da518a60a6c6cd.tar.bz2 ghdl-a52af2f98e34648a2a9b056b11da518a60a6c6cd.zip |
vhdl: improve support of AMS-vhdl (array and record natures, source quantities)
Diffstat (limited to 'src/vhdl/vhdl-utils.ads')
-rw-r--r-- | src/vhdl/vhdl-utils.ads | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/vhdl/vhdl-utils.ads b/src/vhdl/vhdl-utils.ads index af4bc65d1..c24b3226f 100644 --- a/src/vhdl/vhdl-utils.ads +++ b/src/vhdl/vhdl-utils.ads @@ -76,9 +76,12 @@ package Vhdl.Utils is -- also be an expression like a function call or an attribute. function Name_To_Value (Name : Iir) return Iir; - -- Return TRUE if EXPR is a signal name. + -- Return TRUE iff EXPR is a signal name. function Is_Signal_Name (Expr : Iir) return Boolean; + -- Return TRUE iff EXPR is a quantity name. + function Is_Quantity_Name (Expr : Iir) return Boolean; + -- Get the interface corresponding to the formal name FORMAL. This is -- always an interface, even if the formal is a name. function Get_Interface_Of_Formal (Formal : Iir) return Iir; @@ -158,6 +161,10 @@ package Vhdl.Utils is function Is_Anonymous_Type_Definition (Def : Iir) return Boolean; pragma Inline (Is_Anonymous_Type_Definition); + -- Likewise but for natures. + function Is_Anonymous_Nature_Definition (Def : Iir) return Boolean; + pragma Inline (Is_Anonymous_Nature_Definition); + -- Return TRUE iff DEF is a fully constrained type (or subtype) definition. function Is_Fully_Constrained_Type (Def : Iir) return Boolean; @@ -217,6 +224,9 @@ package Vhdl.Utils is function Get_Index_Type (Index_Type : Iir) return Iir renames Get_Type_Of_Subtype_Indication; + -- Get the nature from a subnature indication. + function Get_Nature_Of_Subnature_Indication (Ind : Iir) return Iir; + -- Return the IDX-th index type for index subtype definition list or -- index_constraint INDEXES. Return Null_Iir if IDX is out of dimension -- bounds, so that this function can be used to iterator over indexes of |