Compare

# CircuitTwin vs QEMU

QEMU is a general-purpose open-source emulator and hypervisor. CircuitTwin builds microcontroller board twins from vendor documents.

QEMU statements cite official docs checked 2026-11-20. CircuitTwin does not run firmware on QEMU, though QEMU user mode serves as an independent CPU differential reference ([Accuracy report](https://circuittwin.ai/docs/accuracy)).

## How CircuitTwin runs your firmware

CircuitTwin runs your firmware on its own engine (ADR-0016), not on Renode, QEMU or another external emulator. Twins are compiled from vendor datasheets and CMSIS-SVD files alongside reference manuals, CMSIS packs and errata ([Concepts](https://circuittwin.ai/docs/concepts)).

A run that touches registers a twin does not model ends inconclusive, not passed, and its report names what the firmware relied on. Evidence labels stay provisional until an independent reference confirms them; see [Runs and results](https://circuittwin.ai/docs/concepts#results).

## What QEMU is

QEMU emulates full systems (CPU, memory, devices) to boot guest OSes and runs cross-architecture user-mode binaries under GPLv2 ([QEMU docs: About](https://www.qemu.org/docs/master/about/index.html) , [QEMU docs: license](https://www.qemu.org/docs/master/about/license.html), 2026-11-20).

## Where each fits

Use QEMU for full-OS virtualization and broad CPU architecture emulation; use CircuitTwin for microcontroller peripherals, board twins and explicit unmodelled-register checks.

- **QEMU** fits full OS emulation, virtualization or broad CPU architecture coverage ([QEMU docs: About](https://www.qemu.org/docs/master/about/index.html) , [QEMU docs: targets](https://www.qemu.org/docs/master/system/targets.html), 2026-11-20).
- **CircuitTwin** fits testing bare-metal or RTOS microcontroller firmware on datasheet-generated board twins with explicit `inconclusive` verdicts ([Runs and results](https://circuittwin.ai/docs/concepts#results)).

## Comparison

__CircuitTwin and QEMU, area by area__
| Area                | CircuitTwin                                                                                                                                             | QEMU                                                                                                                                                                                                                                                                                           |
| ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Purpose             | Microcontroller firmware on board twins ([Concepts](https://circuittwin.ai/docs/concepts)).                                                             | Open-source machine emulator and virtualizer for full OS guests and user-mode binaries ([QEMU docs: About](https://www.qemu.org/docs/master/about/index.html), 2026-11-20).                                                                                                                    |
| Hardware models     | Generated from vendor datasheets, reference manuals, SVDs or CMSIS packs ([Concepts](https://circuittwin.ai/docs/concepts)).                            | Hand-written machine models ([QEMU docs: targets](https://www.qemu.org/docs/master/system/targets.html), 2026-11-20). STM32 covers F100, F205, F405 plus L475; most other STM32 families are missing ([QEMU docs: STM32](https://www.qemu.org/docs/master/system/arm/stm32.html), 2026-11-20). |
| STM32 peripherals   | Per-board levels and status listed on the [board dashboard](https://circuittwin.ai/docs/board-dashboard).                                               | Supports ADC, EXTI, USART, SPI, SYSCFG, timers and partial RCC. Missing CAN, DMA, GPIO, I2C, flash interface, RTC, RNG, USB OTG and watchdogs ([QEMU docs: STM32](https://www.qemu.org/docs/master/system/arm/stm32.html), 2026-11-20).                                                        |
| Unmodelled hardware | Exits inconclusive (never pass) and names the unmodelled registers ([Concepts](https://circuittwin.ai/docs/concepts#results)).                          | Dummy device logs accesses, returns 0 on read and drops writes ([QEMU source: unimp.c](https://gitlab.com/qemu-project/qemu/-/blob/master/hw/misc/unimp.c), 2026-11-20).                                                                                                                       |
| Determinism         | Identical inputs give identical reports by default ([Concepts](https://circuittwin.ai/docs/concepts)).                                                  | Record/replay logs non-deterministic events using \-icount ([QEMU docs: record/replay](https://www.qemu.org/docs/master/system/replay.html), 2026-11-20).                                                                                                                                      |
| Debugging           | GDB server for STM32CubeIDE, VS Code or plain GDB ([Debug in your IDE](https://circuittwin.ai/docs/ide)).                                               | GDB stub with breakpoints/watchpoints ([QEMU docs: GDB](https://www.qemu.org/docs/master/system/gdb.html), 2026-11-20), plus reverse-step/continue under record/replay ([QEMU docs: record/replay](https://www.qemu.org/docs/master/system/replay.html), 2026-11-20).                          |
| License & hosts     | ct CLI (Windows, macOS, Linux) + web app; account required ([Install](https://circuittwin.ai/docs/install), [Pricing](https://circuittwin.ai/pricing)). | GPLv2 ([QEMU docs: license](https://www.qemu.org/docs/master/about/license.html), 2026-11-20); runs on Linux, macOS, FreeBSD, NetBSD, OpenBSD and Windows ([QEMU docs: build platforms](https://www.qemu.org/docs/master/about/build-platforms.html), 2026-11-20).                             |

## Agent benchmark

Both platforms ran the same 43 unmodified STM32F407 ELFs from the [agent benchmark](https://circuittwin.ai/docs/agent-benchmark).

Record [agent-benchmark/summary.json](https://circuittwin.ai/evidence/agent-benchmark/summary.json) (SHA-256 `35b044498694f61ddf526bd2f298d02f1845dcc1b08b396f08a74231b1cd99df`, rev `287d49a4a`, clean, 2026-11-21). Setup [compare/qemu-benchmark-setup.json](https://circuittwin.ai/evidence/compare/qemu-benchmark-setup.json) (from `eval-results/agent-bench-2026-11-21/results.json`, SHA-256 `4a4c6abc193035c5ab4ab5d7ed060faf883b32e04f2668584c498b6a8f04fa96`).

### Results

| Measure                                   | CircuitTwin | QEMU     |
| ----------------------------------------- | ----------- | -------- |
| Buggy versions caught                     | 24 of 26    | 20 of 26 |
| Buggy versions missed                     | 2           | 6        |
| Working builds passed                     | 17 of 17    | 10 of 17 |
| Distinct catches (signal differs from v0) | 24          | 8        |
| Caught by platform signal                 | 16          | 5        |

Overlap across 26 bugs: both 19, CircuitTwin only 5, QEMU only 1, neither 1.

### Reading the numbers

- A bug counts as caught when a buggy ELF fails its check, hangs, faults, or triggers a CircuitTwin diagnostic. It counts as missed when a buggy ELF passes cleanly. Working `v0` builds should pass cleanly.
- 12 of QEMU’s 20 catches show the exact same error as its broken `v0` build (CircuitTwin: 0 of 24).
- CircuitTwin passed all 17 of 17 working builds. QEMU passed 10 of 17 and broke 7 working builds because GPIO, DMA, and I2C are unimplemented ([QEMU docs: STM32](https://www.qemu.org/docs/master/system/arm/stm32.html), 2026-11-20) and dummy reads return 0 ([QEMU source: unimp.c](https://gitlab.com/qemu-project/qemu/-/blob/master/hw/misc/unimp.c), 2026-11-20). Per-case logs live on the [agent benchmark](https://circuittwin.ai/docs/agent-benchmark).

### Missed bugs

- CircuitTwin missed 2: `i2c_nack` v2 (I2C NACK not handled) ; `reset_vals` v1 (reliance on undocumented reset values).
- QEMU missed 6: `baud` v1 (wrong UART baud versus the peer) ; `clk_timer` v1 (missing peripheral clock enable) ; `irq_chain` v3 (interrupt flag not cleared) ; `race` v1 (race between ISR and main) ; `reset_vals` v1 (reliance on undocumented reset values) ; `wdg` v1 (unkicked watchdog).

### Limits

- Tasks were written by CircuitTwin (first run helped fix twin bugs); raw counts over 43 ELFs carry no confidence interval.
- Twin ran `stm32f4-discovery` (`ct 0.1.0`); QEMU 10.0.13 ran `olimex-stm32-h405` (QEMU has no Discovery machine ([QEMU docs: STM32](https://www.qemu.org/docs/master/system/arm/stm32.html), 2026-11-20)).
- No run was compared against physical hardware.

## Where QEMU is stronger

- Emulates full operating systems across dozens of CPU architectures and machines ([QEMU docs: targets](https://www.qemu.org/docs/master/system/targets.html) , [QEMU docs: About](https://www.qemu.org/docs/master/about/index.html), 2026-11-20).
- Runs near-native virtualization speed via KVM or Xen ([QEMU docs: About](https://www.qemu.org/docs/master/about/index.html), 2026-11-20).
- Supports deterministic record/replay with reverse GDB stepping ([QEMU docs: record/replay](https://www.qemu.org/docs/master/system/replay.html), 2026-11-20).
- GPLv2 open-source license ([QEMU docs: license](https://www.qemu.org/docs/master/about/license.html), 2026-11-20).

## Sources

Every source below was read on 2026-11-20.

### About QEMU

- [QEMU documentation: About QEMU](https://www.qemu.org/docs/master/about/index.html): What QEMU is; system emulation, user-mode emulation and virtualization.
- [QEMU documentation: System emulator targets](https://www.qemu.org/docs/master/system/targets.html): QEMU emulates many machines; the machines and boards of each target.
- [QEMU documentation: STMicroelectronics STM32 boards](https://www.qemu.org/docs/master/system/arm/stm32.html): The STM32 machines QEMU provides, the devices it supports and the devices it lists as missing (development documentation).
- [QEMU source: hw/misc/unimp.c](https://gitlab.com/qemu-project/qemu/-/blob/master/hw/misc/unimp.c): The device that stands in for regions of a machine QEMU has not implemented.
- [QEMU documentation: GDB usage](https://www.qemu.org/docs/master/system/gdb.html): The GDB stub, breakpoints and watchpoints.
- [QEMU documentation: Record/replay](https://www.qemu.org/docs/master/system/replay.html): Deterministic replay, instruction counting and reverse debugging.
- [QEMU documentation: License](https://www.qemu.org/docs/master/about/license.html): The GNU General Public License, version 2.
- [QEMU documentation: Supported build platforms](https://www.qemu.org/docs/master/about/build-platforms.html): The host operating systems QEMU builds and runs on.

### About CircuitTwin

- ADR-0016, the architecture decision record for the deterministic functional-twin core (accepted 2026-08-20, amended 2026-10-21): the custom engine is the only active execution path. It is an internal record of the CircuitTwin repository.
- [Core concepts](https://circuittwin.ai/docs/concepts): Twins built from vendor documents; runs, verdicts and evidence labels; determinism; scenes and links.
- [Debug in your IDE](https://circuittwin.ai/docs/ide): The GDB server for STM32CubeIDE, VS Code and plain GDB (reverse-step/continue, RTOS threads, SWO/ITM and RTT).
- [Install](https://circuittwin.ai/docs/install): Native ct CLI installers on Windows (install.ps1), macOS and Linux (install.sh), plus access-token sign-in.
- [Pricing](https://circuittwin.ai/pricing): The plans and their weekly allowances.
- [Board dashboard](https://circuittwin.ai/docs/board-dashboard): Each board and suite with its level, status and evidence file.
- [Accuracy report](https://circuittwin.ai/docs/accuracy): What the twins are checked against, the results and the known gaps, including timing and the reference emulators.
- [Agent benchmark](https://circuittwin.ai/docs/agent-benchmark): Seeded firmware bugs run on a twin, Renode and QEMU, with every case and the record.

## More

Other comparisons:

- [CircuitTwin vs Renode](https://circuittwin.ai/compare/renode): An open-source emulation framework with a large catalog of boards, compared from its public pages and on the agent benchmark.
- [CircuitTwin vs Simantic](https://circuittwin.ai/compare/simantic): A firmware simulator with published firmware demos and tracing options, compared from its public pages.
- [CircuitTwin vs Wokwi](https://circuittwin.ai/compare/wokwi): A browser and VS Code simulator for ESP32, Arduino and RP2040, compared on PCB import, datasheet twins, fault matrices and unmodelled-register reporting.
- [CircuitTwin vs LabWired](https://circuittwin.ai/compare/labwired): An MIT open-core YAML-configured embedded simulator compared on PCB auto-wiring, datasheet twin generation, 17-ISA coverage, 3D Proving Ground, and hosted MCP.
- [CircuitTwin vs HardLabs](https://circuittwin.ai/compare/hardlabs): Design-driven PCB firmware-in-the-loop simulation compared on self-serve datasheet twins, 3D Proving Ground physics, hosted MCP, and published evidence.
- [CircuitTwin vs Velxio](https://circuittwin.ai/compare/velxio): A free AGPLv3 browser simulator with WebAssembly ngspice compared on custom PCB import, headless CI matrices, reverse-GDB, and explicit unmodelled-register checks.
- [CircuitTwin vs HIL Benches](https://circuittwin.ai/compare/hil-benches): Physical Hardware-in-the-Loop racks vs deterministic digital twins for PR-level firmware CI, fault matrices, electrical sign-off and cost.
- [CircuitTwin vs Proteus VSM](https://circuittwin.ai/compare/proteus): Windows mixed-mode SPICE/MCU schematic simulation compared with Linux/macOS headless CI, KiCad PCB import and datasheet twin generation.
- [CircuitTwin vs Arm Virtual Hardware](https://circuittwin.ai/compare/arm-virtual-hardware): Official Arm Corstone/Ethos-U FVPs compared with multi-vendor MCUs, custom PCB netlists, sensor twins and bus fault injection.
- [CircuitTwin vs PX4 SITL](https://circuittwin.ai/compare/px4-sitl): Host POSIX Gazebo simulation compared with executing the real px4\_fmu-v6c Cortex-M7 ELF on STM32H743 and SPI/I2C sensor twins.
- [CircuitTwin vs Zephyr native\_sim](https://circuittwin.ai/compare/zephyr-native-sim): Zephyr POSIX host builds (ASan/UBSan/Twister) compared with running the real cross-compiled MCU zephyr.elf on board twins.
- [CircuitTwin vs simavr](https://circuittwin.ai/compare/simavr): Open-source GPL-3.0 8-bit AVR simulation and GTKWave VCD traces compared with datasheet sensor twins, PCB import and 32-bit MCUs.
- [CircuitTwin vs Keil uVision Simulator](https://circuittwin.ai/compare/keil-uvision-simulator): Windows legacy Cortex-M IDE simulation compared with headless Linux/macOS CI and datasheet-generated vendor peripheral twins.

The records behind CircuitTwin’s numbers:

- [Accuracy report](https://circuittwin.ai/docs/accuracy): What the twins are checked against, the results and the known gaps, with the record behind each number.
- [Board dashboard](https://circuittwin.ai/docs/board-dashboard): Each board and suite with its level, status and evidence file.
- [Agent benchmark](https://circuittwin.ai/docs/agent-benchmark): Seeded firmware bugs run on a twin, Renode and QEMU, with every case and the record.
- [Twin generation and checks](https://circuittwin.ai/docs/twin-generation): How a twin is generated from vendor documents and checked before you rely on it.
