Follow a timeout through a capture: when the unit gives up, how long the ID stays closed, and what the late reply would have done.
Hardware context: A timeout unit between one manager and a device with a slow register. Reviewing error recovery on a bus with a time limit
This capture comes from the lab of lesson S4.15, with other numbers. A manager reaches one device through a timeout unit. Read A asks for the slow register TEMP with ID 1. Read B asks for the fast register COUNT with the same ID. Then a write to START, with ID 2, starts a motor. After a timeout, the unit closes the ID until its late reply has come.
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 | Offered by the manager | Unit waits for | Timer | Closed IDs (3, 2, 1, 0) | Reply ID | Reply data |
|---|---|---|---|---|---|---|
| 0 | READ TEMP id1 | - | - | 0000 | - | - |
| 1 | - | ID 1 | 0 | 0000 | - | - |
| 2 | - | ID 1 | 1 | 0000 | - | - |
| 3 | - | ID 1 | 2 | 0000 | - | - |
| 4 | READ COUNT id1 | - | - | 0010 | - | - |
| 5 | READ COUNT id1 | - | - | 0010 | - | - |
| 6 | READ COUNT id1 | - | - | 0010 | - | - |
| 7 | READ COUNT id1 | - | - | 0010 | 1 | d5 |
| 8 | READ COUNT id1 | - | - | 0000 | - | - |
| 9 | - | ID 1 | 0 | 0000 | - | - |
| 10 | - | ID 1 | 1 | 0000 | 1 | 00 |
| 11 | WRITE START id2 | - | - | 0000 | - | - |
| 12 | - | ID 2 | 0 | 0000 | - | - |
| 13 | - | ID 2 | 1 | 0000 | - | - |
| 14 | - | ID 2 | 2 | 0000 | - | - |
| 15 | READ COUNT id3 | - | - | 0100 | - | - |
| 16 | - | ID 3 | 0 | 0100 | - | - |
| 17 | - | ID 3 | 1 | 0100 | 3 | 01 |
| 18 | - | - | - | 0100 | 2 | 00 |
Each row is what one rising clock edge sees. A request is passed on to the device at an edge that sees it offered, with the unit not waiting and the ID not closed. The unit gives up at the edge that sees its timer one below the limit. A fast register answers two edges after its request is passed on. Enter edges as plain numbers, and data in decimal: 0xD5 is 213.
| Entry | Your decision |
|---|---|
| PASS_A | Edge that passes read A on to the device. |
| TIMEOUT_A | Edge at which the unit gives up on read A. |
| LIMIT | The limit of this unit: edges from passing a request on to giving up. |
| CLOSED_ID | ID that is closed after that timeout. |
| HELD_EDGES | Number of edges at which read B is offered and not passed on. |
| LATE_EDGE | Edge at which the late reply to read A arrives. |
| LATE_VALUE | Data in that late reply, in decimal. |
| PASS_B | Edge that passes read B on to the device. |
| REPLY_B | Edge at which read B gets its reply. |
| REUSE_EDGE | Edge at which read B would get a reply if the unit closed no ID. Read B is then passed on at edge 4. The late reply still arrives at edge 7. |
| WRITE_TIMEOUT | Edge at which the unit gives up on the write. |
| COUNT_VALUE | Value that the read of COUNT with ID 3 returns. |
| ANSWER_B | At which edge would read B get its reply if the device needed N edges for the slow register, in place of 7? |
Examples
Example 1
PASS A- Input
Edge that passes read A on to the device.
- Output
matches = 1
Edge 0 sees the request offered, the unit not waiting and no ID closed.
Example 2
TIMEOUT A- Input
Edge at which the unit gives up on read A.
- Output
matches = 1
Edge 3 is the last edge that sees the unit waiting for ID 1. From edge 4 the ID is closed.
Example 3
LIMIT- Input
The limit of this unit: edges from passing a request on to giving up.
- Output
matches = 1
Passed on at edge 0, given up at edge 3.
Constraints and Contract
- Keep the parameter and named constants. Use the numeric codes and units on this page.
- For ANSWER_B, enter a constant expression using N. Only this entry changes with the parameter. The supported integer range is 4 through 19, inclusive.
Hints
Hint 1
Mark every edge at which a request is passed on: it is offered, the unit waits for nothing and its ID is open.
Hint 2
A request ends with a reply that carries its ID, or with the timer reaching the limit.
Hint 3
After a timeout the ID stays closed until a reply with that ID has arrived.
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