Name the phase of every edge in an APB capture and find the two transfer edges.
Hardware context: Lamp register on APB. Reading an APB waveform
This capture comes from the APB lab of lesson S0.4. The requester writes one value to the lamp register and reads it back at once. 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 | PSEL | PENABLE | PREADY | PWRITE | PWDATA | PRDATA | lamps |
|---|---|---|---|---|---|---|---|
| 0 | 0 | 0 | 1 | 0 | 0 | x | 0 |
| 1 | 1 | 0 | 0 | 1 | 12 | x | 0 |
| 2 | 1 | 1 | 0 | 1 | 12 | x | 0 |
| 3 | 1 | 1 | 0 | 1 | 12 | x | 0 |
| 4 | 1 | 1 | 1 | 1 | 12 | x | 0 |
| 5 | 1 | 0 | 1 | 0 | 12 | 12 | 12 |
| 6 | 1 | 1 | 1 | 0 | 12 | 12 | 12 |
| 7 | 0 | 0 | 1 | 0 | 12 | x | 12 |
A transfer happens at an edge where PSEL, PENABLE and PREADY are all 1. The lamps column shows the register just before each edge.
| Entry | Your decision |
|---|---|
| WRITE_SETUP | Edge of the setup phase of the write. |
| WRITE_WAITS | Number of wait states in the write. |
| WRITE_EDGE | Edge where the write happens. |
| READ_SETUP | Edge of the setup phase of the read. |
| READ_EDGE | Edge where the read happens. |
| READ_VALUE | Value the requester takes from PRDATA. |
| WRITE_SEL_EDGES | Number of edges that see PSEL at 1 during the write. |
| SETUP_COUNT | Number of edges in the whole capture with PSEL at 1 and PENABLE at 0. |
| ACCESS_EDGES | Number of edges in the whole capture that are in the access phase. |
| FEWEST | Fewest edges that any APB transfer can take. |
| LATE_READ_EDGE | At which edge would the read happen if the write needed EXTRA more wait states? The read still needs none. |
Examples
Example 1
WRITE SETUP- Input
Edge of the setup phase of the write.
- Output
matches = 1
Edge 1 sees PSEL at 1 and PENABLE at 0.
Example 2
WRITE WAITS- Input
Number of wait states in the write.
- Output
matches = 1
Edges 2 and 3 are in the access phase with PREADY at 0.
Example 3
WRITE EDGE- Input
Edge where the write happens.
- Output
matches = 1
Edge 4 is the first edge with PSEL, PENABLE and PREADY all at 1.
Constraints and Contract
- Keep the parameter and named constants. Use the numeric codes and units on this page.
- For LATE_READ_EDGE, enter a constant expression using EXTRA. Only this entry changes with the parameter. The supported integer range is 0 through 15, inclusive.
Hints
Hint 1
PSEL at 0 is idle. PSEL at 1 with PENABLE at 0 is setup. Both at 1 is access.
Hint 2
In the access phase, the edge with PREADY at 1 is the transfer.
Hint 3
PREADY means nothing in the idle and setup rows.
What the grader checks: Each check compares the full eight-bit answer. Parameter trials change one condition and keep the other decisions fixed.
11 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