S0.5.1 Address Phase or Data Phase

EasyImplement12 minIcarus Verilog · serverReview the topic

Pair every address with its data in a two-bus capture, and find what the bridge costs.

Hardware context: Memory on AHB and a lamp register on APB behind a bridge. Reading an AHB waveform

This capture comes from the lab of lesson S0.5. Memory is at addresses 0 to 13 on AHB. The lamp register is at address 14 on APB, behind the bridge. The manager sends four transfers back to 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

SignalWidthRole
question8input of each check
Full specification
EdgeHTRANSHADDRHWRITEHWDATAHRDATAHREADYPSELPENABLElamps
0IDLE000x1000
1NONSEQ510x1000
2NONSEQ1414x1000
3NONSEQ14012x0100
4NONSEQ14012x1110
5NONSEQ5012x01012
6NONSEQ50121211112
7IDLE5012410012
8IDLE5012x10012

An address phase ends at an edge that sees its HTRANS at NONSEQ and HREADY at 1. The data phase starts after that edge, and ends at the next edge that sees HREADY at 1. The lamps column shows the register just before each edge.

EntryYour decision
FIRST_ADDREdge that ends the address phase of the first transfer.
FIRST_DATAEdge that ends the data phase of the first transfer.
FIRST_VALUEValue that the first transfer writes to memory.
FIRST_BOXAddress that the first transfer writes.
LAMP_WRITE_ADDREdge that ends the address phase of the write to the lamps.
LAMP_WRITE_EDGEEdge where the write to the lamps happens.
WAIT_STATESNumber of AHB wait states in the whole capture.
HELD_EDGESNumber of edges that see the address phase of the read of the lamps.
LAMP_READ_EDGEEdge where the read of the lamps happens.
LAMP_READ_VALUEValue that the read of the lamps returns.
LAST_READ_EDGEEdge where the read of memory happens.
LAST_READ_VALUEValue that the read of memory returns.
LATE_LAST_EDGEAt which edge would the last read happen if the manager first sent N more writes to memory, ahead of everything else?

Examples

Example 1

FIRST ADDR
Input
Edge that ends the address phase of the first transfer.
Output
matches = 1

Edge 1 is the first to see NONSEQ, and HREADY is 1 there.

Example 2

FIRST DATA
Input
Edge that ends the data phase of the first transfer.
Output
matches = 1

The data phase follows the address phase by one edge, and memory needs no wait state.

Example 3

FIRST VALUE
Input
Value that the first transfer writes to memory.
Output
matches = 1

HWDATA at edge 2 is 4. The 12 seen later belongs to the next transfer.

Constraints and Contract

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

Hints

Hint 1

Mark every edge with HTRANS at NONSEQ and HREADY at 1. Each mark ends one address phase.

Hint 2

After each mark, the next edge with HREADY at 1 ends that transfer's data phase.

Hint 3

An edge inside a data phase with HREADY at 0 is a wait state. Here the bridge causes them.

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

FIRST ADDR

Input
Edge that ends the address phase of the first transfer.
Expected output
matches = 1

Edge 1 is the first to see NONSEQ, and HREADY is 1 there.

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

Icarus Verilog · server