Files
lab-rv32i-freertos-c-first-…/doc/assets/a2-structure.puml
T

63 lines
1.5 KiB
Plaintext

@startuml
!include card-uml-style.iuml
scale 900 width
left to right direction
class "01 WorkerContext" as Worker {
+id : uint32_t
+result : volatile uint32_t
+iterations : volatile uint32_t
+trace_state : WorkerTraceState
+02 handle : TaskHandle_t
+created_handle : uintptr_t
+start_tick / end_tick : TickType_t
+tcb_address : uintptr_t
+stack_low / stack_high : uintptr_t
+entry_sp : uintptr_t
}
class "03 static contexts" as Contexts <<data>> {
g_worker_a : WorkerContext
g_worker_b : WorkerContext
lifetime = whole program
}
class "04 C entry functions" as Entries <<C ABI>> {
sum_task_entry(void*)
supervisor_task_entry(void*)
create_worker(WorkerContext*)
}
class "05 SupervisorContext" as Supervisor {
first : WorkerContext*
second : WorkerContext*
handle : TaskHandle_t
pass : volatile uint32_t
}
class "06 common invariants" as Invariants <<contract>> {
result A = result B = 200010000
iterations A = iterations B = 20000
trace contains A -> B -> A
}
class "heap_4" as Heap <<runtime>> {
TCB A / TCB B
stack A / stack B
supervisor TCB + stack
}
Contexts *-- Worker : contains two
Supervisor o-- Worker : observes
Entries --> Worker : typed context
Entries --> Supervisor : typed context
Worker --> Heap : handle value identifies TCB
Supervisor --> Invariants : verifies
note bottom of Worker
Context is application-owned storage.
&handle is a field address; handle is its value.
Neither is the separate task-stack block.
end note
@enduml