V1.4.2 Rank the Plan by Risk

MediumImplement22 minIcarus Verilog · serverReview the topic

Score chip features by likelihood and impact, put them in order, and find how many fit in the days you have.

Hardware context: The chip-level verification plan of ap_soc. Cutting a plan to the days the schedule allows.

Exercise values for a small plan. Risk is likelihood times impact, each from 1 to 5. Features with higher risk go first; a tie keeps the table order.

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

Replace each unresolved value of 255 with your result.

Signals in the Timeline

SignalWidthRole
question8input of each check
Full specification
CodeFeatureLikelihoodImpactDays to verify
1Boot from ROM553
2UART echo342
3DMA copy444
4GPIO pins231
5Timer interrupt432
6Watchdog reset353

Spending rule: walk the features in risk order. Take a feature if its days still fit in what is left; otherwise skip it and try the next.

EntryYour decision
RISK_BOOTRisk score of boot from ROM.
RISK_DMARisk score of DMA copy.
FIRSTCode of the feature with the highest risk.
SECONDCode of the feature in second place.
THIRDCode of the feature in third place.
LASTCode of the feature in last place.
TOTAL_DAYSDays to verify every feature.
FIT_10How many features fit in 10 days?
FIT_12How many features fit in 12 days?
FITHow many features fit in DAYS days, by the spending rule?

Examples

Example 1

RISK BOOT
Input
Risk score of boot from ROM.
Output
matches = 1

Likelihood 5 times impact 5.

Example 2

RISK DMA
Input
Risk score of DMA copy.
Output
matches = 1

4 times 4.

Example 3

FIRST
Input
Code of the feature with the highest risk.
Output
matches = 1

Boot, with 25, is the highest.

Constraints and Contract

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

Hints

Hint 1

Multiply likelihood by impact.

Hint 2

Highest risk first; ties keep table order.

Hint 3

Take what fits; skip what does not, and keep going.

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

RISK BOOT

Input
Risk score of boot from ROM.
Expected output
matches = 1

Likelihood 5 times impact 5.

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

Icarus Verilog · server