S1.3.2 The Parameter Nobody Passed

EasyFix15 minIcarus Verilog · serverReview the topic

Three guard timers come from one delivered block. One of them reports "late" far too early. Find the instance and repair the top level.

Hardware context: A delivered IP block and the files that come with it. IP intake and SoC integration

A top level holds three guard timers. Each raises its late output when nobody has kicked it for too long.

In the lab, one guard fires long before its limit. The delivered block is correct. Repair the top level.

Signals in the Timeline

SignalWidthRole
step12input of each check
Full specification
Delivered blockParameterPorts
ip_timeoutWIDTH, the bits of its counter and of its limit. The default is 4.clk; rst_n, a reset that is active at 0; kick; limit, WIDTH bits wide; expired

ip_timeout counts rising clock edges without a kick. When the count has reached limit, the next such edge raises expired. A kick clears the count and expired.

InstanceKicked byLimitOutput
u_akick_a5late_a
u_bkick_b40late_b
u_ckick_c20late_c

The port reset of the top level is active at 1.

Examples

Example 1

Reset
Input
Reset
Output
late_a = 0, late_b = 0, late_c = 0

Reset clears all three guards.

Example 2

First Edge After Reset
Input
First edge after reset
Output
late_a = 0, late_b = 0, late_c = 0

One edge is far below every limit.

Example 3

Kick All Three
Input
Kick all three
Output
late_a = 0, late_b = 0, late_c = 0

A kick restarts each count.

Constraints and Contract

  • Keep module guard_top and its ports. Do not redefine ip_timeout.
  • Use instances and wires only. Keep the three limits of the table.

Hints

Hint 1

Work out the largest number each counter can hold.

Hint 2

Compare the three instance lines with each other.

Hint 3

A connection wider than its port loses its upper bits without a warning.

What the grader checks: The steps check the three outputs through resets, kicks and long waits, with one wait that ends one edge before a limit.

276 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

Reset

Input
Reset
Expected output
late_a = 0, late_b = 0, late_c = 0

Reset clears all three guards.

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

Icarus Verilog · server