中文

Architecture · SWE.2

Giraffe Flow design

The software-architecture page. Version 0.2, kept with the code. The draft file remains DESIGN.md.

Back to ASPICE

1. Vision

Giraffe Flow is lightweight middleware and a toolchain for cross-platform SOA. See it, stress it, and pass it on the bench. Hardware is the last mile.

Perception and planning in this repository are a closed-loop workload, not a production ADAS product. The design borrows AUTOSAR Adaptive process management, health management, and SOA communication, and adds affordable codegen, DAG and signal review, long record/replay, OpenVX observability, ROS 2 interop, and a trimmed deployment. A certificate is not delivered here.

2. AUTOSAR AP

Concepts are borrowed. The stack is not cloned. Semantics stay close to ARA. The namespace is gf_ara::*.

PhaseScope
P0core, com, log, and simplified exec, phm, sm
P1ucm and diag skeletons. Full bindings later
P3, landedper in-process KV, tsync skeleton. Trimmed per SKU
P2, latercrypto, iam, idsm, fw, shwa, full nm, production OTA backends

Beyond AP: unified trace into GTKWave, OpenVX hooks that stay out of the algorithm, a DDS binding, Importer plus gf.sor.json, record/replay, and DAG plus signal-lineage review.

3. Two API layers

LayerNamespaceRole
Publicgf_ara::com, gf_ara::exec, gf_ara::phmARA-like semantics
Internalgf::com, gf::runtime, gf::traceRecording, binding switch, and other extensions

4. Three transports

Applications use gf_ara::com only. The binding router picks iceoryx, SOME/IP, or DDS from the manifest.

TransportRoleTypical use
iceoryxOn-SoC zero copyRadar, frames, fusion
SOME/IPService-oriented, cross-ECUChassis, body, external SOA
DDSData-centricROS 2, cross-SoC, prototypes

DDS and SOME/IP differences stay in the SOR and the mapping tables.

5. SOR and codegen

SOR is the requirements contract. The only direct codegen input is gf.sor.json. OEM arxml / dbc and req.yaml are normalized into it.

OEM.arxml | dbc + req.yaml
  → import → gf.sor.json
  → lint → generate
  → Proxy / Skeleton + EM / PHM manifests + bindings

A SOR needs schema_version, types, services, deployments with provides and requires on every process, dataflows, bindings, and imports_meta. Without provide and require there is no trustworthy DAG.

A shared signal such as vehicle speed has one provider, the gateway. Perception, planning, and control subscribe. Generated code lives under generated/. Hand-written logic stays in the application sources.

6. Service boundary and process boundary

SOA is a stable interface. A process is a fault domain. Platform residents are exec, phm, and sm. A crashing sensor SDK stays in its own process. Control is not colocated with IVI. A manifest may colocate light services without changing the service interface.

7. Deployment

ClassWhat stays there
On boardEM, PHM, SM, adapters, the workload, the bindings it needs, a trace agent
Host onlyImporter, codegen, DAG review, GTKWave, offline replay
vehicle-debugSampled record and diagnostic probes. Off in a production profile

Phases run from desktop, to board plus host, to HIL, to vehicle debug, to a production trim. Boot starts EM only. EM then spawns optional daemons and the SOA applications through OSAL. Library cases are on process launch.

8. Observability

Design time uses the DAG and signal lineage. Fine runtime timing uses trace into GTKWave. Long runs use record and replay. Clocks are unified first. Replay is read-only before injection is allowed.

9. Portability

Applications
  → gf_ara API
  → runtime
      → bindings (iceoryx | someip | dds)
      → OSAL (clock, thread, process)
  → HAL

A platform change touches OSAL, HAL, bindings, and the deployment profile. Application code does not grow #ifdef SOC_X. EM calls OSAL process APIs and does not fork on its own.

10. Repository

One monorepo for now, because gf.sor.json ties the runtime, codegen, and the architect tools together. Board CI does not build the GUI tools. A schema change runs golden codegen and at least one multi-process end-to-end test. A customer vehicle project lives in its own repository and pins versions.

11. Four delivery rules

  1. Freeze the SOR subset before writing a generator
  2. Read-only replay before controllable injection
  3. One clock across the stack
  4. Write the binding and QoS mapping into the SOR

12. Milestones

Acceptance
M0Module matrix, SOR schema, import contract, and the SOA boundary reviewed
M1Desktop multi-process, three bindings, an OEM sample import, DAG review usable
M2EM and PHM recovery. A radar or IVI fault does not kill control
M3ROS via DDS, GTKWave, record and replay
M4At least one embedded Linux SoC. The production profile turns debug pieces off

13. Risks