avl_apb._driver module
- class avl_apb._driver.Driver(*args, **kwargs)[source]
- Parameters:
name (str)
parent (Component)
- __init__(name, parent)[source]
Initialize the Driver for the APB agent.
- Parameters:
name (str) – Name of the agent instance
parent (Component) – Parent component
- Return type:
None
- rate_limit
Rate limit for driving signals. lambda function (0.0 - 1.0)
- async reset()[source]
Reset the driver by setting all signals to their default values. This method is called when the driver is reset.
By default 0’s all signals - can be overridden in subclasses to add randomization or other behavior.
- Return type:
None
- async wait_on_reset()[source]
Wait for the reset signal to go low and then call the reset method. This method is called to ensure that the driver is reset before driving any signals. It waits for the presetn signal to go low, indicating that the reset is active, and then calls the reset method to set all signals to their default values.
- Return type:
None
- async quiesce()[source]
Quiesce the driver by setting the psel signal to 0. This method is called when the driver is quiesced.
By default calls reset() to set all signals to their default values. Can be overridden in subclasses to add randomization or other behavior.
- Return type:
None
- async drive(item)[source]
Drive the signals based on the provided sequence item. This method is called to drive the signals of the APB interface.
- Parameters:
item (SequenceItem) – The sequence item containing the values to drive
- Return type:
None
- async get_next_item(item=None)[source]
Get the next sequence item.
For the Request driver this method retrieves the next sequence item from the sequencer or the previously reset interrupted item.
The implementation ensures items are driven on the rising edge of pclk, when not in reset, while allowing for back-to-back requests if the sequencer provides them.
For the completion driver this method adjusts the completion side of the observed request.
- Parameters:
item (SequenceItem, optional) – The sequence item to retrieve, defaults to None
- Returns:
The next sequence item
- Return type:
- Raises:
NotImplementedError – If the method is not implemented in subclasses