|
CIRCT 24.0.0git
|
Classes | |
| class | TestBackpressure |
| class | TestBackpressureDMA |
Functions | |
| int | _fill (try_write, int start) |
| _wait_stable (read_value, float settle=1.0, float timeout=60.0) | |
| None | _check_void_sim_to_host (AcceleratorConnection conn) |
Variables | |
| int | DEFAULT_TO_SERVER_MAX_IN_FLIGHT = 16 |
| int | HW_SLACK = 8 |
Cosim integration tests for channel backpressure (cosim protocol v4 flow
control), using the DUTs in `hw/backpressure.py`.
* Host -> simulation: with the loopback's gate closed the hardware never
consumes `in`, so `try_write` must start failing after roughly the
default in-flight limit (16) plus the endpoint's internal buffering, and
recover once the gate opens.
* Simulation -> host: with `stream` connected with a small buffer and not
read, the producer must stall (its `Cosim_Endpoint_ToHost` deasserts
ready) instead of pushing everything into host memory.
* Void simulation -> host: a backed-up void stream must deliver every
message once drained, on both native cosim and the one-item DMA engines.
The DMA engine retains a rejected message and re-delivers it later, which
must not trip the zero-width placeholder check.
|
protected |
Back up a void stream so the transport has to retry delivering a message the host rejected, then drain it and check nothing was lost.
Definition at line 145 of file test_backpressure.py.
References _wait_stable().
Referenced by tests.integration.test_backpressure.TestBackpressure.test_void_sim_to_host(), and tests.integration.test_backpressure.TestBackpressureDMA.test_void_sim_to_host().
|
protected |
Call `try_write(value)` with increasing values from `start` until it keeps failing for a while, so credits for anything the hardware takes in the meantime are observed. Returns the next unwritten value.
Definition at line 39 of file test_backpressure.py.
Referenced by tests.integration.test_backpressure.TestBackpressure.test_host_to_sim().
|
protected |
Poll `read_value()` until it stops changing for `settle` seconds.
Definition at line 55 of file test_backpressure.py.
Referenced by _check_void_sim_to_host(), and tests.integration.test_backpressure.TestBackpressure.test_sim_to_host().
| int tests.integration.test_backpressure.DEFAULT_TO_SERVER_MAX_IN_FLIGHT = 16 |
Definition at line 33 of file test_backpressure.py.
| int tests.integration.test_backpressure.HW_SLACK = 8 |
Definition at line 36 of file test_backpressure.py.