pyGHDL.libghdl._decorator

Decorators binding a Python function to a subprogram in the shared library libghdl.

BindToLibGHDL() reads a function’s type hints, derives the matching ctypes signature and replaces the function body with a call into the shared library. EnumLookupTable() precalculates an enum position to name table.

Functions

  • EnumLookupTable(): Decorator to precalculate an enum lookup table (LUT) for enum position to


Functions

pyGHDL.libghdl._decorator.EnumLookupTable(cls)[source]

Decorator to precalculate an enum lookup table (LUT) for enum position to enum literal name.

Return type:

Callable

Returns:

Decorator function replacing the placeholder with a table lookup.