Timing Diagram
Model hardware/protocol state changes along an explicit time axis with signal transitions and duration constraints.
| 1 | dialect uml; |
| 2 | |
| 3 | uml::timing_diagram "SPI Sensor Bus Wake-Up & Telemetry Protocol" { |
| 4 | schema { |
| 5 | timeline @HostMpu [label: "Host Controller (Cortex-M4)"] { |
| 6 | state initial @STANDBY; |
| 7 | state @POLLING; |
| 8 | state @READING; |
| 9 | } |
| 10 | |
| 11 | timeline @SensorNode [label: "Telemetry Sensor (I2C/SPI)"] { |
| 12 | state initial @DEEP_SLEEP; |
| 13 | state @WAKING; |
| 14 | state @TRANSMITTING; |
| 15 | } |
| 16 | |
| 17 | timeline @SpiBus [label: "SPI Chip Select (CS) Bus"] { |
| 18 | state initial @IDLE; |
| 19 | state @ASSERTED; |
| 20 | } |
| 21 | |
| 22 | value_line hex @DataBus; |
| 23 | } |
| 24 | |
| 25 | flow { |
| 26 | HostMpu { |
| 27 | STANDBY on 10ms -> POLLING; |
| 28 | POLLING on 35ms -> READING; |
| 29 | } |
| 30 | |
| 31 | SensorNode { |
| 32 | DEEP_SLEEP on 12ms -[max: 10ms]-> WAKING; |
| 33 | WAKING on 22ms -> TRANSMITTING; |
| 34 | } |
| 35 | |
| 36 | SpiBus { |
| 37 | IDLE on 15ms -> ASSERTED; |
| 38 | } |
| 39 | |
| 40 | HostMpu -[send: 10ms, recv: 12ms]-> SensorNode: "WAKEUP_PULSE"; |
| 41 | HostMpu -[send: 14ms, recv: 15ms]-> SpiBus: "CS_ACTIVE"; |
| 42 | } |
| 43 | } |
| 44 | |
Errors: 0 | timing-diagram
Core Syntax Reference
| Construct | Purpose |
|---|---|
lifeline @CS [states: ["HIGH", "LOW"]]; | Declare state-valued signal timelines |
@t0..@t1 | Express discrete timing ticks and constraints |