|
CIRCT 24.0.0git
|
Classes | |
| class | TestBackpressure |
Functions | |
| int | _fill (try_write, int start) |
| _wait_stable (read_value, float settle=1.0, float timeout=60.0) | |
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.
|
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 34 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 50 of file test_backpressure.py.
Referenced by tests.integration.test_backpressure.TestBackpressure.test_sim_to_host().
| int tests.integration.test_backpressure.DEFAULT_TO_SERVER_MAX_IN_FLIGHT = 16 |
Definition at line 28 of file test_backpressure.py.
| int tests.integration.test_backpressure.HW_SLACK = 8 |
Definition at line 31 of file test_backpressure.py.