avl._core.env module

class avl._core.env.Env(*args: Any, **kwargs: Any)[source]
__init__(name: str, parent: Component) None[source]

Initializes the environment with the given name, parent.

Parameters:
  • name (str) – The name of the environment.

  • parent (object) – The parent object of the environment.

async sync_reset(clk: <MagicMock name = 'mock.HierarchyObject' id='140071431323728'>, rst: <MagicMock name = 'mock.HierarchyObject' id='140071431323728'>, cycles: int, active_high: bool = True) None[source]

Perform a synchronous reset.

Parameters:
  • clk (object) – Clock signal

  • rst (object) – Reset signal

  • cycles (int) – Number of clock cycles to hold the reset

  • active_high (bool) – Reset is active high if True, active low if False

async async_reset(rst: <MagicMock name = 'mock.HierarchyObject' id='140071431323728'>, duration: int, units: str = 'ns', active_high: bool = True) None[source]

Perform an asynchronous reset.

Parameters:
  • rst (object) – Reset signal

  • duration (int) – Duration of the reset

  • units (str) – Time units for the duration, defaults to ‘ns’

  • active_high (bool) – Reset is active high if True, active low if False

async clock(clk: <MagicMock name = 'mock.HierarchyObject' id='140071431323728'>, freq_mHz: int) None[source]

Generate a clock signal.

Parameters:
  • clk (object) – Clock signal

  • freq_mHz (int) – Frequency in megaHertz

async ticker(duration: int, msg: str, units: str = 'ns') None[source]

Log a message at regular intervals.

Parameters:
  • duration (int) – Interval duration

  • msg (str) – Message to log

  • units (str) – Time units for the duration, defaults to ‘ns’

async timeout(duration: int, units: str = 'ns') None[source]

Raise a timeout exception after a specified duration.

Parameters:
  • duration (int) – Timeout duration

  • units (str) – Time units for the duration, defaults to ‘ns’