S0.4.1 Setup or Access

EasyImplement12 minIcarus Verilog · serverReview the topic

Name the phase of every edge in an APB capture and find the two transfer edges.

Hardware context: Lamp register on APB. Reading an APB waveform

This capture comes from the APB lab of lesson S0.4. The requester writes one value to the lamp register and reads it back at once. 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
EdgePSELPENABLEPREADYPWRITEPWDATAPRDATAlamps
000100x0
1100112x0
2110112x0
3110112x0
4111112x0
51010121212
61110121212
7001012x12

A transfer happens at an edge where PSEL, PENABLE and PREADY are all 1. The lamps column shows the register just before each edge.

EntryYour decision
WRITE_SETUPEdge of the setup phase of the write.
WRITE_WAITSNumber of wait states in the write.
WRITE_EDGEEdge where the write happens.
READ_SETUPEdge of the setup phase of the read.
READ_EDGEEdge where the read happens.
READ_VALUEValue the requester takes from PRDATA.
WRITE_SEL_EDGESNumber of edges that see PSEL at 1 during the write.
SETUP_COUNTNumber of edges in the whole capture with PSEL at 1 and PENABLE at 0.
ACCESS_EDGESNumber of edges in the whole capture that are in the access phase.
FEWESTFewest edges that any APB transfer can take.
LATE_READ_EDGEAt which edge would the read happen if the write needed EXTRA more wait states? The read still needs none.

Examples

Example 1

WRITE SETUP
Input
Edge of the setup phase of the write.
Output
matches = 1

Edge 1 sees PSEL at 1 and PENABLE at 0.

Example 2

WRITE WAITS
Input
Number of wait states in the write.
Output
matches = 1

Edges 2 and 3 are in the access phase with PREADY at 0.

Example 3

WRITE EDGE
Input
Edge where the write happens.
Output
matches = 1

Edge 4 is the first edge with PSEL, PENABLE and PREADY all at 1.

Constraints and Contract

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

Hints

Hint 1

PSEL at 0 is idle. PSEL at 1 with PENABLE at 0 is setup. Both at 1 is access.

Hint 2

In the access phase, the edge with PREADY at 1 is the transfer.

Hint 3

PREADY means nothing in the idle and setup rows.

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

11 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

WRITE SETUP

Input
Edge of the setup phase of the write.
Expected output
matches = 1

Edge 1 sees PSEL at 1 and PENABLE at 0.

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

Icarus Verilog · server