An extension for cocotb providing communication via the AMBA 4 AXI4-Stream Protocol. At the moment this is mostly untested and work in progress.
Driver class representing a Stream Master.
The class inherits from cocotb.drivers.ValidatedBusDriver
to allow generating transactions with gaps in TVALID
. The standard only requires TVALID
to be present on the bus, all other signals are optional.
- entity: A handle to the simulator entity.
- name: Name of the bus. This is used to bind the signals belonging to the bus. For example if your bus has signal names like
m_axis_tvalid
andm_axis_tready
, set this to"m_axis"
. - clock: A handle to the clock associated with the bus.
- lsb_first: Optional reversing of byte order on the bus. Defaults to
True
, i.e. the first byte of a stream istdata[7..0]
The monitor class only translates transactions on a stream and sends them to a testbench. If an AXI Stream Slave is to be simulated, the signal TREADY
has to be driven externally, e.g. using a cocotb.drivers.BitDriver
- entity: A handle to the simulator entity.
- name: Name of the bus. This is used to bind the signals belonging to the bus. For example if your bus has signal names like
m_axis_tvalid
andm_axis_tready
, set this to"m_axis"
. - clock: A handle to the clock associated with the bus.
- lsb_first: Optional reversing of byte order on the bus. Defaults to
True
, i.e. the first byte of a stream istdata[7..0]
- tuser_bytewise: Optional setting associating the data on the
TUSER
stream to bytes in theTDATA
stream.