S4.12.1 Find the Error

EasyImplement12 minIcarus Verilog · serverReview the topic

Find both cycles of an AHB error in a capture, and what the error costs the read behind it.

Hardware context: AHB bus with SRAM and a default subordinate. Reading a bus error in an AHB waveform

This capture comes from the lab of lesson S4.12. The bus has SRAM at 0x8000_0000 and a default subordinate for every other address. The manager only reads. When it sees the first cycle of an error, it cancels the request that is waiting and asks for it again.

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
EdgeHTRANSHADDRHREADYHRESPHRDATA
0IDLE0000000010xxxxxxxx
1IDLE4000000010xxxxxxxx
2NONSEQ8000000810xxxxxxxx
3NONSEQ4000000010000000a2
4NONSEQ8000000c01xxxxxxxx
5IDLE8000000c11xxxxxxxx
6NONSEQ8000000c10xxxxxxxx
7NONSEQ8000000010000000a3
8IDLE8000000010000000a0
9IDLE8000000010xxxxxxxx

Each row is what one rising clock edge sees. An address is taken at an edge that sees HTRANS at NONSEQ and HREADY at 1. Its data phase ends at the next edge that sees HREADY at 1. Enter edges as plain numbers, and values in decimal: 0xA2 is 162.

EntryYour decision
FIRST_ADDREdge that takes the address of the first read.
FIRST_DATAEdge where the first read happens.
FIRST_VALUEValue that the first read returns, in decimal.
IDLE_READYHREADY at edge 2. Edge 1 saw an idle cycle that pointed at a hole.
HOLE_ADDREdge that takes the address of the read of the hole.
ERROR_FIRSTEdge that sees the first cycle of the error.
ERROR_ENDEdge where the failed read ends.
WAIT_EDGESNumber of edges that see HREADY at 0.
CANCEL_EDGEEdge that sees the cancelled request as IDLE.
RETRY_ADDREdge that takes the address 8000000c at last.
RETRY_VALUEValue that the read of 8000000c returns, in decimal.
LAST_EDGEEdge where the last read happens.
LATE_LAST_EDGEAt which edge would the last read happen if the manager first tried N more reads of a hole, right after the idle cycle?

Examples

Example 1

FIRST ADDR
Input
Edge that takes the address of the first read.
Output
matches = 1

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

Example 2

FIRST DATA
Input
Edge where the first read happens.
Output
matches = 1

SRAM answers in one cycle: HREADY is 1 and HRESP is 0 at edge 3.

Example 3

FIRST VALUE
Input
Value that the first read returns, in decimal.
Output
matches = 1

HRDATA at edge 3 is 0xA2, which is 162.

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 is one address taken.

Hint 2

For each edge, read HREADY and HRESP together. HRESP at 1 with HREADY at 0 is the first cycle of an error.

Hint 3

The request that waits during the error is shown, cancelled, and then shown again.

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 takes the address of the first read.
Expected output
matches = 1

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

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

Icarus Verilog · server