Pair every address with its data in a two-bus capture, and find what the bridge costs.
Hardware context: Memory on AHB and a lamp register on APB behind a bridge. Reading an AHB waveform
This capture comes from the lab of lesson S0.5. Memory is at addresses 0 to 13 on AHB. The lamp register is at address 14 on APB, behind the bridge. The manager sends four transfers back to back. Each row is what one rising clock edge sees.
This worksheet uses named constants. The first three entries show how to record your decisions.
Signals in the Timeline
| Signal | Width | Role |
|---|---|---|
question | 8 | input of each check |
Full specification
| Edge | HTRANS | HADDR | HWRITE | HWDATA | HRDATA | HREADY | PSEL | PENABLE | lamps |
|---|---|---|---|---|---|---|---|---|---|
| 0 | IDLE | 0 | 0 | 0 | x | 1 | 0 | 0 | 0 |
| 1 | NONSEQ | 5 | 1 | 0 | x | 1 | 0 | 0 | 0 |
| 2 | NONSEQ | 14 | 1 | 4 | x | 1 | 0 | 0 | 0 |
| 3 | NONSEQ | 14 | 0 | 12 | x | 0 | 1 | 0 | 0 |
| 4 | NONSEQ | 14 | 0 | 12 | x | 1 | 1 | 1 | 0 |
| 5 | NONSEQ | 5 | 0 | 12 | x | 0 | 1 | 0 | 12 |
| 6 | NONSEQ | 5 | 0 | 12 | 12 | 1 | 1 | 1 | 12 |
| 7 | IDLE | 5 | 0 | 12 | 4 | 1 | 0 | 0 | 12 |
| 8 | IDLE | 5 | 0 | 12 | x | 1 | 0 | 0 | 12 |
An address phase ends at an edge that sees its HTRANS at NONSEQ and HREADY at 1. The data phase starts after that edge, and ends at the next edge that sees HREADY at 1. The lamps column shows the register just before each edge.
| Entry | Your decision |
|---|---|
| FIRST_ADDR | Edge that ends the address phase of the first transfer. |
| FIRST_DATA | Edge that ends the data phase of the first transfer. |
| FIRST_VALUE | Value that the first transfer writes to memory. |
| FIRST_BOX | Address that the first transfer writes. |
| LAMP_WRITE_ADDR | Edge that ends the address phase of the write to the lamps. |
| LAMP_WRITE_EDGE | Edge where the write to the lamps happens. |
| WAIT_STATES | Number of AHB wait states in the whole capture. |
| HELD_EDGES | Number of edges that see the address phase of the read of the lamps. |
| LAMP_READ_EDGE | Edge where the read of the lamps happens. |
| LAMP_READ_VALUE | Value that the read of the lamps returns. |
| LAST_READ_EDGE | Edge where the read of memory happens. |
| LAST_READ_VALUE | Value that the read of memory returns. |
| LATE_LAST_EDGE | At which edge would the last read happen if the manager first sent N more writes to memory, ahead of everything else? |
Examples
Example 1
FIRST ADDR- Input
Edge that ends the address phase of the first transfer.
- Output
matches = 1
Edge 1 is the first to see NONSEQ, and HREADY is 1 there.
Example 2
FIRST DATA- Input
Edge that ends the data phase of the first transfer.
- Output
matches = 1
The data phase follows the address phase by one edge, and memory needs no wait state.
Example 3
FIRST VALUE- Input
Value that the first transfer writes to memory.
- Output
matches = 1
HWDATA at edge 2 is 4. The 12 seen later belongs to the next transfer.
Constraints and Contract
- Keep the parameter and named constants. Use the numeric codes and units on this page.
- For LATE_LAST_EDGE, enter a constant expression using N. Only this entry changes with the parameter. The supported integer range is 0 through 15, inclusive.
Hints
Hint 1
Mark every edge with HTRANS at NONSEQ and HREADY at 1. Each mark ends one address phase.
Hint 2
After each mark, the next edge with HREADY at 1 ends that transfer's data phase.
Hint 3
An edge inside a data phase with HREADY at 0 is a wait state. Here the bridge causes them.
What the grader checks: Each check compares the full eight-bit answer. Parameter trials change one condition and keep the other decisions fixed.
13 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 1 problem on this path