# nxp-real-time-edge-sw/heterogeneous-multicore architecture

> Architecture diagram of the GitHub repository nxp-real-time-edge-sw/heterogeneous-multicore, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-09). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/nxp-real-time-edge-sw/heterogeneous-multicore
- Repository: https://github.com/nxp-real-time-edge-sw/heterogeneous-multicore

## Overview

This repository is the Heterogeneous Multicore Framework and its embedded demos: it connects AMP processors and operating systems through inter-core messaging, VirtIO data paths, and resource sharing, with examples for latency, networking, and industrial control. A representative flow is an RTOS application using RPMSG to communicate across cores; VirtIO networking provides a separate high-throughput sharing path. The README documents several capabilities whose implementation files were not sampled, so those links reflect documented behavior rather than inspected call paths.

Main entry points: [`apps/rt_latency/freertos/main.c`](https://github.com/nxp-real-time-edge-sw/heterogeneous-multicore/blob/main/apps/rt_latency/freertos/main.c) (Latency benchmark), [`apps/virtio_net_backend/freertos/main.c`](https://github.com/nxp-real-time-edge-sw/heterogeneous-multicore/blob/main/apps/virtio_net_backend/freertos/main.c) (VirtIO network backend), [`apps/rpmsg_str_echo/freertos/main.c`](https://github.com/nxp-real-time-edge-sw/heterogeneous-multicore/blob/main/apps/rpmsg_str_echo/freertos/main.c) (RPMSG applications), [`apps/netc_share/freertos/boards/imx943evk/cm33_core1/app_srtm.c`](https://github.com/nxp-real-time-edge-sw/heterogeneous-multicore/blob/main/apps/netc_share/freertos/boards/imx943evk/cm33_core1/app_srtm.c) (SRTM sharing)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_framework["Core framework"]
  node_counter["OS counter API<br/>[counter.h]"]
  node_stats["Statistics<br/>[stats.c]"]
  node_log["Logging API<br/>[log.h]"]
  node_gen_mailbox["Software mailbox<br/>[gen_sw_mbox.c]"]
  node_mailbox_api["Mailbox interface<br/>[mailbox.h]"]
  node_ptp["Multi-SoC PTP"]
end

subgraph group_messaging["Inter-core messaging"]
  node_rpmsg_app["RPMSG applications<br/>[main.c]"]
  node_rpmsg_perf["RPMSG benchmark<br/>[main.c]"]
  node_rpmsg_lib["RPMSG transport<br/>[rpmsg.c]"]
  node_srtm["SRTM sharing<br/>[app_srtm.c]"]
  node_uart_share["UART sharing demo<br/>[main.c]"]
end

subgraph group_virtio["VirtIO and networking"]
  node_virtio_perf["VirtIO benchmark<br/>[main.c]"]
  node_virtio_backend["VirtIO network backend<br/>[main.c]"]
  node_virtio_network["VirtIO network device<br/>[network.c]"]
  node_net_switch["Network switch<br/>[net_switch.c]"]
  node_enet_port["Ethernet port<br/>[port_enet.c]"]
  node_lwip_demo["lwIP ping demo<br/>[main.c]"]
end

subgraph group_examples["RTOS examples"]
  node_latency["Latency benchmark<br/>[main.c]"]
  node_latency_core["Latency test logic<br/>[rt_latency.h]"]
  node_hello["Hello world<br/>[main.c]"]
  node_driver_examples["Driver examples<br/>[main.c]"]
end

subgraph group_industrial["Industrial control"]
  node_digital_io["EtherCAT digital IO<br/>[main.c]"]
  node_servo["EtherCAT servo<br/>[main.c]"]
  node_servo_rt1180["RT1180 servo<br/>[main.c]"]
end

node_rtos_actor(("RTOS image"))
node_linux_actor(("Linux image"))

node_rtos_actor -->|"runs demo"| node_rpmsg_app
node_rpmsg_app -.->|"uses transport"| node_rpmsg_lib
node_rpmsg_app -.->|"exchanges messages"| node_linux_actor
node_rpmsg_perf -->|"measures bandwidth"| node_linux_actor
node_uart_share -->|"uses sharing"| node_srtm
node_srtm -->|"shares resources"| node_linux_actor
node_rtos_actor -->|"runs benchmark"| node_virtio_perf
node_virtio_backend -->|"configures"| node_net_switch
node_virtio_backend -->|"uses port"| node_enet_port
node_virtio_backend -->|"sets up device"| node_virtio_network
node_virtio_network -->|"provides virtual NIC"| node_linux_actor
node_lwip_demo -.->|"uses networking"| node_enet_port
node_latency -->|"runs tests"| node_latency_core
node_latency -->|"measures time"| node_counter
node_latency -.->|"reports results"| node_stats
node_latency -->|"logs progress"| node_log
node_hello -->|"demonstrates RTOS"| node_rtos_actor
node_driver_examples -.->|"demonstrates drivers"| node_rtos_actor
node_digital_io -->|"runs EtherCAT master"| node_rtos_actor
node_servo -->|"runs EtherCAT master"| node_rtos_actor
node_servo_rt1180 -->|"controls RT1180 slave"| node_rtos_actor
node_gen_mailbox -.->|"implements interface"| node_mailbox_api
node_ptp -.->|"synchronizes cores"| node_rtos_actor

click node_rpmsg_app "https://github.com/nxp-real-time-edge-sw/heterogeneous-multicore/blob/main/apps/rpmsg_str_echo/freertos/main.c"
click node_rpmsg_perf "https://github.com/nxp-real-time-edge-sw/heterogeneous-multicore/blob/main/apps/rpmsg_perf/freertos/main.c"
click node_rpmsg_lib "https://github.com/nxp-real-time-edge-sw/heterogeneous-multicore/blob/main/libs/rpmsg/rpmsg.c"
click node_srtm "https://github.com/nxp-real-time-edge-sw/heterogeneous-multicore/blob/main/apps/netc_share/freertos/boards/imx943evk/cm33_core1/app_srtm.c"
click node_uart_share "https://github.com/nxp-real-time-edge-sw/heterogeneous-multicore/blob/main/apps/rpmsg_uart_sharing/freertos/main.c"
click node_virtio_perf "https://github.com/nxp-real-time-edge-sw/heterogeneous-multicore/blob/main/apps/virtio_perf/freertos/main.c"
click node_virtio_backend "https://github.com/nxp-real-time-edge-sw/heterogeneous-multicore/blob/main/apps/virtio_net_backend/freertos/main.c"
click node_virtio_network "https://github.com/nxp-real-time-edge-sw/heterogeneous-multicore/blob/main/virtio/devices/network.c"
click node_net_switch "https://github.com/nxp-real-time-edge-sw/heterogeneous-multicore/blob/main/net/net_switch.c"
click node_enet_port "https://github.com/nxp-real-time-edge-sw/heterogeneous-multicore/blob/main/net/port_enet.c"
click node_lwip_demo "https://github.com/nxp-real-time-edge-sw/heterogeneous-multicore/blob/main/apps/lwip_ping/freertos/main.c"
click node_latency "https://github.com/nxp-real-time-edge-sw/heterogeneous-multicore/blob/main/apps/rt_latency/freertos/main.c"
click node_latency_core "https://github.com/nxp-real-time-edge-sw/heterogeneous-multicore/blob/main/apps/rt_latency/common/rt_latency.h"
click node_hello "https://github.com/nxp-real-time-edge-sw/heterogeneous-multicore/blob/main/apps/hello_world/freertos/main.c"
click node_driver_examples "https://github.com/nxp-real-time-edge-sw/heterogeneous-multicore/blob/main/apps/driver_examples/freertos/main.c"
click node_digital_io "https://github.com/nxp-real-time-edge-sw/heterogeneous-multicore/blob/main/apps/soem_digital_io/freertos/main.c"
click node_servo "https://github.com/nxp-real-time-edge-sw/heterogeneous-multicore/blob/main/apps/soem_servo/freertos/main.c"
click node_servo_rt1180 "https://github.com/nxp-real-time-edge-sw/heterogeneous-multicore/blob/main/apps/soem_servo_rt1180/freertos/main.c"
click node_counter "https://github.com/nxp-real-time-edge-sw/heterogeneous-multicore/blob/main/include/os/counter.h"
click node_stats "https://github.com/nxp-real-time-edge-sw/heterogeneous-multicore/blob/main/libs/stats/stats.c"
click node_log "https://github.com/nxp-real-time-edge-sw/heterogeneous-multicore/blob/main/include/log/log.h"
click node_gen_mailbox "https://github.com/nxp-real-time-edge-sw/heterogeneous-multicore/blob/main/libs/gen_sw_mbox/gen_sw_mbox.c"
click node_mailbox_api "https://github.com/nxp-real-time-edge-sw/heterogeneous-multicore/blob/main/include/mailbox/mailbox.h"
click node_ptp "https://github.com/nxp-real-time-edge-sw/heterogeneous-multicore/blob/main/net/ptp_stack/ptp_multisoc_stack.c"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_counter,node_stats,node_log,node_gen_mailbox,node_mailbox_api,node_ptp toneBlue
class node_rpmsg_app,node_rpmsg_perf,node_rpmsg_lib,node_srtm,node_uart_share toneAmber
class node_virtio_perf,node_virtio_backend,node_virtio_network,node_net_switch,node_enet_port,node_lwip_demo toneMint
class node_latency,node_latency_core,node_hello,node_driver_examples toneRose
class node_digital_io,node_servo,node_servo_rt1180,node_rtos_actor,node_linux_actor toneIndigo
```

## Components

### Core framework

- [OS counter API](https://github.com/nxp-real-time-edge-sw/heterogeneous-multicore/blob/main/include/os/counter.h): `include/os/counter.h`
- [Statistics](https://github.com/nxp-real-time-edge-sw/heterogeneous-multicore/blob/main/libs/stats/stats.c): `libs/stats/stats.c`
- [Logging API](https://github.com/nxp-real-time-edge-sw/heterogeneous-multicore/blob/main/include/log/log.h): `include/log/log.h`
- [Software mailbox](https://github.com/nxp-real-time-edge-sw/heterogeneous-multicore/blob/main/libs/gen_sw_mbox/gen_sw_mbox.c): `libs/gen_sw_mbox/gen_sw_mbox.c`
- [Mailbox interface](https://github.com/nxp-real-time-edge-sw/heterogeneous-multicore/blob/main/include/mailbox/mailbox.h): `include/mailbox/mailbox.h`
- [Multi-SoC PTP](https://github.com/nxp-real-time-edge-sw/heterogeneous-multicore/blob/main/net/ptp_stack/ptp_multisoc_stack.c): `net/ptp_stack/ptp_multisoc_stack.c`

### Inter-core messaging

- [RPMSG applications](https://github.com/nxp-real-time-edge-sw/heterogeneous-multicore/blob/main/apps/rpmsg_str_echo/freertos/main.c): `apps/rpmsg_str_echo/freertos/main.c`
- [RPMSG benchmark](https://github.com/nxp-real-time-edge-sw/heterogeneous-multicore/blob/main/apps/rpmsg_perf/freertos/main.c): `apps/rpmsg_perf/freertos/main.c`
- [RPMSG transport](https://github.com/nxp-real-time-edge-sw/heterogeneous-multicore/blob/main/libs/rpmsg/rpmsg.c): `libs/rpmsg/rpmsg.c`
- [SRTM sharing](https://github.com/nxp-real-time-edge-sw/heterogeneous-multicore/blob/main/apps/netc_share/freertos/boards/imx943evk/cm33_core1/app_srtm.c): `apps/netc_share/freertos/boards/imx943evk/cm33_core1/app_srtm.c`
- [UART sharing demo](https://github.com/nxp-real-time-edge-sw/heterogeneous-multicore/blob/main/apps/rpmsg_uart_sharing/freertos/main.c): `apps/rpmsg_uart_sharing/freertos/main.c`

### VirtIO and networking

- [VirtIO benchmark](https://github.com/nxp-real-time-edge-sw/heterogeneous-multicore/blob/main/apps/virtio_perf/freertos/main.c): `apps/virtio_perf/freertos/main.c`
- [VirtIO network backend](https://github.com/nxp-real-time-edge-sw/heterogeneous-multicore/blob/main/apps/virtio_net_backend/freertos/main.c): `apps/virtio_net_backend/freertos/main.c`
- [VirtIO network device](https://github.com/nxp-real-time-edge-sw/heterogeneous-multicore/blob/main/virtio/devices/network.c): `virtio/devices/network.c`
- [Network switch](https://github.com/nxp-real-time-edge-sw/heterogeneous-multicore/blob/main/net/net_switch.c): `net/net_switch.c`
- [Ethernet port](https://github.com/nxp-real-time-edge-sw/heterogeneous-multicore/blob/main/net/port_enet.c): `net/port_enet.c`
- [lwIP ping demo](https://github.com/nxp-real-time-edge-sw/heterogeneous-multicore/blob/main/apps/lwip_ping/freertos/main.c): `apps/lwip_ping/freertos/main.c`

### RTOS examples

- [Latency benchmark](https://github.com/nxp-real-time-edge-sw/heterogeneous-multicore/blob/main/apps/rt_latency/freertos/main.c): `apps/rt_latency/freertos/main.c`
- [Latency test logic](https://github.com/nxp-real-time-edge-sw/heterogeneous-multicore/blob/main/apps/rt_latency/common/rt_latency.h): `apps/rt_latency/common/rt_latency.h`
- [Hello world](https://github.com/nxp-real-time-edge-sw/heterogeneous-multicore/blob/main/apps/hello_world/freertos/main.c): `apps/hello_world/freertos/main.c`
- [Driver examples](https://github.com/nxp-real-time-edge-sw/heterogeneous-multicore/blob/main/apps/driver_examples/freertos/main.c): `apps/driver_examples/freertos/main.c`

### Industrial control

- [EtherCAT digital IO](https://github.com/nxp-real-time-edge-sw/heterogeneous-multicore/blob/main/apps/soem_digital_io/freertos/main.c): `apps/soem_digital_io/freertos/main.c`
- [EtherCAT servo](https://github.com/nxp-real-time-edge-sw/heterogeneous-multicore/blob/main/apps/soem_servo/freertos/main.c): `apps/soem_servo/freertos/main.c`
- [RT1180 servo](https://github.com/nxp-real-time-edge-sw/heterogeneous-multicore/blob/main/apps/soem_servo_rt1180/freertos/main.c): `apps/soem_servo_rt1180/freertos/main.c`

### Other components

- **RTOS image**
- **Linux image**

## Connections

- RTOS image → RPMSG applications: runs demo
- RPMSG applications → RPMSG transport: uses transport
- RPMSG applications → Linux image: exchanges messages
- RPMSG benchmark → Linux image: measures bandwidth
- UART sharing demo → SRTM sharing: uses sharing (evidence: `apps/rpmsg_uart_sharing/freertos/main.c`)
- SRTM sharing → Linux image: shares resources
- RTOS image → VirtIO benchmark: runs benchmark
- VirtIO network backend → Network switch: configures (evidence: `apps/virtio_net_backend/freertos/main.c`)
- VirtIO network backend → Ethernet port: uses port (evidence: `apps/virtio_net_backend/freertos/main.c`)
- VirtIO network backend → VirtIO network device: sets up device (evidence: `apps/virtio_net_backend/freertos/main.c`)
- VirtIO network device → Linux image: provides virtual NIC
- lwIP ping demo → Ethernet port: uses networking
- Latency benchmark → Latency test logic: runs tests (evidence: `apps/rt_latency/freertos/main.c`)
- Latency benchmark → OS counter API: measures time (evidence: `apps/rt_latency/freertos/main.c`)
- Latency benchmark → Statistics: reports results (evidence: `apps/rt_latency/freertos/main.c`)
- Latency benchmark → Logging API: logs progress (evidence: `apps/rt_latency/freertos/main.c`)
- Hello world → RTOS image: demonstrates RTOS
- Driver examples → RTOS image: demonstrates drivers
- EtherCAT digital IO → RTOS image: runs EtherCAT master
- EtherCAT servo → RTOS image: runs EtherCAT master
- RT1180 servo → RTOS image: controls RT1180 slave
- Software mailbox → Mailbox interface: implements interface
- Multi-SoC PTP → RTOS image: synchronizes cores
