pyGHDL.libghdl.libraries#

Variables

Functions


Variables

pyGHDL.libghdl.libraries.Library_Location#

A location for library declarations (such as library WORK).

Use the property .value to access the variable’s value.

c_int(1)
pyGHDL.libghdl.libraries.Work_Library#

Library declaration for the work library.

Note

The identifier of the work_library is work_library_name, which may be different from ‘WORK’.

Use the property .value to access the variable’s value.

c_int(0)

Functions

pyGHDL.libghdl.libraries.Get_Libraries_Chain()[source]#

Get the chain of libraries. Can be used only to read (it mustn’t be modified).

Return type:

TypeVar(Iir_Library_Declaration, bound= c_int)

Returns:

undocumented

pyGHDL.libghdl.libraries.Add_Design_Unit_Into_Library(Unit, Keep_Obsolete)[source]#

Add or replace an design unit in the work library. DECL must not have a chain (because it may be modified).

If the design_file of UNIT is not already in the library, a new one is created.

Units are always appended to the design_file. Therefore, the order is kept.

Parameters:
  • Unit (TypeVar(Iir_Design_Unit, bound= c_int)) – undocumented

  • Keep_Obsolete (bool) –

    If Keep_Obsolete is True, obsoleted units are kept in the library.

    This is used when a whole design file has to be added in the library and then processed (without that feature, redefined units would disappear).

Return type:

None

pyGHDL.libghdl.libraries.Purge_Design_File(Design_File)[source]#

Remove the same file as Design_File from work library and all of its units.

Parameters:

Design_File (TypeVar(Iir_Design_File, bound= c_int)) – undocumented

Return type:

None

pyGHDL.libghdl.libraries.Find_Entity_For_Component(Name)[source]#

Find an entity whose name is Name in any library.
If there is no such entity, return Null_Iir.
If there are several entities, return Null_Iir;

Parameters:

Name (TypeVar(NameId, bound= c_int)) – Entity name to search for.

Return type:

TypeVar(Iir_Design_Unit, bound= c_int)

Returns:

undocumented

pyGHDL.libghdl.libraries.Get_Library_No_Create(Ident)[source]#

Get the library named Ident.

Parameters:

Ident (TypeVar(NameId, bound= c_int)) – Library to look for.

Return type:

TypeVar(Iir_Library_Declaration, bound= c_int)

Returns:

Return Null_Iir if it doesn’t exist.

pyGHDL.libghdl.libraries.Find_Primary_Unit(Library, Name)[source]#

Just return the design_unit for Name, or NULL if not found.

Parameters:
  • Library (TypeVar(Iir_Library_Declaration, bound= c_int)) – Library to look in.

  • Name (TypeVar(NameId, bound= c_int)) – Primary unit to search for.

Return type:

TypeVar(Iir_Design_Unit, bound= c_int)

Returns:

undocumented