S1.2.1 Trace the Access

EasyImplement12 minIcarus Verilog · serverReview the topic

Reconstruct a peripheral read from an edge log, including a wait and the return trip.

Hardware context: GPIO peripheral read path. Memory-mapped I/O diagnosis

A manager issues one word read. The lab GPIO input word sits at offset 4. This Icarus capture uses a different pin value and two wait edges.

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
EdgeAHB requestAPB phasePREADYHREADYPRDATA
50x10001004idle010x00000000
6idlesetup000x00000091
7idleaccess000x00000091
8idleaccess000x00000091
9idleaccess110x00000091

GPIO starts at 0x10001000. Each row gives the signals sampled at that rising edge. The bridge returns PRDATA directly during access.

EntryYour decision
ISSUEEdge where the address is accepted.
OFFSETRegister offset in bytes.
SETUPEdge ending setup.
FIRST_ACCESSFirst edge sampling access.
WAIT_EDGESCount access edges with PREADY low.
ACCEPTEdge completing the peripheral read.
RETURNEdge completing the manager data phase.
VALUEReturned data as a decimal number.
ELAPSEDFull clock periods from address acceptance to data completion.
PHASESCount sampled cycles including the address cycle.
TRANSFERSHow many GPIO reads complete in the table?
LATE_EDGEWhich return edge would you see if GPIO added EXTRA_WAIT more access cycles to this trace?

Examples

Example 1

ISSUE
Input
Edge where the address is accepted.
Output
matches = 1

Edge 5 has a request and HREADY high.

Example 2

OFFSET
Input
Register offset in bytes.
Output
matches = 1

Subtract the GPIO base from the requested address to get four bytes.

Example 3

SETUP
Input
Edge ending setup.
Output
matches = 1

Edge 6 samples setup. Access follows it.

Constraints and Contract

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

Hints

Hint 1

Find an active address phase sampled with HREADY high.

Hint 2

Mark the last access edge, then subtract the address edge to find elapsed periods.

Hint 3

Look for a row where both buses complete together.

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

12 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

ISSUE

Input
Edge where the address is accepted.
Expected output
matches = 1

Edge 5 has a request and HREADY high.

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

Icarus Verilog · server