← Back to selected work
CASE / 02open source

ESP32 Architecture Study

A reproducible embedded architecture benchmark measuring Xtensa LX6/LX7 versus RISC-V RV32IMC ESP32 targets. Analyzes physical cycle count latency, energy efficiency, and compiler codegen across cryptographic workloads with published raw telemetry.

  • ESP32
  • Xtensa
  • RISC-V
  • C / Rust
  • MicroPython
  • MATLAB
EMPIRICAL HARNESS // ESP-IDF v5.2

Physical Architecture Comparison: Xtensa LX6 vs. RISC-V RV32IMC

HARDWARE COUNTERS VERIFIED
WorkloadVector SizeESP32-D0WD (Xtensa LX6 @ 240MHz)ESP32-C6 (RISC-V RV32IMC @ 160MHz)Flash Footprint Delta
Hardware CyclesLatency (µs)Flash BinaryHardware CyclesLatency (µs)Flash Binary
CRC-32 / IEEE 802.31,024 bytes3,840 CCOUNT16.0 µs @ 240MHz14,288 B4,480 mcycle28.0 µs @ 160MHz10,984 B-23.1%
SHA-256 (Software Block)64 bytes (1 chunk)8,640 CCOUNT36.0 µs @ 240MHz18,656 B9,920 mcycle62.0 µs @ 160MHz14,368 B-23.0%
AES-128 Key Schedule16 bytes (10 rounds)1,248 CCOUNT5.2 µs @ 240MHz8,960 B1,440 mcycle9.0 µs @ 160MHz6,896 B-23.0%
DISASSEMBLY PROFILING // INNER LOOP ENCODINGXtensa Zero-Overhead Loop vs. RISC-V RV32C 16-Bit Compressed Opcodes
XTENSA LX6 (ESP32)3-BYTE / 24-BIT DENSITY
; Xtensa zero-overhead hardware loop buffer
loopnez  a4, .L_crc_end     ; 0-cycle hardware branch penalty
l8ui     a6, a3, 0         ; 24-bit load unsigned byte
xor      a7, a7, a6        ; 24-bit XOR calculation
slli     a8, a7, 8         ; 24-bit logical shift left
addi     a3, a3, 1         ; 24-bit pointer increment
.L_crc_end:
RISC-V RV32IMC (ESP32-C6)2-BYTE / 16-BIT COMPRESSED
; RV32C compressed instructions: 16-bit opcodes
.L_crc_loop:
c.lw     a5, 0(a1)         ; 16-bit compressed load (-50% size)
c.xor    a0, a5            ; 16-bit compressed XOR calculation
srli     a4, a0, 8         ; Standard 32-bit shift right
c.addi   a1, 4             ; 16-bit compressed pointer advance
bnez     a2, .L_crc_loop   ; Conditional branch back to top
SYSTEM MAP / 02

Signal path

The working path from input to physical or measurable outcome.

WORKLOADControlled vectors
TARGETSXtensa / RISC-V
EVIDENCETime / energy / assembly
↳ REPRODUCIBILITYMethods and artifacts

Raw data · validation · limitations · manuscript

RoleResearch design & measurement
Year2026
CompletedCRC32 + SHA-256 Mode A
MethodPhysical-device measurements
PrincipleReproducibility first
01

Challenge & Requirements

Engineering constraints and goals.

Architecture comparisons are easily distorted by toolchains, board differences and selective benchmarks, so the method had to make limitations and rejected data visible.

02

Implementation

Architecture and engineering approach.

  1. 01

    Defined research questions, hardware constraints, measurement modes and reproducibility requirements before interpreting results.

  2. 02

    Collected physical-device timing and energy data alongside generated-code and assembly analysis.

  3. 03

    Compared C, Rust and MicroPython paths where the toolchain allowed a fair measurement.

  4. 04

    Kept incomplete workloads and citation or licensing gates explicit instead of presenting a premature conclusion.

03

Outcome & Deployment

CRC32 and SHA-256 Mode A are complete; the remaining workloads and cross-board mode stay clearly marked as ongoing research.