Keep a sensor node able to wake from deep sleep while removing everything its service contract allows.
Hardware context: ap_soc timer power island. Sleep and wake planning
A sleeping node must wake on a button or RTC alarm and preserve the cause until firmware reads it. The peripheral island loses power. Firmware rebuilds its configuration on wake.
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 a function that needs a live supply throughout deep sleep. Use 2 for switchable logic rebuilt on wake. Use 3 for state that needs storage across sleep but no running logic. A separate retention bank is available. The button and alarm are independent.
| Entry | Your decision |
|---|---|
| BUTTON | The receiver sensing the selected button pad. |
| BAUD | The UART baud counter, initialized by firmware. |
| TRIM | The only saved copy of calibration bits, read after wake. |
| ROUTE | A mux between the button pad and wake detector, with no bypass. |
| COUNT | The real-time counter that advances the alarm deadline. |
| CONTROL | The sequencer driving the peripheral switch. |
| FIFO | An empty SPI FIFO allowed to restart empty. |
| CAUSE | A latch that records which source fired while the island was off. |
| FILTER | A digital button filter normally feeds the live detector. BYPASS=1 selects a qualified direct pad route and permits filter reset. |
Examples
Example 1
BUTTON- Input
The receiver sensing the selected button pad.
- Output
matches = 1
The external level needs a powered receiver. Record BUTTON = 1.
Example 2
BAUD- Input
The UART baud counter, initialized by firmware.
- Output
matches = 1
UART resumes from initialization. Record BAUD = 2.
Example 3
TRIM- Input
The only saved copy of calibration bits, read after wake.
- Output
matches = 1
The bits survive but are unused while asleep. Record TRIM = 3.
Constraints and Contract
- Keep the parameter and named constants. Use the numeric codes and units on this page.
- For FILTER, enter a constant expression using BYPASS. Only this entry changes with the parameter. The supported integer range is 0 through 1, inclusive.
Hints
Hint 1
Start where the external event originates.
Hint 2
Walk through the receiver, routing, detector and rail controller.
Hint 3
Separate a bit that must change asleep from one that merely survives.
What the grader checks: Each check compares the full eight-bit answer. Parameter trials change one condition and keep the other decisions fixed.
10 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