V13.3.2 Where the Hybrid's Time Goes

MediumImplement22 minIcarus Verilog · serverReview the topic

Read the hybrid's own counters from two recorded runs. Work out where its simulated time goes, and what timing it gives up.

Hardware context: The hybrid: ap_iss with RTL peripherals behind a synthesizable AHB transactor. Where the hybrid's time goes.

The hybrid counts system ticks, model steps, transactor requests and ticks spent inside requests (bus ticks are part of the total). Recorded on 2026-11-29 on one laptop: 13th Gen Intel(R) Core(TM) i7-13645HX, 16 threads, 12 GiB, WSL2. Other jobs were running (load average 4.8 at the start). Medians of three runs of at least one second each.

This worksheet uses named constants. The first three entries show how to record your decisions.

Replace each unresolved value of 4294967295 with your result.

Signals in the Timeline

SignalWidthRole
question8input of each check
Full specification
RunStepsRequestsBus ticksAll ticks
SRAM checksum1,250,114281,250,143
SPI polling536,118184,003736,0121,272,151
Platformmtime ticks across 64 nops
fw65
vp65
hybrid, IPC 168
hybrid, IPC 168
IPCInstructions from a raised interrupt to the trap
10
43
1615
6463
CodeOutside the hybrid's timing model
1The value each instruction computes
2The order of bus phases on a device access
3Pipeline stalls and the timing of instruction fetches
4How many bits the UART sends for a byte
EntryYour decision
TICKS_PER_REQUESTBus ticks per transactor request in the SPI run.
BUS_PERCENTPer cent of the SPI run's ticks spent inside requests. (round down)
LOCAL_TICKSTicks of the SPI run outside requests.
CHECKSUM_REQUESTSTransactor requests in the whole checksum run.
NOPS_IPC16mtime ticks across 64 nops on the hybrid at IPC 16.
NOPS_RTLmtime ticks across 64 nops on chip RTL.
LATENCY_IPC16Retired instructions between the IRQ and the trap at IPC 16.
LOSTWhat is outside the hybrid's timing model? (code)
WORST_LATENCYAt IPC N, how many retired instructions may lie between a raised interrupt and the trap, at most?

Examples

Example 1

TICKS PER REQUEST
Input
Bus ticks per transactor request in the SPI run.
Output
matches = 1

736,012 / 184,003.

Example 2

BUS PERCENT
Input
Per cent of the SPI run's ticks spent inside requests. (round down)
Output
matches = 1

Bus ticks over all ticks.

Example 3

LOCAL TICKS
Input
Ticks of the SPI run outside requests.
Output
matches = 1

All ticks minus bus ticks: one tick per local step at IPC 1.

Constraints and Contract

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

Hints

Hint 1

Bus ticks are the RTL's; the rest are model steps.

Hint 2

At least three ticks each: capture, address, data.

Hint 3

The model executes; it does not stall, overlap or gate its clock.

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

TICKS PER REQUEST

Input
Bus ticks per transactor request in the SPI run.
Expected output
matches = 1

736,012 / 184,003.

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

Icarus Verilog · server