avl._core.sequencer module

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

Initialize the Sequencer instance.

Parameters:
  • name (str) – Name of the sequencer.

  • parent (Component) – Parent component.

send_request(seq: Sequence, item: SequenceItem) None[source]

Sends a request to the sequencer.

Parameters:
  • seq – The sequence sending the request.

  • item – The item to be sent.

arbitrate() tuple[Sequence, Event, int][source]

Arbitrates between available sequences based on their priorities.

Returns:

A tuple containing the selected sequence, its event, and its priority. If no sequence is available, returns (None, None, None).

async lock(seq: Sequence) None[source]

Locks the sequencer for the sequence.

Parameters:

seq – The sequence locking the sequencer.

unlock(seq: Sequence) None[source]

Unlocks the sequencer for the sequence.

Parameters:

seq – The sequence unlocking the sequencer.

get_lock() Sequence[source]

Gets the current lock.

Returns:

The current lock.

async wait_for_grant(seq: Sequence, priority: int = None) None[source]

Waits for a grant to run the sequence.

Parameters:
  • seq – The sequence requesting the grant.

  • priority – The priority of the sequence (optional).

async run_phase() None[source]

Runs the sequencer phase.