V12.3.1 Reading a Code and Toggle Report

MediumImplement22 minIcarus Verilog · serverReview the topic

Read the chip's recorded code and toggle report: what to count, what to ignore, and what it cost.

Hardware context: The structural coverage build of ap_soc v1.5: per-instance line, branch and toggle counters. Reading a toggle report with tied ports.

Recorded on ap_soc v1.5: the eight runs of the E11 suite on the structural coverage build. It counts lines, branches and toggles per instance (Verilator 5.053 devel). Percentages round down.

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

Replace each unresolved value of 65535 with your result.

Signals in the Timeline

SignalWidthRole
question8input of each check
Full specification
CodeHow to read the point
1A port tied by integration: list it with its reason, then ignore it
2A hole a test can close
3Alive: toggled both ways
4Logic the chip does not use: argue it out of the count with the design team
Summed over the eight runs.
Port0 to 11 to 0
u_timer.online80
u_timer.pwm55
u_timer.event_in00
u_crg.debug_reset_req00
u_crg.soft_reset_req00
u_crg.uart_gate.enable80
BlockLineBranchToggle directions
u_timer17/1726/32427/998
u_dm2/128/3013/772
u_tap4/274/506/268
u_fabric61/62265/3068896/16294

The §6.2 loop runs 1,300,028 system cycles. Medians of three runs: bare coverage tool 5.475 s, functional sampler 5.645 s, structural build 14.45 s.

EntryYour decision
ONLINEu_timer.online: tied high by connect.csv.
PWMu_timer.pwm.
EVENT_INu_timer.event_in: the event pin, routed from pad IO4 by PINMUX select 3.
DEBUG_REQu_crg.debug_reset_req: tied low in v1.5.
SOFT_REQu_crg.soft_reset_req.
UART_GATEu_crg.uart_gate.enable: rose but never fell.
TIMER_TOGGLEu_timer toggle coverage, percent.
DM_LINEu_dm line coverage, percent.
COSTStructural build time as a percent of the bare tool on the loop.
BLOCK_PCTToggle coverage of one block, in percent rounded down. K picks it: 0 u_timer, 1 u_dm, 2 u_tap, 3 u_fabric (the table above).

Examples

Example 1

ONLINE
Input
u_timer.online: tied high by connect.csv.
Output
matches = 1

It cannot fall on this chip; the report lists it with its integration reason.

Example 2

PWM
Input
u_timer.pwm.
Output
matches = 1

Both directions counted.

Example 3

EVENT IN
Input
u_timer.event_in: the event pin, routed from pad IO4 by PINMUX select 3.
Output
matches = 1

A routed function no test used: a test that selects it and pulses the pad closes it.

Constraints and Contract

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

Hints

Hint 1

A port tied by connect.csv can never toggle: list it, do not chase it.

Hint 2

A routed function that never moved is a test to write.

Hint 3

Percent is hit over total; cost is time over the bare build.

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

14 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

ONLINE

Input
u_timer.online: tied high by connect.csv.
Expected output
matches = 1

It cannot fall on this chip; the report lists it with its integration reason.

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

Icarus Verilog · server