pyGHDL.libghdl.vhdl.lists#

Functions

Classes


Functions

pyGHDL.libghdl.vhdl.lists.Iterate(List)[source]#

Create an iterator for a given list.

The idiomatic way to iterate is:

It = Iterate(List)
while Is_Valid(It):
  El = Get_Element(It)
    # ...
  Next(It)
Parameters:

List (int) – List to create an iterator from.

Return type:

Iterator

Returns:

Iterator structure.

pyGHDL.libghdl.vhdl.lists.Is_Valid(it)[source]#

Check if iterator reached the end.

Parameters:

it (Iterator) – Iterator to check.

Return type:

bool

Returns:

False, if iterator has reached the end.

pyGHDL.libghdl.vhdl.lists.Next(it)[source]#

Move iterator to the next element.

Parameters:

it (Iterator) – Iterator to increment.

Return type:

bool

Returns:

False, if iterator has reached the end.

pyGHDL.libghdl.vhdl.lists.Get_Element(it)[source]#

Get the current element from iterator.

Parameters:

it (Iterator) – Iterator the get the element from.

Return type:

int

Returns:

The current element the iterator points to. Type: El_Type

pyGHDL.libghdl.vhdl.lists.Get_Nbr_Elements(List)[source]#

Return the number of elements in the list.

Hint

This is also 1 + the position of the last element.

Parameters:

List (int) – The list to use.

Return type:

int

Returns:

Number of list elements.

pyGHDL.libghdl.vhdl.lists.Create_Iir_List()[source]#

Create a list.

Return type:

int

Returns:

undocumented; Type: List_Type

pyGHDL.libghdl.vhdl.lists.Destroy_Iir_List(List)[source]#

Destroy a list.

Parameters:

List (int) – List to destroy.

Return type:

None


Classes

class pyGHDL.libghdl.vhdl.lists.Iterator[source]#

Inheritance

Inheritance diagram of Iterator

__hash__()#

Return hash(self).

__init__(*args, **kwargs)#
__new__(**kwargs)#
__reduce__()#

Helper for pickle.

_b_base_#

the base object

_b_needsfree_#

whether the object owns the memory or not

_objects#

internal objects tree (NEVER CHANGE THIS OBJECT!)