S11.4.2 Find Five Flaws in This Architecture

HardImplement22 minIcarus Verilog · serverReview the topic

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

SignalWidthRole
question8input of each check
Full specification
RequirementValue
Temperature sensorSPI, 2 bytes, 4 samples a second
Humidity sensorSPI, 2 bytes, 1 sample a second
Data keptthe last 10 minutes (600 seconds)
Reportover UART0 to a radio, at 57,600 baud, 10 bits a byte
Software512 bytes of stack and 64 of variables
Rulesas 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 rowBlockBaseSize
1Boot ROM0000_00004 KiB
2SRAM8000_00008 KiB
3UART01000_00004 KiB
4Timer1000_20004 KiB
5SPI1000_08004 KiB
Clock rowEntry
1Crystal oscillator, 50 MHz, 50 ppm
2Core clock: the crystal, undivided
3UART divider: 434
Interrupt rowEntry
1UART0: source 1
2Timer: source 3
3SPI: source 0
Power rowEntry
1Run while sampling and reporting
2Between samples: deep sleep, SRAM supply off, timer on the always-on supply
Debug rowEntry
1Console on UART0
2JTAG pins shared with SPI; the boot code hands them to JTAG once it has started
Risk rowEntry
1Spare 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.

EntryYour decision
DATA_RATEBytes stored each second.
BUFFER_BYTESBytes kept.
NEED_BYTESBytes the SRAM must hold.
MAP_ROWThe flawed row of the map.
CLOCK_ROWThe flawed row of the clocks.
DIVIDER_FIXThe divider that row should hold.
IRQ_ROWThe flawed row of the interrupts.
POWER_ROWThe flawed row of the power modes.
DEBUG_ROWThe flawed row of the debug plan.
FLAWSHow many flaws in all, across every column?
SPARE_PCTSpare SRAM, in percent, rounded down.
PEAK_IRQRequests in a second while a report is sent: timer at the fastest sensor rate, one per sample, one per UART byte.
REPORT_MSMilliseconds to send one report, rounded up.
SRAM_KIB_AT_KThe 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

Report a problem with this page

Your code SystemVerilogSaved locally
Ln 1, Col 1Tab indents · Ctrl/⌘ + Enter runs samples
Not run yet

DATA RATE

Input
Bytes stored each second.
Expected output
matches = 1

2 × 4 + 2 × 1.

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

Icarus Verilog · server