S4.15.1 Follow the Late Reply

EasyImplement12 minIcarus Verilog · serverReview the topic

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

SignalWidthRole
question8input of each check
Full specification
EdgeOffered by the managerUnit waits forTimerClosed IDs (3, 2, 1, 0)Reply IDReply data
0READ TEMP id1--0000--
1-ID 100000--
2-ID 110000--
3-ID 120000--
4READ COUNT id1--0010--
5READ COUNT id1--0010--
6READ COUNT id1--0010--
7READ COUNT id1--00101d5
8READ COUNT id1--0000--
9-ID 100000--
10-ID 110000100
11WRITE START id2--0000--
12-ID 200000--
13-ID 210000--
14-ID 220000--
15READ COUNT id3--0100--
16-ID 300100--
17-ID 310100301
18---0100200

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.

EntryYour decision
PASS_AEdge that passes read A on to the device.
TIMEOUT_AEdge at which the unit gives up on read A.
LIMITThe limit of this unit: edges from passing a request on to giving up.
CLOSED_IDID that is closed after that timeout.
HELD_EDGESNumber of edges at which read B is offered and not passed on.
LATE_EDGEEdge at which the late reply to read A arrives.
LATE_VALUEData in that late reply, in decimal.
PASS_BEdge that passes read B on to the device.
REPLY_BEdge at which read B gets its reply.
REUSE_EDGEEdge 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_TIMEOUTEdge at which the unit gives up on the write.
COUNT_VALUEValue that the read of COUNT with ID 3 returns.
ANSWER_BAt 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

Report a problem with this page

Your code SystemVerilogSaved locally
Ln 1, Col 1Tab indents · Ctrl/⌘ + Enter runs samples
Not run yet

PASS A

Input
Edge that passes read A on to the device.
Expected output
matches = 1

Edge 0 sees the request offered, the unit not waiting and no ID closed.

Run samples executes all 3 public checks. Check all tests runs 13 checks on the server.

Icarus Verilog · server