Share one RAM port among three clients. Make a turn count only when a winner actually uses it.
Hardware context: ap_soc destination arbiter. DMA and processor memory sharing
Extend the ap_soc SRAM arbitration point to a third requester for debug. The local scheduler chooses among three one-beat requests at each opportunity. A separate input stage holds the transfers.
Signals in the Timeline
| Signal | Width | Role |
|---|---|---|
sample | 10 | input of each check |
Full specification
Request and grant use bits 0, 1 and 2 in cyclic order. Choose the first requesting client starting at the preferred position. Drive zero when nobody asks.
Synchronous active-low reset sets the next preference to client 0. On a rising edge with take high and a winner, start the next search just after that winner. Otherwise preserve preference, including during idle.
The judge samples the combinational grant before the clock edge. Reset controls preference at the edge.
Examples
Example 1
Empty Port- Input
reset_n=0, take=0, request=000
- Output
grant = 0x0
The reset edge sees no requests.
Example 2
All Three Ask- Input
reset_n=1, take=1, request=111
- Output
grant = 0x1
Client zero takes the first turn.
Example 3
Backpressure- Input
reset_n=1, take=0, request=111
- Output
grant = 0x2
The grant shows who is next even though this edge cannot take it.
Constraints and Contract
- Build the local scheduler. Skip empty clients without spending cycles.
Hints
Hint 1
Write the service order for each possible last winner.
Hint 2
A hole in the request vector costs no time.
Hint 3
Count completed turns.
What the grader checks: All request masks and both accept states after every possible winner, including reset and empty cycles.
291 checks on Icarus Verilog · server. Run the examples first, then check the full regression. Full checks use the server judge. Downloads contain your source only; samples require the simulation service. A passing result establishes the tested cases, not a proof for all possible inputs.
See all 3 problems on this path