Review a proposed cold-store monitor on the board of lesson S11.4. Find the one flawed row in each of five columns, and repair the worst number.
Hardware context: Small SoCs reviewed before design: a sensor hub and a logger, sized and checked column by column. Review a proposed logger on the eight-column board and repair the rows that fail.
A colleague proposes a monitor for a cold store. It logs two sensors and sends a report to a radio once every 10 minutes. Review it column by column, with the rules of lesson S11.4.
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
| Requirement | Value |
|---|---|
| Temperature sensor | SPI, 2 bytes, 4 samples a second |
| Humidity sensor | SPI, 2 bytes, 1 sample a second |
| Data kept | the last 10 minutes (600 seconds) |
| Report | over UART0 to a radio, at 57,600 baud, 10 bits a byte |
| Software | 512 bytes of stack and 64 of variables |
| Rules | as in S11.4: SRAM spare under 20 percent is a risk; both clock errors together under 20,000 ppm; source numbers 1 to 16, all different |
| Map row | Block | Base | Size |
|---|---|---|---|
| 1 | Boot ROM | 0000_0000 | 4 KiB |
| 2 | SRAM | 8000_0000 | 8 KiB |
| 3 | UART0 | 1000_0000 | 4 KiB |
| 4 | Timer | 1000_2000 | 4 KiB |
| 5 | SPI | 1000_0800 | 4 KiB |
| Clock row | Entry |
|---|---|
| 1 | Crystal oscillator, 50 MHz, 50 ppm |
| 2 | Core clock: the crystal, undivided |
| 3 | UART divider: 434 |
| Interrupt row | Entry |
|---|---|
| 1 | UART0: source 1 |
| 2 | Timer: source 3 |
| 3 | SPI: source 0 |
| Power row | Entry |
|---|---|
| 1 | Run while sampling and reporting |
| 2 | Between samples: deep sleep, SRAM supply off, timer on the always-on supply |
| Debug row | Entry |
|---|---|
| 1 | Console on UART0 |
| 2 | JTAG pins shared with SPI; the boot code hands them to JTAG once it has started |
| Risk row | Entry |
|---|---|
| 1 | Spare SRAM below 20 percent: measure the stack on the real program |
For a row entry, give the number of the one flawed row in that column. Enter counts, bytes, milliseconds and percentages as whole numbers: round a time up and a percentage down.
| Entry | Your decision |
|---|---|
| DATA_RATE | Bytes stored each second. |
| BUFFER_BYTES | Bytes kept. |
| NEED_BYTES | Bytes the SRAM must hold. |
| MAP_ROW | The flawed row of the map. |
| CLOCK_ROW | The flawed row of the clocks. |
| DIVIDER_FIX | The divider that row should hold. |
| IRQ_ROW | The flawed row of the interrupts. |
| POWER_ROW | The flawed row of the power modes. |
| DEBUG_ROW | The flawed row of the debug plan. |
| FLAWS | How many flaws in all, across every column? |
| SPARE_PCT | Spare SRAM, in percent, rounded down. |
| PEAK_IRQ | Requests in a second while a report is sent: timer at the fastest sensor rate, one per sample, one per UART byte. |
| REPORT_MS | Milliseconds to send one report, rounded up. |
| SRAM_KIB_AT_K | The monitor must keep K minutes of data in place of 10. Give the smallest SRAM, a power of two in KiB, that holds the buffer, the stack and the variables. |
Examples
Example 1
DATA RATE- Input
Bytes stored each second.
- Output
matches = 1
2 × 4 + 2 × 1.
Example 2
BUFFER BYTES- Input
Bytes kept.
- Output
matches = 1
10 bytes a second for 600 seconds.
Example 3
NEED BYTES- Input
Bytes the SRAM must hold.
- Output
matches = 1
6000 + 512 + 64.
Constraints and Contract
- Keep the parameter and named constants. Use the numeric codes and units on this page.
- For SRAM_KIB_AT_K, enter a constant expression using K. Only this entry changes with the parameter. The supported integer range is 5 through 30, inclusive.
- Replace each unfinished 65535 with your number.
Hints
Hint 1
Turn the two sensors and ten minutes into bytes before you read the proposal.
Hint 2
Check each row against the column's rule: alignment and overlap, divider and accuracy, source numbers, what survives a sleep, access from reset.
Hint 3
A row that fails a rule is a flaw. A row that passes thinly is a risk.
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