Security · Edge AI · FPGA

On-chip power side-channel monitoring of an FPGA DNN accelerator

A voltage sensor built from FPGA fabric, next to a neural-network accelerator on Zynq-7000. Its traces show when the accelerator runs inference.

  • 150 MHzTDC sensor clock
  • 76.56%DSP utilization
  • 47.52%BRAM utilization
  • 0installs needed on the board

Architecture · block diagram

  • Main data path
  • Logic
  • Processor
  • Memory
  • Interconnect
  • Off-chip
Zynq-7000: TDC voltage sensor beside the DPU, shared AXI control and DMA to DRAM, Linux runtime and analysisZYNQ-7000 · XC7Z045 (ZC706)TDC voltage sensor150 MHzDPUDNN inferencePS · LinuxDNN runtime · trace analysisAXI control busAXI DMADRAMtrace bufferstracesper inference
FIG. 01

The story

A neural-network accelerator draws current while it runs. The supply voltage of the chip dips in a pattern that follows its workload. On an FPGA, a sensor built from the fabric can measure those dips. For a research client, I built the hardware and software to capture those traces next to a running DNN accelerator, for the client's analysis.

Challenges

The sensor shares the chip with the accelerator, and its placement moves when the design changes. Captures had to be repeatable across many inferences. The board also had to run with no installs, no internet access and no compiles on the board.

What I built

On a Zynq-7000 (ZC706), a TDC-based voltage sensor sits beside the DPU inference engine. Both connect to an AXI control bus. Sensor data flows through AXI DMA into DRAM. The PS runs Linux with the DNN runtime and the tools for offline analysis of the captured traces.

The PetaLinux root filesystem is self-contained. Recipes build the DPU runtime, the dpu.ko kernel module and the capture apps into the image. The board runs on first boot with no setup.

The hardest problem

A TDC sensor is a delay line, and its reading depends on where the placer puts it. When the accelerator changed, auto-placement moved the sensor, and its baseline got worse. Pblock and Tcl placement constraints now lock the location of the sensor, and its baseline holds across design changes.

The final design uses 76.56% of the DSP slices and 47.52% of the BRAM on the XC7Z045.

Result

In the per-inference traces, DNN inference is clearly different from idle. With the placement locked, the sensor baseline holds across design changes. The self-contained Linux image captures traces with no setup on the board.

A per-inference trace from the on-chip sensor. The inference window stands out plainly from idle.
Measured data
Per-inference power side-channel trace from the on-chip voltage sensor: DNN inference clearly separable from idle
Original design diagram
Original design diagram: Zynq-7000 with TDC voltage sensor, DPU, PS with Linux, AXI control bus, AXI DMA and DRAM

Resource utilization on the XC7Z045

ResourceUsedAvailableUtilization
LUT7055221860032.27%
LUTRAM2704704003.84%
FF20253543720046.33%
BRAM25954547.52%
DSP68990076.56%
MMCM1812.50%
Where it's used

Where you'd find something like this

01

Security assessment of AI accelerators: leakage that can reveal model activity

02

Threat analysis for multi-tenant FPGA clouds

03

On-chip activity and health monitoring

Available · Asia/Dhaka (UTC+6)

Have hardware that needs to work?

Tell me what you're building. I'll come back with questions, a rough scope and an estimate, usually within 2 days.

PAD 01 · I/O