pyGHDL.libghdl.vhdl.nodes_utils#

Functions


Functions

pyGHDL.libghdl.vhdl.nodes_utils.Strip_Denoting_Name(Name)[source]#

If Name is a simple or an expanded name, return the denoted declaration. Otherwise, return Name.

Parameters:

Name (TypeVar(Iir, bound= c_int)) – Simple or an expanded name.

Return type:

TypeVar(Iir, bound= c_int)

Returns:

Denoted declaration.

pyGHDL.libghdl.vhdl.nodes_utils.Get_Entity(Decl)[source]#

This is a wrapper around Get_Entity_Name to return the entity declaration of the entity name of Decl, or Null_Iir in case of error.

Parameters:

Decl (TypeVar(Iir, bound= c_int)) – Declaration

Return type:

TypeVar(Iir, bound= c_int)

Returns:

Entity

pyGHDL.libghdl.vhdl.nodes_utils.Is_Second_Subprogram_Specification(Spec)[source]#

Check if Spec is the subprogram specification of a subprogram body which was previously declared. In that case, the only use of Spec is to match the body with its declaration.

Parameters:

Spec (TypeVar(Iir, bound= c_int)) – Specification

Return type:

bool

Returns:

True if subprogram specification and previously declared subprogram body match

pyGHDL.libghdl.vhdl.nodes_utils.Get_Entity_From_Entity_Aspect(Aspect)[source]#

Extract the entity from Aspect.

If Aspect is a component declaration, return Aspect. If it’s open, return Null_Iir

Parameters:

Aspect (TypeVar(Iir, bound= c_int)) – Aspect

Return type:

TypeVar(Iir, bound= c_int)

Returns:

Entity

pyGHDL.libghdl.vhdl.nodes_utils.Get_Interface_Of_Formal(Formal)[source]#

Get the interface corresponding to the formal name Formal. This is always an interface, even if the formal is a name.

Parameters:

Formal (TypeVar(Iir, bound= c_int)) – The formal.

Return type:

TypeVar(Iir, bound= c_int)

Returns:

The corresponding interface.