Skip to content
STIMSMITH

Accelerator Value Spectra

Concept WIKI v1 · 7/26/2026

Accelerator Value Spectra are FPGA-relevant runtime measurements tracked from synthesized HLS kernels (e.g., actual variable value ranges, accessed memory offsets, used stack size, loop iteration counts, and FIFO queue sizes) used by HeteroFuzz as guidance feedback to detect platform-dependent divergence between CPU and FPGA execution.

Accelerator Value Spectra

Definition

Accelerator Value Spectra are FPGA-relevant runtime value measurements collected from synthesized hardware kernels produced by High-Level Synthesis (HLS). Because HLS implements branching as a pipeline of hardware logic—where each branch executes in parallel as long as prior signals are ready, but untaken branches simply produce unused outputs—branch coverage cannot be derived directly from the synthesized hardware. To overcome this limitation, HeteroFuzz analyzes inserted HLS pragmas and traces their associated FPGA-relevant spectra as accelerator feedback [chunk:58e8345a]. Accelerator Value Spectra are described as a multi-dimensional guidance feedback signal, used alongside host-code branch coverage, to detect platform-dependent divergence between CPU and FPGA execution [chunk:309a4e09].

The mapping from HLS pragma categories to their corresponding Accelerator Value Spectra (as defined in Table 2 of the HeteroFuzz paper) is:

Category HLS Directive / Pragma FPGA-Relevant Value Spectra
Data Type typedef ap_uint<x> bitx, typedef ap_int<x> bitx The actual variable values with this type
Memory #pragma HLS array_partition, #pragma HLS array_reshape, #define size M The set of accessed offsets
Recursion N/A The actual used size of a stack and the number of iterations
Parallelization #pragma HLS dataflow The FIFO queue size if a feedback path exists
Parallelization #pragma HLS pipeline, #pragma HLS unroll (Pipeline/unroll derivatives covered in the parallelization category)
Loop #pragma HLS loop_tripcount, #pragma HLS loop_flatten, #pragma HLS loop_merge The actual number of iterations
Interface / Configuration #pragma HLS INTERFACE ... N/A

[chunk:4e5adb82]

HeteroFuzz currently supports five kinds of value spectra, and the mapping is user-extensible via a configuration file [chunk:58e8345a].

Purpose and Motivation

Standard fuzzing relies on branch coverage as a guidance metric. However, in heterogeneous applications (CPU host + FPGA accelerator):

  • Inputs with the same branch coverage in the host code can still have distinct impacts on hardware characteristics [chunk:58e8345a].
  • Heterogeneous platforms often produce divergent behavior because of hardware synthesis assumptions, not host-code structure [chunk:7cb639d7].
  • Numerous severe security problems originate from host–accelerator interaction [chunk:58e8345a].

Therefore, accelerator value spectra provide an additional, hardware-relevant guidance signal that helps a fuzzer reach inputs which trigger platform-dependent divergence.

How Accelerator Value Spectra Are Tracked

Tracking mirrors AFL's coverage accounting, but for hardware values [chunk:309a4e09]:

  1. In each test execution, HeteroFuzz initializes an array acc_feedback, where each entry has four fields: <value spectra type, name, min value, max value>.
  2. It then updates total_feedback to record cumulative value spectra for all seen inputs that can safely execute on the synthesized FPGA.
  3. An input is kept in the generated tests if it increases either host branch coverage or accelerator value spectra.

Concrete Example (accumulate kernel, Figure 2c)

For an accumulation kernel accumulate (Figure 2c) declared with custom bitwidth types typedef ap_uint<8> bit8 and typedef ap_uint<9> bit9, HeteroFuzz records three types of value spectra [chunk:58e8345a, chunk:309a4e09, chunk:faf2ea85]:

  1. The value range of fpga_data, the output variable sum, and intermediate variable i (variables declared with custom bitwidth types in lines 22–24).
  2. The set of accessed offsets in the pre-allocated array data_fpga (declared with maximum size 400 in line 22).
  3. The actual loop iteration count, which together with array access offsets helps detect divergence when the size of offloaded data is not a multiple of 2 (unroll pragma at line 29).

HLS data transfer interface pragmas (lines 7–21) are ignored, as they have no impact on kernel logic.

For kernel inputs [1,1,1,253], the tracked hardware feedback (column "FPGA Accelerator Spectra") is exemplified in Table 3 [chunk:309a4e09, chunk:faf2ea85]:

  • input_value fpga_data — min 1, max 253
  • variable_value i — min 0, max 3
  • variable_value sum — min 0, max 3
  • mem_offset fpga_data{0,1,2,3}
  • loop SUM_LOOP — iterations 2

Interaction with Other HeteroFuzz Components

Probabilistic Mutations

When a new bitwidth range (or any new accelerator value spectrum) is achieved by a mutation, HeteroFuzz labels that mutation as a favored mutation and increases its activation probability [chunk:7cb639d7]. Given activation probabilities P = {P0, P1, ..., Pl−1} for l mutations, the dynamic update rule is [chunk:95051609]:

Pm = Pm + α        if m is chosen and it increases spectra
Pm = Pm − α/(l−1)  otherwise

with α = 0.05 as the predefined update factor and an initial probability of 1/l for each mutation. For example, when input IDs grow, a mutation M3 that increases the spectra of input_value and variable_value has its probability raised from 0.17 to 0.22, while other probabilities drop to 0.16 [chunk:faf2ea85, chunk:95051609].

Selective Invocation

To reduce the long latency of repetitive hardware simulation, HeteroFuzz maintains the range of seen kernel input values that execute correctly on FPGA (and their data size) [chunk:4b0a7c8b]. It skips hardware simulation if the current kernel input remains within the memorized safe range, because accelerator synthesis is determined and optimized by kernel input values, so multiple invocations within the same value range tend to expose only redundant divergence symptoms. A kernel input that exceeds the previously seen range triggers enable_sim = true and a hardware simulation call.

Why Range-Tracking Is Sufficient

For the purpose of finding new divergence symptoms, it is enough to record only the range (e.g., (2, 5)) of integer-valued kernel variables rather than enumerating all combinations (e.g., {2, 3, 5}) [chunk:4b0a7c8b]. This relies on a property of FPGA synthesis: an integer or fixed-point variable maps to a contiguous range of values, so an error for an unseen combination such as {2, 4, 5} will be identical to symptoms already exposed by executing values less than 2 or greater than 5.

Empirical Impact

Across seven publicly available heterogeneous applications (P1–P7), monitoring accelerator value spectra produces significant gains over branch-coverage-only fuzzing [chunk:36f56142, chunk:95051609]:

  • HeteroFuzz finds 7.78× more divergence-inducing inputs (3.7× more unique divergence symptoms) than a version without accelerator spectra monitoring [chunk:4c425771].
  • Across all seven applications, the version without spectra takes a total of 21 hours to find 10 unique symptoms, while HeteroFuzz takes only 0.52 hours—a 40× speed-up [chunk:36f56142].
  • HeteroFuzz's coverage in host code grows slightly slower than WithoutSpectra, because it steers the fuzz engine to explore more platform-dependent divergence rather than maximizing host branch coverage [chunk:4c425771].
  • On average, 56.8% of inputs generated by HeteroFuzz are divergence-inducing, versus 6.48% for WithoutSpectra [chunk:36f56142].

Sub-component: FIFO Queue Size

One specific accelerator value spectrum tracked under the parallelization category is the FIFO queue size, monitored when a #pragma HLS dataflow directive introduces a feedback path. In a FIFO Queue, #pragma HLS dataflow enables task-level pipelining, allowing parallel execution of producer and consumer tasks. HeteroFuzz uses FIFO queue fullness as a feedback signal; the dataflow dataflow directive is the relevant HLS pragma category whose FPGA-relevant value spectra is "The FIFO queue size if feedback path exists" [chunk:4e5adb82, chunk:309a4e09].

Extensibility

The set of supported spectra is "user-extensible by modifying a configuration file" [chunk:58e8345a]. Although HeteroFuzz is designed for FPGA accelerators, its core idea—monitoring platform-specific spectra—can be extended to other heterogeneous platforms by replacing the spectra definitions with platform-relevant ones.

CITATIONS

13 sources
13 citations
[1] Accelerator Value Spectra are FPGA-relevant runtime measurements tracked from synthesized HLS kernels and used as guidance feedback for detecting platform-dependent divergence. HeteroFuzz: Fuzz Testing to Detect Platform Dependent Divergence for Heterogeneous Applications
[2] HeteroFuzz currently supports five kinds of value spectra, with the HLS-pragma-to-spectra mapping being user-extensible via a configuration file. HeteroFuzz: Fuzz Testing to Detect Platform Dependent Divergence for Heterogeneous Applications
[3] Table 2 maps HLS pragma categories (Data Type, Memory, Recursion, Parallelization, Loop, Interface/Configuration) to specific FPGA-relevant Accelerator Value Spectra, including actual variable values, accessed offsets, used stack size, iteration counts, and FIFO queue size. HeteroFuzz: Fuzz Testing to Detect Platform Dependent Divergence for Heterogeneous Applications
[4] Branch coverage cannot be derived directly from synthesized hardware because HLS implements branching as a pipeline of hardware logic where untaken branches simply produce unused outputs. HeteroFuzz: Fuzz Testing to Detect Platform Dependent Divergence for Heterogeneous Applications
[5] Inputs with the same branch coverage in the host code can still have distinct impacts on hardware characteristics, motivating accelerator value spectra as an additional guidance signal. HeteroFuzz: Fuzz Testing to Detect Platform Dependent Divergence for Heterogeneous Applications
[6] Each test execution initializes an acc_feedback array with entries of form <value spectra type, name, min value, max value>, and total_feedback tracks cumulative spectra of FPGA-safe inputs. HeteroFuzz: Fuzz Testing to Detect Platform Dependent Divergence for Heterogeneous Applications
[7] For the accumulate kernel, HeteroFuzz records the value range of fpga_data, sum, and i, the set of accessed offsets in data_fpga, and the actual loop iteration count. HeteroFuzz: Fuzz Testing to Detect Platform Dependent Divergence for Heterogeneous Applications
[8] Mutation activation probabilities are updated by adding α=0.05 when a mutation increases spectra and subtracting α/(l−1) otherwise, with initial probability 1/l. HeteroFuzz: Fuzz Testing to Detect Platform Dependent Divergence for Heterogeneous Applications
[9] Recording only the range of integer-valued kernel variables is sufficient because FPGA synthesis maps integer/fixed-point variables to contiguous value ranges. HeteroFuzz: Fuzz Testing to Detect Platform Dependent Divergence for Heterogeneous Applications
[10] Monitoring accelerator spectra produces 7.78× more divergence-inducing inputs (3.7× more unique divergence symptoms) than branch-coverage-only fuzzing. HeteroFuzz: Fuzz Testing to Detect Platform Dependent Divergence for Heterogeneous Applications
[11] Across seven applications, WithoutSpectra takes 21 hours to find 10 unique symptoms while HeteroFuzz takes 0.52 hours—a 40× speed-up. HeteroFuzz: Fuzz Testing to Detect Platform Dependent Divergence for Heterogeneous Applications
[12] On average, 56.8% of HeteroFuzz-generated inputs are divergence-inducing, versus 6.48% for WithoutSpectra. HeteroFuzz: Fuzz Testing to Detect Platform Dependent Divergence for Heterogeneous Applications
[13] FIFO queue size is the FPGA-relevant value spectra associated with #pragma HLS dataflow when a feedback path exists. HeteroFuzz: Fuzz Testing to Detect Platform Dependent Divergence for Heterogeneous Applications