Repository navigation
Commit 65efea6
[ESI][BSP] Support multiple outstanding reads in HostMemReadReqSplitter
`HostMemReadReqSplitter` accepted one logical read request and refused the
next until every response word of the current one had drained, capping each
read client at one request per host round trip.
Add an optional `max_outstanding` parameter (default 1, unchanged behavior).
Each accepted request's {word count - 1, final-word valid bytes, single-word}
is queued in a metadata FIFO of that depth; the response framer loads each
burst's metadata into registers from the FIFO head (or directly from a request
accepted while the FIFO is empty and the framer idle, so no latency is added)
and re-derives `last` / `valid_bytes` from them. Requires the upstream to
return each splitter's response words in request order; tags still pass
through untouched.
- A single-chunk request can be accepted every cycle (the next request is
accepted in the cycle the previous one issues its final chunk); responses
flow one word per cycle with no bubble between bursts.
- No combinational path from `resp_in` to `req_in` ready: the in-flight limit
is a registered flag. `resp_in` ready is left ungated, since
`esi.TaggedDemux` ANDs every output's ready.
- The final-chunk test is registered and the address/length advance by a
constant chunk; datapath registers are not reset.
Plumb the limit through `HostmemReadProcessor` and `ChannelHostMem` as
`max_outstanding_reads` (default 1). `CosimBSP`/`CosimBSP_DMA` take it too and
default to 4: the cosim host answers reads in order, and it keeps the feature
exercised by every cosim test.
Tests:
- IR-only generation tests for widths 64/256 and max_outstanding 1/2/64, and
a check that max_outstanding=0 is rejected.
- A cosim test (`test_hostmem_read.py`) with one host-driven `read_list`
client per element width (24, 32, 96 bits), run with max_outstanding_reads
1 and 4. It stalls the response side, checks that exactly min(#reads, N)
requests are held in flight, then checks data, per-request element counts
and `last` placement, and streams short reads back to back.
Co-authored-by: Copilot <[email protected]>1 parent a034e7d commit 65efea6
6 files changed
Lines changed: 539 additions & 96 deletions
File tree
- lib/Dialect/ESI/runtime
- python/esiaccel/bsp
- tests
- integration
- hw
- unit
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
22 | 34 | | |
23 | 35 | | |
24 | 36 | | |
| |||
0 commit comments