Use a field log to decide which heartbeats prove that the application is still doing its job.
Hardware context: ap_soc watchdog supervisor. Recovery of unattended embedded controllers
A pump controller must finish a sensor read and commit a control output in every supervision interval. Its timer handler can still run while either worker is stuck.
This worksheet uses named constants. The first three entries show how to record your decisions.
Signals in the Timeline
| Signal | Width | Role |
|---|---|---|
question | 8 | input of each check |
Full specification
Use 1 for yes and 0 for no. A kick reloads six ticks. The window is open with one through three ticks left. A timeout or early kick latches a warning. Reset follows two running ticks later. A production halt and sleep leave the watchdog running.
Only trusted boot can arm this design. It must write keys 0x51 and 0xa2 in order, then write one to control. Any intervening watchdog write breaks the sequence. Once armed, only reset can disarm it. Development debug freeze is enabled only on bench units.
The supervisor may kick only after both workers report fresh completion in this interval. Treat each ticket as a separate run. For timing tickets, count from a successful kick at tick zero. Arming tickets start disarmed.
| Entry | Your decision |
|---|---|
| READ_DONE | At tick 3 both fresh completions arrived. Is the sensor read proven? |
| IN_WINDOW | Is tick 4 inside the service window? |
| AT_BOOT | Is an immediate second kick legal at tick zero? |
| HANDLER | At tick 4 only the timer handler ran. Should it kick? |
| OLD_OUTPUT | The read is fresh, but the output completion belongs to the previous interval. May the supervisor kick at tick 3? |
| LAST_SLOT | Both workers finished by tick 5. May the supervisor kick then? |
| WARN_AT | With no service, at which tick does warning rise? |
| RESET_AT | With no service, at which tick is reset requested? |
| SLEEP | The processor sleeps through tick 8 with no kicks. Is reset requested? |
| HALTED | A production halt starts at tick 2. With no kicks, does warning rise by tick 6? |
| KEY_CHAIN | Boot writes 0x51, a service word, then 0xa2 and control. Does it arm? |
| WRITER | A normal application writes both correct keys and control. Can it arm supervision? |
| LOCK | A privileged driver writes zero to control after arming. Is the counter still armed? |
| BENCH | A development breakpoint freezes the timer with three ticks left. How many remain after five halted ticks? |
| RESCUE | May a handler kick during grace to cancel reset? |
| NEXT_RESET | If the last accepted kick occurred at LAST_KICK and both workers stop, at which absolute tick is reset requested? |
Examples
Example 1
READ DONE- Input
At tick 3 both fresh completions arrived. Is the sensor read proven?
- Output
matches = 1
The fresh sensor completion records one finished read.
Example 2
IN WINDOW- Input
Is tick 4 inside the service window?
- Output
matches = 1
Two ticks remain from the six-tick reload.
Example 3
AT BOOT- Input
Is an immediate second kick legal at tick zero?
- Output
matches = 1
Six ticks remain, so the window is still closed.
Constraints and Contract
- Keep the parameter and named constants. Use the numeric codes and units on this page.
- For NEXT_RESET, enter a constant expression using LAST_KICK. Only this entry changes with the parameter. The supported integer range is 0 through 31, inclusive.
Hints
Hint 1
Count watchdog ticks since the accepted service.
Hint 2
Distinguish fresh progress from a handler that merely runs.
Hint 3
Count warning and reset as separate events.
What the grader checks: Each check compares the full eight-bit answer. Parameter trials change one condition and keep the other decisions fixed.
16 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