Read a toy-bus capture and locate the edges where a write and a read really happen.
Hardware context: Toy bus with valid and ready. Reading any bus waveform
This capture comes from the toy bus of lesson S0.3. The manager writes one value to the lamp register, rests for one cycle, and reads it 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 | valid | ready | write | wdata | rdata | lamps |
|---|---|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 | x | 0 |
| 1 | 1 | 0 | 1 | 5 | x | 0 |
| 2 | 1 | 0 | 1 | 5 | x | 0 |
| 3 | 1 | 0 | 1 | 5 | x | 0 |
| 4 | 1 | 1 | 1 | 5 | x | 0 |
| 5 | 0 | 0 | 1 | 0 | x | 5 |
| 6 | 1 | 0 | 0 | 0 | x | 5 |
| 7 | 1 | 0 | 0 | 0 | x | 5 |
| 8 | 1 | 0 | 0 | 0 | x | 5 |
| 9 | 1 | 1 | 0 | 0 | 5 | 5 |
| 10 | 0 | 0 | 0 | 0 | x | 5 |
A transfer happens at an edge where valid and ready are both 1. The lamps column shows the register just before each edge.
| Entry | Your decision |
|---|---|
| FIRST_VALID | First edge that sees valid at 1. |
| WRITE_WAITS | Number of wait states before the write happens. |
| WRITE_EDGE | Edge where the write happens. |
| FIRST_NEW_LAMPS | First edge whose lamps column shows the new value. |
| WAITS_TOTAL | Number of wait states in the whole capture. |
| IDLE_EDGE | The edge between the two transfers that sees valid at 0. |
| READ_EDGE | Edge where the read happens. |
| READ_VALUE | Value the manager takes from rdata. |
| READ_VALID_EDGES | Number of edges that see valid at 1 during the read. |
| LATE_READ_EDGE | At which edge would the read happen if the lamp register needed EXTRA more wait states in every transfer? |
Examples
Example 1
FIRST VALID- Input
First edge that sees valid at 1.
- Output
matches = 1
The manager raises valid before edge 1.
Example 2
WRITE WAITS- Input
Number of wait states before the write happens.
- Output
matches = 1
Edges 1, 2 and 3 see valid at 1 and ready at 0.
Example 3
WRITE EDGE- Input
Edge where the write happens.
- Output
matches = 1
Edge 4 is the first edge with valid and ready both 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
Circle every row where valid and ready are both 1. Those are the transfers.
Hint 2
Rows with valid at 1 and ready at 0 are wait states.
Hint 3
A register written at an edge shows its new value at the next edge.
What the grader checks: Each check compares the full eight-bit answer. Parameter trials change one condition and keep the other decisions fixed.
10 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