S0.3.1 Find the Transfer Edge

EasyImplement12 minIcarus Verilog · serverReview the topic

Read a toy-bus capture and locate the edges where a write and a read really happen.

Hardware context: Toy bus with valid and ready. Reading any bus waveform

This capture comes from the toy bus of lesson S0.3. The manager writes one value to the lamp register, rests for one cycle, and reads it 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
Edgevalidreadywritewdatardatalamps
00000x0
11015x0
21015x0
31015x0
41115x0
50010x5
61000x5
71000x5
81000x5
9110055
100000x5

A transfer happens at an edge where valid and ready are both 1. The lamps column shows the register just before each edge.

EntryYour decision
FIRST_VALIDFirst edge that sees valid at 1.
WRITE_WAITSNumber of wait states before the write happens.
WRITE_EDGEEdge where the write happens.
FIRST_NEW_LAMPSFirst edge whose lamps column shows the new value.
WAITS_TOTALNumber of wait states in the whole capture.
IDLE_EDGEThe edge between the two transfers that sees valid at 0.
READ_EDGEEdge where the read happens.
READ_VALUEValue the manager takes from rdata.
READ_VALID_EDGESNumber of edges that see valid at 1 during the read.
LATE_READ_EDGEAt which edge would the read happen if the lamp register needed EXTRA more wait states in every transfer?

Examples

Example 1

FIRST VALID
Input
First edge that sees valid at 1.
Output
matches = 1

The manager raises valid before edge 1.

Example 2

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

Edges 1, 2 and 3 see valid at 1 and ready at 0.

Example 3

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

Edge 4 is the first edge with valid and ready both 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

Circle every row where valid and ready are both 1. Those are the transfers.

Hint 2

Rows with valid at 1 and ready at 0 are wait states.

Hint 3

A register written at an edge shows its new value at the next edge.

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

10 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 VALID

Input
First edge that sees valid at 1.
Expected output
matches = 1

The manager raises valid before edge 1.

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

Icarus Verilog · server