S10.3.1 Count the Hops and the Latency

MediumImplement22 minIcarus Verilog · serverReview the topic

Account for both legs of a cache miss, including a link wait and a busy home node.

Hardware context: Four-router teaching mesh. On-chip network design

A request leaves (3,1) for its home at (0,3). The reply returns to the requester. These are exercise costs.

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

Both packets take shortest paths on a rectangular mesh without wraparound. A hop crosses one link.

Charge two periods per hop on either leg. The request waits three extra periods for credit. The home spends four periods preparing the reply.

The reply has its own wait, RETURN_WAIT. Count from injection to arrival. Local injection and delivery are free.

EntryYour decision
X_LINKSHorizontal links on the request.
Y_LINKSVertical links on the request.
HOMEPeriods spent at the home.
OUT_HOPSLinks crossed before home delivery.
BASEOne-way periods with every link available.
ARRIVALHome arrival edge for injection at edge zero.
REPLY_STARTEdge when the reply leaves home.
ROUND_HOPSTotal traversals including the reply.
PRIORITYGrants to bulk over six opportunities if urgent always wins and both stay queued.
CREDITSLink credits remaining from four after three flits and one returned credit.
TRACKERWho tracks coherence for the address? Enter 1 for requester, 2 for home or 3 for memory subordinate.
DONECompletion edge including RETURN_WAIT extra reply periods.

Examples

Example 1

X LINKS
Input
Horizontal links on the request.
Output
x_links = 3

Going from column three to column zero crosses three links.

Example 2

Y LINKS
Input
Vertical links on the request.
Output
y_links = 2

Rows one and three are two links apart.

Example 3

HOME
Input
Periods spent at the home.
Output
home = 4

The endpoint takes four periods after request arrival.

Constraints and Contract

  • Keep the parameter and named constants. Use the numeric codes and units on this page.
  • For DONE, enter a constant expression using RETURN_WAIT. Only this entry changes with the parameter. The supported integer range is 0 through 15, inclusive.

Hints

Hint 1

Mark the start and end coordinates for each packet.

Hint 2

Separate router progress from home service and link stalls.

Hint 3

Use the injection edge as time zero.

What the grader checks: Each check compares the full eight-bit answer. Parameter trials change one condition and keep the other decisions fixed.

15 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 2 problems 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

X LINKS

Input
Horizontal links on the request.
Expected output
x_links = 3

Going from column three to column zero crosses three links.

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

Icarus Verilog · server