> ## Documentation Index
> Fetch the complete documentation index at: https://dragonwingdocs-staging.qualcomm.com/llms.txt
> Use this file to discover all available pages before exploring further.

# RTC Testbench

## **RTC Testbench**

The RTC Testbench is an end-to-end validation harness for **OPC/UA over TSN** on Qualcomm Dragonwing™ platforms. It uses two IQ-9075 / QCS9100 devices connected back-to-back via the internal EMAC (`end0`) to measure round-trip time (RTT) and one-way latency of OPC/UA publish-subscribe frames under a PREEMPT\_RT kernel with gPTP clock synchronization.

***

### Key Points

* **Two-device topology** — `reference` and `mirror` roles, direct Ethernet cable (no switch) via `end0`
* **PREEMPT\_RT + gPTP** — CPUs 3–7 RT-isolated; `ptp4l` and `phc2sys` provide sub-microsecond clock synchronisation before the test starts
* **meta-rtc layer** — custom Yocto layer that builds the OPC/UA binaries, test scripts, and configuration alongside QLI 2.0
* **Success criterion** — zero new `OpcUaRttOutliers` or `OpcUaOnewayOutliers` after initial warm-up (first 64 RTT outliers at test start are a known XDP TX-ring warm-up artifact)

***

### Test Topology

```
┌─────────────────────────────┐          ┌─────────────────────────────┐
│   Reference Device          │          │   Mirror Device             │
│   IQ-9075 / QCS9100         │          │   IQ-9075 / QCS9100         │
│                             │          │                             │
│   PREEMPT_RT 6.18           │ end0     │   PREEMPT_RT 6.18           │
│   CPUs 3-7: RT isolated     ├──────────┤   CPUs 3-7: RT isolated     │
│   CPUs 0-2: housekeeping    │ (direct) │   CPUs 0-2: housekeeping    │
│                             │          │                             │
│   ptp4l (CPU 1, FIFO 98)   │◄────────►│   ptp4l (CPU 1, FIFO 98)   │
│   phc2sys (CPU 2, FIFO 98) │  gPTP    │   phc2sys (CPU 2, FIFO 98) │
│   ref binary (CPU pinned)   │  802.1AS │   mirror binary (CPU pinned)│
│   NAPI/IRQ → CPU 6          │          │   NAPI/IRQ → CPU 6          │
└─────────────────────────────┘          └─────────────────────────────┘
```

***

### CPU Partitioning

| CPU Set | Role |
| - | - |
| CPUs 0–2 | Housekeeping — interrupts, kernel tasks, emulator thread |
| CPUs 3–7 | RT isolated — `isolcpus`, `nohz_full`, `rcu_nocbs` applied |
| CPU 6 (within 3–7) | NAPI threads + `end0` hardware IRQ affinity |

***

### Subpages

> [card] [Build & Setup](https://dragonwingdocs-staging.qualcomm.com/Suites/Industrial-Edge-Suite/rtc-testbench-setup.md)
>
> Compile with meta-rtc, verify RT boot, run postboot.sh, start PTP

> [card] [Test Execution](https://dragonwingdocs-staging.qualcomm.com/Suites/Industrial-Edge-Suite/rtc-testbench-execution.md)
>
> Configure peer MACs, run mirror/reference, interpret results

> [card] [Reference Files](https://dragonwingdocs-staging.qualcomm.com/Suites/Industrial-Edge-Suite/rtc-testbench-reference.md)
>
> postboot.sh, ptp.sh, and gPTP\_qcom\_emac.cfg full source

> [card] [RTC Benchmarks IQ9](https://dragonwingdocs-staging.qualcomm.com/Suites/Industrial-Edge-Suite/rtc-benchmarks-iq9.md)
>
> Benchmark results for the Dragonwing IQ-9075 platform
