Carry one debug command across two independently delayed boundaries and report its result exactly once.
Hardware context: ap_soc debug bus manager. Bring-up before firmware runs
An authenticated command arrives at the debug manager. The matrix grants each address first and completes its data phase later. The host can request one word or a pair. Build the adapter that keeps track of both boundaries.
Signals in the Timeline
| Signal | Width | Role |
|---|---|---|
edge_index | 10 | input of each check |
cmd_start | 1 | input of each check |
address_grant | 1 | input of each check |
response_complete | 1 | input of each check |
Full specification
Sample every input on the rising edge. Synchronous reset wins in every phase and clears all outputs.
When idle, start captures address, store, pair and data_in. Present the saved address, direction and payload on bus_addr, bus_write and bus_data. Hold them until reset, another capture or the address advance below. Assert request starting just after capture.
While requesting, ignore start and complete. A grant at a later edge ends request. Wait for complete at a subsequent edge, ignoring grant and start.
pair=0 requests one word. With pair=1, a successful first transfer advances bus_addr by four bytes modulo 2^32. Reassert request for the second grant. Both transfers use the saved direction and write payload.
The first successful beat of a pair leaves done, failed and result unchanged. A fault on either beat ends the command. A completed first write remains committed if the second fails. Only the last successful read of a command can replace result.
At command completion pulse done for one cycle. Pulse failed on that same cycle only for a fault. A successful final read saves read_data. All other operations preserve result.
The next command may start on the edge after completion. There is no command queue. These are local adapter signals.
Examples
Example 1
Reset- Input
reset=1
- Output
request = 0, write = 0, done = 0, failed = 0, address = 0x0
Request, completion flags, saved command and result clear.
Example 2
First Read- Input
start=1, store=0, address=0x80000010
- Output
request = 1, write = 0, done = 0, failed = 0, address = 0x80000010
The adapter asserts request and saves this edge’s payload.
Example 3
Address Grant- Input
grant=1, complete=0
- Output
request = 0, write = 0, done = 0, failed = 0, address = 0x80000010
Request falls. The read result still holds zero.
Constraints and Contract
- Implement debug_access with one outstanding command. State and payload change only on rising edges.
Hints
Hint 1
Separate accepting a host command from winning a grant.
Hint 2
Keep the command identity through both grants and advance the address only after a successful first return.
Hint 3
Consider successful reads, writes and errors separately.
What the grader checks: State transitions, reset, saved fields and qualified completion are sampled after each edge.
869 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 2 problems on this path