S8.7.2 Measure Latency and Throughput

MediumVerify22 minIcarus Verilog · server9 hidden designsReview the topic

Check a DMA performance report against the raw handshakes and the timestamps of one tagged byte.

Hardware context: UART receive to DMA to SRAM. Streaming peripheral and memory integration

Each report covers eight SRAM edges. Bit zero in each mask is the earliest edge. The sink accepts one byte when both corresponding bits are set. Report throughput as the numerator in bytes per eight cycles.

Signals in the Timeline

SignalWidthRole
capture4input of each check
Full specification

arrival and finish_stamp follow one tagged byte, which may have entered before the window. The four-bit timestamps wrap. Its true latency is between zero and fifteen elapsed cycles.

Examples

Example 1

Matching Reports
Input
All eight accepted, duration zero, fields (0,8). Later reports also agree.
Output
alarm = no

Every numerator and tagged duration agrees across the capture.

Example 2

First Disputed Report
Input
A tagged byte takes seven cycles. One report claims six.
Output
alarm = yes

One tagged duration changes by one cycle.

Example 3

Second Disputed Report
Input
A tagged byte takes seven cycles. One report claims five.
Output
alarm = yes

One tagged duration changes by two cycles.

Constraints and Contract

  • Assert combinational alarm if either reported field differs from your measurement. last_window marks the final report in a capture. Check each report independently, including quiet windows and timestamps crossing zero. All inputs are binary.

Hints

Hint 1

Mark the edges accepted by both sides.

Hint 2

Use the stated timestamp width when the clock wraps.

Hint 3

Consider a bad report followed by a good one.

What the grader checks: Good and transient faulty reports exercise every comparison bit and a final clean replay.

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

Matching Reports

Input
All eight accepted, duration zero, fields (0,8). Later reports also agree.
Expected output
alarm = no

Every numerator and tagged duration agrees across the capture.

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

Icarus Verilog · server