pyGHDL.libghdl.vhdl.utils

Helpers on top of the raw pyGHDL.libghdl.vhdl bindings.

Functions


Functions

pyGHDL.libghdl.vhdl.utils.Get_Source_Identifier(Decl)[source]

Like Get_Identifier but return a NameId for the same casing as it appears in the source file. Not useful for analysis as VHDL is case insensitive, but could be useful for error messages or tooling.

Parameters:

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

Return type:

TypeVar(NameId, bound= c_int)

Returns:

The identifier as written in the source file.

pyGHDL.libghdl.vhdl.utils.Get_Source_Identifier_Str(n)[source]

Return a declaration’s identifier as it was written in the source file.

Get_Name_Ptr() returns the normalized identifier, which is lower: case; this reads the characters back out of the source buffer instead, so the original casing is preserved.

Parameters:

n (TypeVar(Iir, bound= c_int)) – The IIR node of the declaration.

Return type:

str

Returns:

The identifier as written.