Repair the handoff at a memory port where a rival splits an in-flight DMA burst.
Hardware context: ap_soc destination arbiter. DMA and processor memory sharing
A two-client ap_soc output stage reserves an entire burst. DMA loses the middle of its copy when the processor also asks for SRAM. Repair the reservation without inventing a transfer during an empty beat.
Signals in the Timeline
| Signal | Width | Role |
|---|---|---|
sample | 10 | input of each check |
Full specification
On a free port, client 0 beats client 1 on a tie. Each grant bit offers service to that requester. With a reservation only the owner may receive a grant, and only while it requests.
Sample ready, last and locked for the granted beat at a rising edge. A waiting granted beat reserves the port for its requester. An accepted nonfinal beat reserves the port. An accepted locked beat reserves it even at a burst end.
An accepted final beat with locked low releases the port for the next cycle. With no grant, hold the reservation across the gap. Synchronous active-low reset clears the reservation regardless of the inputs.
Examples
Example 1
Quiet Reset- Input
reset_n=0, request=0, ready=1, last=1, locked=0
- Output
offer_before_edge = 0x0, reply_after_edge = 0x0
No client asks during reset.
Example 2
DMA Starts- Input
reset_n=1, request=2, ready=1, last=0, locked=0
- Output
offer_before_edge = 0x2, reply_after_edge = 0x2
DMA alone takes a nonfinal beat.
Example 3
CPU Arrives- Input
reset_n=1, request=3, ready=1, last=1, locked=0
- Output
offer_before_edge = 0x2, reply_after_edge = 0x2
A higher-priority rival must wait for the reserved sequence.
Constraints and Contract
- The data switch also needs reply_to. On synchronous reset clear it. When ready is high, register the offered grant, including zero during a bubble. During a wait keep the previous reply_to. A new address may be competing while the old data phase still belongs to DMA.
- The request vector can change between edges. Observe the combinational grant before each rising edge. This exercise specifies a local whole-burst policy.
Hints
Hint 1
Draw the ownership interval around two accepted beats.
Hint 2
A final beat can wait too.
Hint 3
Distinguish a reservation from an active transfer.
What the grader checks: All binary controls from free, CPU-owned and DMA-owned states, including a follow-on tie.
803 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