Files

63 lines
2.2 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# K16 — Integrated real-time application and evidence report
K16 composes the wrappers introduced in K08K15 without adding a new primitive:
StaticTask, StaticQueue, one measured dynamic Queue, EventGroup, SoftwareTimer,
CriticalSection, IsrContext and GpioPin.
The deterministic service graph is:
startup barrier (producer | processor | reporter = 0x7)
-> real external IRQ at tick 1 wakes producer and yields once
-> periodic timer callbacks at ticks 5 and 10
-> producer -> static input queue -> processor
-> dynamic report queue -> reporter -> GPIO/evidence report
The pressure phase sends sequences 2 and 3 into a capacity-2 input queue, then
rejects sequence 4 with an explicit drop-newest policy. An end marker blocks
until space is available, proving recovery. The report queue also reaches depth
2. Three transformed values sum to 120.
## Measured report
static-service heap delta: 0 B
one dynamic Queue cost: 128 B
forced allocation failure: returned null, heap unchanged
timer ticks: 5, 10; then inactive
input/report queue peaks: 2 / 2
dropped sequence: 4
end-to-end latency: 6 ticks
producer/processor/reporter HWM: 169 / 183 / 189 words
trace events: 24
trace digest: c474ac09
## Build
make check
This runs the host model, ABI/storage gate and Hazard3 end-to-end simulation.
## Debug
riscv64-unknown-elf-gdb build/task01_integration/prog.elf
b integration_debug_checkpoint
p/x g_barrier_mask
p g_timer_ticks
p g_input_queue_peak
p g_report_queue_peak
p g_dynamic_queue_heap_cost
p g_pressure_dropped_sequence
p g_end_to_end_latency
p g_producer_hwm
p g_processor_hwm
p g_reporter_hwm
p/x g_trace_digest
p g_integration_pass
## Design boundary
All long-lived services except the boot-configured report queue use caller-owned
static storage. A deliberately oversized pvPortMalloc request is handled as a
fallible probe; it does not use ordinary operator new and leaves the heap
unchanged. The timer callback and ISR only notify. Queue processing, pressure
recovery, transformation and reporting remain in tasks.