Skip to content

Commit 65efea6

Browse files
teqdruidCopilot
andcommitted
[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/CHANGELOG.md‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,18 @@
1919

2020
### Added
2121

22+
- **Multiple outstanding host memory reads per client.**
23+
`HostMemReadReqSplitter` takes a new optional `max_outstanding` parameter
24+
(default `1`, which keeps the previous one-request-at-a-time behavior). With
25+
a larger value it accepts up to that many logical read requests while
26+
earlier ones are still returning data, and frames each request's response
27+
burst (`last`, `valid_bytes`) from a small metadata FIFO. Single-chunk
28+
requests can be accepted every cycle and response bursts flow back to back
29+
with no bubble. The upstream must return each client's response words in
30+
request order. `HostmemReadProcessor` and `ChannelHostMem` pass the limit
31+
through as `max_outstanding_reads` (default `1`). `CosimBSP` and
32+
`CosimBSP_DMA` take the same parameter and default it to `4`, since the
33+
cosim host answers reads in order.
2234
- `HostMem.start()` is now available from Python, so Python code can enable
2335
the host memory service (needed before the accelerator reads host memory
2436
under cosim).

0 commit comments

Comments
 (0)