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
| Signal | Width | Role |
|---|---|---|
step | 12 | input of each check |
Full specification
| Delivered block | Parameter | Ports |
|---|---|---|
| ip_timeout | WIDTH, 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.
| Instance | Kicked by | Limit | Output |
|---|---|---|---|
| u_a | kick_a | 5 | late_a |
| u_b | kick_b | 40 | late_b |
| u_c | kick_c | 20 | late_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