Manuscript Offprint
arXiv:2610.27356Stop Paying by the Letter: Accelerating Full-Chip RTL Simulation with Host-Side Tokenized Logging
Daniel Keller and Rohit Kumar
{kellerdaniel, rohitpipania}@google.com
Abstract—Firmware diagnostic logging (printf) is an essential debug instrument in full-chip system-on-chip (SoC) design verification, yet it imposes a heavy tax on cycle-accurate RTL simulation: formatting a 30-character, 1-argument message on a simulated CPU and serializing it through a memory-mapped aperture costs 3.04 to 15.23 s per call (up to 19.60 s for a 34-character, 4-argument call; 15.27 s unweighted / 15.08 s print-weighted critical-path mean across Subsystem Suite A). Unlike embedded tokenizers that target flash footprint and serial wire bytes with offline decoding, RTL simulation is governed by a two-regime cost function—cross-fabric SoC paths are dominated by MMIO bus stalls (84.7% of call latency) whereas local subsystem paths are dominated by on-core vsprintf formatting (61.7%)—and requires live, zero-simulation-time string reconstruction to drive UVM scoreboards.
We present a host-side in-simulation tokenized logging architecture for heterogeneous multi-core SoCs that eliminates both bottlenecks with zero firmware call-site edits. Using link-time ELF format-string virtual addresses as tokens over a fixed 32-bit word-aligned slot protocol (identical across Arm, RISC-V, and DSP cores), on-core logging collapses to a single-pass specifier scan and MMIO word writes. This removes all on-core radix conversion , 85.0%-94.5% of deployed bus transactions , 84.6%-93.3% of MMIO bus-stall cycles, and 63.5%-90.9% of total on-core logging cycles ; 69.6%-70.4% of retired instructions), while a SystemVerilog monitor reconstructs bit-exact strings in zero simulated cycles . Across 858 matched full-chip test pairs (1,716 paired runs across 1,972 total runs) spanning two production suites (Subsystem Suite A, ; Subsystem Suite B, ), we achieve 100% output parity with zero simulator memory overhead, saving 1,314.85 simulator CPU hours (-26.18%) per regression pass, reducing median single-test CPU time by 41.51% on Subsystem Suite A and 21.33% on Subsystem Suite B, boosting mean effective simulator throughput by +24.02% on Subsystem Suite A and +19.60% on Subsystem Suite B per CPU second (+8.51% and +23.25% per wall-clock second), and shrinking Subsystem Suite A instruction traces by 42.84% and waveform dumps by 28.82% (medians).
Index Terms—RTL simulation, design verification, firmware logging, tokenized logging, simulation acceleration, SystemVerilog, UVM
I. INTRODUCTION
Consider a single line of firmware diagnostic output emitted thousands of times during full-chip system-on-chip (SoC) bring-up and verification:
On physical silicon, emitting this message takes microseconds and is negligible. Inside a cycle-accurate RTL simulation of that same silicon, however, it is computationally expensive. Under a standard bare-metal C library, the simulated processor executes hundreds of instructions of integer-to-ASCII conversion (vsprintf) through its fetched, decoded, and retired pipeline stages, followed by dozens of memory-mapped I/O (MMIO) bus transactions across the interconnect fabric—and, on one of the three subsystems we study, a full data-synchronization barrier after every character. Across the production SoC topologies evaluated in Section III and Section VII, a single 30-character, 1-argument print call consumes 3.04 s on a local subsystem tube to 15.23 s on a cross-fabric SoC tube (Table I; up to 19.60 s for a 34-character, 4-argument call), and saves a critical-path mean of s unweighted (15.08 s print-weighted) of simulated time per print across full-chip multi-core tests on Subsystem Suite A ( cycles at 1 GHz, vs. 3.64–5.41 s on peripheral-dominated Subsystem Suite B workloads). Because full-chip event-driven RTL simulation executes millions of times slower than silicon, simulating those logging cycles burns 37.8 to 441.5 host server CPU seconds (7.36 CPU minutes in power-aware UPF simulation) per printf call.
-
Transactions and formatting dominate in two topology-dependent regimes, not byte count: On cross-fabric SoC paths, interconnect handshakes account for 84.7% of call latency (430.0 ns/char once the 3-entry store buffer fills), whereas on local subsystem paths (27.0 ns per barriered write), software vsprintf formatting accounts for 61.7% (Table I). Variable-length byte packing adds CPU instructions without saving bus transactions; a fixed 32-bit slot protocol removes on-core radix conversion ( ), cuts interconnect write transactions by , and reduces MMIO bus-stall cycles by 84.6%-93.3%.
-
Reconstruction must occur in-simulation in zero simulated time: Firmware logs actively drive live SystemVerilog/UVM scoreboards, severity-based error counters, and real-time pass/fail adjudication, so strings must materialize dynamically at the exact simulation timestamp they are emitted ( ).
Host-Side Tokenized Logging for RTL Verification
We present a host-side in-simulation tokenized logging architecture for heterogeneous multi-core SoCs. Using the link-time read-only memory (.rodata) virtual address of each format string as its token ID intercepts standard C printf calls transparently without modifying a single call site. Because the protocol relies solely on ELF section tables, C99 variadic promotion, and 32-bit MMIO stores, it operates identically across Arm (AArch64/AArch32), RISC-V (RV32/RV64), and embedded DSP cores. On the simulated processor, radix conversion is eliminated ( ), leaving only a single-pass specifier scan ( ) and word writes—cutting total on-core logging cycles by 63.5%–90.9% ( ) and retired instructions by 69.6%–70.4%—while a SystemVerilog monitor resolves the token against a build-time sidecar dictionary and emits bit-exact UVM log messages in zero simulated clock cycles ( ).
Summary of Contributions
• Two-Regime Cost Model & Effective Throughput Analysis: We derive a serial-fraction cost model (Section III) grounded in instruction-retirement trace decomposition across three SoC logging topologies ( at ) and show that excising high-toggle logging windows increases mean effective simulator throughput by +24.02% on Subsystem Suite A and +19.60% on Subsystem Suite B per CPU second (+8.51% on Subsystem Suite A [damped by a fixed h flush tail] and +23.25% on Subsystem Suite B per wall-clock second).
• Zero-Simulation-Time In-Testbench Reconstruction: We design a modal SystemVerilog/UVM token decoder that reconstructs formatted strings in zero simulated cycles ( ) with 0.00% simulator memory overhead (Section V).
• ISA-Independent Zero-Call-Site-Edit Integration: Link-time ELF virtual-address tokens and a normalized 32-bit wire slot contract enable drop-in deployment across Arm, RISC-V, and DSP subsystems via a single header alias (Section VI).
• Production Full-Chip Evaluation (N = 858 Pairs): Across 858 matched full-chip test pairs (1,716 paired runs across 1,972 total runs) spanning Subsystem Suite A (N = 169) and Subsystem Suite B (N = 689) on a complex multi-architecture, multi-core SoC (Section VII), our architecture achieves 100% bit-exact output parity, saves 1,314.85 simulator CPU hours (-26.18%) and 1,670.75 wall-clock hours (-27.09%) per regression pass, reduces median single-test CPU time by 41.51% (1.706× GMean, up to 5.94×) on Subsystem Suite A and 21.33% (1.266× GMean) on Subsystem Suite B, and shrinks compressed waveform dumps by 28.82% median (2.98–5.94 GB per deep debug trace).
• Exposing Latent Firmware Timing Races: Removing microseconds of artificial per-print serialization delay surfaces latent multi-core firmware synchronization races—such as an unsynchronized 6-processor CSR read-modify-write race with a 3% (261 ns) margin (Section VIII-A)—that character-serialized logging had previously masked.
II. BACKGROUND AND MOTIVATION
A. Firmware Logging in Cycle-Accurate RTL Simulation
Full-chip SoC verification executes production bare-metal bootcode and firmware directly on simulated processor RTL. Because physical UART peripherals require millions of simulated clock cycles per character at standard baud rates, verification environments provide a memory-mapped simulation logging aperture (log tube) that decodes directly to a SystemVerilog testbench monitor. When firmware writes to the log tube, the monitor accumulates characters until a newline and emits the message into the UVM log. Because severity indicators (info, warning, error, fatal) trigger immediate UVM scoreboard checks and end-of-test (EOT) objection handling, log messages must materialize inside the simulator at the exact simulated timestamp they are emitted.
B. Anatomy of the Simulation Logging Tax
Even with a zero-baud-delay log tube, legacy firmware logging compounds overhead across three architectural layers:
a) Software Formatting on the Simulated CPU Pipeline: Converting integer and hexadecimal arguments into ASCII requires iterative division/modulo loops, specifier parsing, and buffer copying that the RTL simulator must evaluate cycle-by-cycle across fetch, decode, ALU, and retirement stages. Eliminating on-core formatting and byte-store loops reduces per-call retired CPU instructions by 69.6%–70.4% (838 → 255 and 874 → 259, Table I) and shrinks full-chip instruction traces across Subsystem Suite A by 42.84% median (up to 79.78%).
b) Bus Interconnect Serialization: Across the three subsystems we study, two write one character per transaction through a byte-wide aperture (55 interconnect transactions for a 55-character message), while the third packs four format-string characters per 32-bit write plus framing and argument words (20 transactions). Every write traverses CPU store buffers, interconnect arbiters, crossbars, and bridge slices, triggering thousands of RTL logic evaluation events.
c) Memory Ordering Barriers: One subsystem’s register-access wrapper pairs every character store with an explicit system data-synchronization barrier, draining the store buffer 55 times per message and preventing write coalescing. The other two issue volatile stores ordered by the aperture’s strongly ordered, non-gathering device-memory attributes, which stall once the processor’s 3-entry MMIO store buffer fills (Section III).
d) Compounding Disk and Host I/O Overhead: Formatting instructions flood retirement traces, MMIO bursts generate dense interconnect waveform toggles, and repeated bus handshakes fill transaction logs. Collapsing each print to word writes shrinks instruction traces by 42.84% median, bus logs by 38.17% median, and compressed waveform databases by 28.82% median (2.98–5.94 GB saved per deep debug run; Section VII).
III. Cost Model
To quantify why host-side log tokenization yields substantial simulation speedups, we derive a closed-form analytical cost model that relates per-message instruction and bus-transaction reductions to end-to-end simulation speedup and effective simulator throughput.
A. Per-message cost
Consider a single log message of formatted length L characters taking n format arguments. A legacy print costs an on-core formatting loop, some number of ordered writes to the log tube aperture, and, on subsystems whose driver requires it, an ordering barrier per write:
where is the instruction cost of the on-core formatting routine, is the topology-dependent cost of a single ordered write transaction from the initiating core to its log tube aperture, and is the cost of an ordering barrier.
There is deliberately no status-poll term: every deployed print path in this SoC is fire-and-forget, and the testbench receivers are passive bus-clock monitors with no wait-state counter, ready/valid backpressure, or DPI callback. Thus is purely initiator-side store issue and interconnect traversal rather than a testbench handshake. The coefficients depend on each subsystem's print driver and interconnect path, and the three drivers deployed across our full-chip verification environment directly explain the empirical suite deltas in Section VII:
-
Byte-serial with on-core formatting and per-character barriers (Subsystem Suite A primary core): C library vsprintf renders into a stack buffer ( cycles, 612 retired instructions for a 30-char, 1-arg call; Table I), then issues one store and one full system data-synchronization barrier per character ( ).
-
Byte-serial with on-core formatting (shared application cores): Local vsnprintf formats on-core ( cycles [1,833.5 ns], 418 instructions; we use vsprintf as unified shorthand for on-core radix formatting ), followed by one single-byte cross-fabric store per character without an explicit barrier ( , ).
-
Word-packed format-string shipping with host-side formatting (Subsystem Suite B primary core): Performs no on-core radix conversion ( ), but runs a byte-packing loop to ship the raw format string four characters per 32-bit MMIO write alongside framing and raw argument words ( , ) while the SystemVerilog monitor formats on the host. Under tokenization all three drivers collapse to a single token word plus S argument words, zero formatting or byte packing ( ), and at most one trailing barrier per message:
where (1 slot per 32-bit scalar, 2 per 64-bit scalar, for an -byte runtime string; Section V) and is the single-pass specifier scan that stores promoted register values to the aperture with zero radix conversion or division.
a) Hardware trace and timing decomposition across all three interconnect topologies: To parameterize Equation (1) without fitting to suite averages, we extract cycle-and instruction-exact parameters from processor instruction-retirement traces for the two processor-formatted topologies (Items 1–2) and from the hardware-timestamped CSR race window for the word-packed controller (Item 3, where instruction tracing is disabled in regression; Section VIII-A). Four message instances appear in our analysis: ( , single-call reference in Table I and Figure 1), ( , multi-argument trace call), ( , CSR race print in Section VIII-A), and ( , bus-transaction comparison):
- Cross-fabric SoC tube (64-bit application core at 2.0 GHz nominal, , ): For , , the baseline print routine takes 15,234.0 ns (30,553 cycles, 838 instructions): on-core formatting is ns (3,677 cycles, 418 instructions, 12.0%), while 30 single-byte stores across the cross-fabric peripheral bridge take ns (25,872 cycles, 420 instructions, 84.7%, or 430.0 ns = 862.4 cycles/char). A 3-character string completes the byte-write loop in 0.997 ns/char (2.0 cycles/char) by absorbing writes into the processor's 3-entry non-gathering MMIO store buffer, after which every subsequent byte store stalls on the cross-fabric handshake (422–434 ns/char). Under tokenization ( stores), in the pessimistic steady-state back-to-back logging regime where the 3-entry buffer is already occupied ( ns bus stall, Table I), the call completes in 1,381.6 ns (2,771 cycles, 255 instructions), an cycle reduction saving —whereas an isolated call starting from an empty store buffer absorbs both stores in 2.0 ns and completes in ns ( , so our headline is a conservative lower bound). On a 34-character, 4-argument call ( , , stores; baseline 19,595.3 ns [500.4 ns prolog, ns, ns bus]), a cold buffer absorbs the first 3 stores in 3.0 ns so only stores 4–5 stall ( ns, plus 15.0 ns prolog and ns [506.6 ns base ns]), completing in 2,105.1 ns ( , saving ); with a full buffer ( ns bus), it completes in 3,392.1 ns ( , , saving ).

Fig. 1. Two-regime single-call cost decomposition ( , , Table I). The light gray segment denotes prolog/epilog alone in baseline bars ( ) and prolog/epilog plus specifier scan ( ) in tokenized bars. Cross-fabric logging is dominated by MMIO bus stalls (84.7%), whereas local subsystem logging is dominated by on-core vsprintf (61.7%). Tokenization removes and cuts MMIO bus-stall cycles by 84.6%–93.3%.
-
Subsystem-local tube (Subsystem Suite A primary 64-bit core at 1.000 GHz, 1,000 ps/cycle, ): For a local subsystem aperture, the steady-state per-character store-plus-barrier round-trip ( ) is 27.0 cycles (27.0 ns: 19.0 cycles forward traversal, 7.0 cycles write response, 1.0 cycle retirement, or 35.3 cycles/char with 8.3 cycles loop branch overhead). For , (3,037.0 ns, 3,037 cycles, 874 instructions), vsprintf ( cycles, 612 instructions) dominates 61.7% of baseline latency while the 30 barriered writes ( cycles, 180 instructions) take 34.9%. Tokenization eliminates vsprintf ( ), replacing the 30 barriered byte writes with cycles (218 instructions), 2 back-to-back posted MMIO stores (28 cycles, 14 cycles/store), and one trailing data-synchronization barrier ( cycles to drain two word stores from a cold barrier state vs. 27.0 steady-state cycles per byte store+barrier in a warm loop, cutting bus-and-barrier cycles from 1,059 to , or -93.3%). Total call time drops to 1,110.0 ns (259 instructions)—a reduction ( on 0-argument prints).
-
Word-packed subsystem tube (Subsystem Suite B primary controller at 1.000 GHz-equivalent, , ): In the hardware-timestamped CSR race window of Section VIII-A, a 38-character, 1-argument call issues ordered 32-bit MMIO writes in 3,407 ns ( ns/tx including the byte-packing loop); tokenization collapses those 15 writes to 2 ( ns), saving s (-86.7%). At the , reference point ( writes), baseline MMIO serialization takes ns versus ns tokenized (-84.6% of MMIO bus time; Table I).
Table I and Figure 1 show that both software formatting ( ) and bus serialization ( ) are first-order bottlenecks, with interconnect distance determining which term dominates: on local subsystem tubes ( ns), vsprintf formatting ( ns) is 61.7% of the call cost; on cross-fabric SoC tubes ( ns once the 3-entry MMIO store buffer fills), per-character bus serialization ( ns) is 84.7% of the cost. In full-chip simulation—combining cross-fabric application-core prints ( s saved) with subsystem-local prints ( s saved)—critical-path savings average 15.27 s unweighted (15.08 s print-weighted) on Subsystem Suite A (15.21 s / 15.06 s across all eight multi-core workloads) and 3.64–5.41 s on peripheral-dominated Subsystem Suite B workloads (Section VII).
b) Collapse of interconnect transactions to : For a 55-character message with two integer arguments ( ), tokenization reduces interconnect traffic to 3 word writes: ( , ) against byte-serial transport, and ( , ) against word-packed transport ( writes). Unlike embedded silicon logging [1], [2], where minimizing wire bytes via variable-length integer encoding is paramount, RTL simulation pays a fixed interconnect evaluation cost per bus transaction regardless of payload bit-width. A fixed 32-bit word-aligned slot protocol matches this cost function directly, minimizing bus transactions with zero bit-shifting or packing overhead on the simulated CPU.
B. From per-message savings to end-to-end speedup and throughput ( )
Let a simulation workload execute log messages over a baseline simulated cycle count , with baseline print density . Because tokenization preserves non-logging instruction sequences identically (verified by SHA-256 binary parity in Section VII), in workloads without timing-sensitive multi-core races (Section VIII-A) the tokenized cycle count is , where is the workload-weighted per-message cycle saving. Taking the serial-removal limit () of Amdahl's law [6] yields the simulated-time speedup and its linear reciprocal:
Across our production SoC suites (Section VII), simulated cycle reduction increases monotonically with print volume up to ( cycle speedup), providing an algebraic consistency check on Equation (3) (where per-test print counts are instrumented on our deep-dive subset rather than across all 858 pairs).
Host simulator CPU time falls even further than simulated cycles across both suites: by versus simulated time (+8.19 points) on Subsystem Suite A ( ), and by CPU / wall time versus simulated time (+8.90–9.67 points) on Subsystem Suite B ( ). Rather than claiming a super-linear simulator mechanism, we note that host CPU time is the product of simulated cycle count and average per-cycle evaluation cost, and tokenization reduces both because logging cycles are more expensive to evaluate than average. Defining effective simulator throughput and its baseline-normalized ratio for pair i as
TABLE I
SINGLE-CALL TIMING DECOMPOSITION OF A 30-CHARACTER, 1-ARGUMENT PRINTF (, ) ACROSS ALL THREE DEPLOYED SOC LOGGING TOPOLOGIES
| Phase / Cost Term | Cross-Fabric Tube (App. Core, 2.0 GHz nom.) | Subsystem-Local Tube (Subsystem Suite A, 1.000 GHz) | Word-Packed Tube(Subsystem Suite B, 1.000 GHz) | ||
|---|---|---|---|---|---|
| Time (ns) | Retired Inst. | Time (ns) | Retired Inst. | Time (ns) | |
| Baseline Total () | 15,234.0 | 838 | 3,037.0 | 874 | ≈3,058 (2,952.7 bus) |
| Prolog / Epilog | 500.4 (3.3%) | 105.0 (3.5%) | 82 | ≈105 (ref.) | |
| (on-core vsprintf) | 1,833.5 (12.0%) | 418 | 1,873.0 (61.7%) | 612 | 0.0 (0.0%) |
| (MMIO + barrier) | 12,900.1 (84.7%) | 420 | 1,059.0 (34.9%) | 180 | 2,952.7 (96.6%) |
| Effective rate per bus transaction | 430.0 ns/tx | 14.0 inst/tx | 35.3 ns/tx | 6.0 inst/tx | 227.1 ns/tx |
| Tokenized Total () | 1,381.6 | 255 | 1,110.0 | 259 | ≈1,076 (454.3 bus) |
| Prolog / Epilog | 15.0 (1.1%) | 34 | 116.0 (10.5%) | 38 | ≈116 (ref.) |
| (specifier scan) | 506.6 (36.7%) | 219 | 923.0 (83.2%) | 218 | ≈506 (ref.) |
| (MMIO + barrier) | 860.0 (62.2%) | 2 | 71.0 (6.4%) | 3 | 454.3 (42.2%) |
| Net Per-Call Savings () | -13,852.4 | -583 | -1,927.0 | -615 | ≈-1,982 (-2,498.4 bus) |
| Relative Reduction (Speedup) | -90.9% (11.03×) | -69.6% | -63.5% (2.74×) | -70.4% | ≈-64.8% (2.84×; -84.6% bus) |
Included in formatting frame setup. On Cross-Fabric ( ) and Word-Packed ( ), ( ); on Local ( ), baseline and b=1 tokenized. The Cross-Fabric tokenized bus term ( ns) reflects steady-state back-to-back logging with the 3-entry non-gathering MMIO store buffer occupied; when the buffer starts empty, 1–3 stores are absorbed in 2.0–3.0 ns (reducing L=30, S=1 to ns [29.1×], and L=34, S=4 [5 stores] from 3,392.1 ns [5.78× full-buffer] to 2,105.1 ns [9.31× cold-buffer]). In the Word-Packed column (where instruction tracing is disabled in regression), only ns/tx (3,407 ns/15 tx in Section VIII-A) is directly measured (2,952.7 454.3 ns, -84.6% bus time; -86.7% at L=38), whereas prolog/epilog ( ns) and ( ns) are composite reference estimates from the adjacent columns (substituting the 1.0 GHz local ns yields ns tokenized total, or -51.2% [2.05×] total and -84.6% bus reduction).
where by construction and , is a derived ratio of two measured quantities reporting the change in average per-cycle evaluation cost (driven by high-fanout interconnect handshakes, store-buffer drains, instruction-trace writes, and waveform toggles during logging windows). Excising these windows raises across Subsystem Suite A by +24.02% mean per CPU-s (1.177× GMean, up to +147.63%; +8.51% mean, 1.043× GMean, up to +113.87% per wall-s) and across Subsystem Suite B by +19.60% mean per CPU-s (1.113× GMean, up to +211.96%; +23.25% mean, 1.145× GMean, up to +262.21% per wall-s).
IV. RELATED WORK
Deferred and tokenized software logging. Replacing format strings with compact identifiers is standard in embedded and server logging (pw_tokenizer [1], defmt [5], NanoLog [2], Zephyr dictionary logging [3], TRICE [4], Memfault Compact Logs [7], and OS tracers such as DTrace [8] and LTTng [9] that emit structured records [10]). However, embedded tokenizers optimize for wire bytes and flash footprint via variable-length integer packing, require call-site macro rewrites, and decode offline after execution completes. In RTL simulation, variable-length byte packing adds CPU shift/mask instructions without saving interconnect transactions (), and offline decoding breaks live UVM scoreboards [11] that inspect logs dynamically at each simulation timestamp ().
Simulation I/O, trace IP, and simulator acceleration. Within pre-silicon verification, behavioral UART FIFOs eliminate baud-rate delays but still pay on-core formatting () and per-character MMIO stalls. Arm Semihosting [12], SystemC TLM-2.0 virtual platforms [13], and DPI-C memory backdoors bypass architectural load/store execution and interconnect fabrics, whereas hardware trace transports (MIPI STP [14],
TABLE II
COMPARISON OF LOGGING ARCHITECTURES ACROSS TARGET DOMAINS AND VERIFICATION REQUIREMENTS
| System | Domain | Metric | Token | Decode | Edits |
|---|---|---|---|---|---|
| pw_tokenizer [1] | MCU | Flash/Wire | Hash | Offline | Macro |
| defmt [5] | MCU/Rust | Flash/Wire | ELF Idx | Offline | Macro |
| NanoLog [2] | Server | Host Lat. | Static ID | Offline | Macro |
| Zephyr [3]/TRICE [4] | MCU/RTOS | Wire Bytes | ID/Idx | Offline | Macro |
| DPI Backdoor | Core TB | Sim. Cyc. | Mem. VA | In-Sim | Hook |
| This Work | SoC RTL | Txns/Cyc. | ELF VA | Live () | None |
CoreSight STM [15]) and FPGA trace synthesis (FireSim [16]) require dedicated trace RTL or out-of-band bridges (violating R5) and decode offline. Similarly, RTL simulator kernel optimizations—such as compiled C++ evaluation in Verilator [17], activity-skipping in ESSENT [18], and parallel partitioning in RepCut [19]—accelerate per-cycle evaluation speed, whereas our approach removes millions of target logging cycles and bus handshakes from the workload itself. Unlike host-side UVM uvm_info verbosity filtering, our architecture eliminates on-target firmware formatting and interconnect serialization while preserving 100% live log visibility (Table II).
V. DESIGN
A. Architectural requirements
Our design is governed by five verification requirements:
-
R1 — Bit-Exact Output: Reconstructed log streams must be byte-for-byte identical to legacy character output so UVM scoreboards and golden diffs pass without changes.
-
R2 — Zero Call-Site Edits: Firmware engineers must not modify existing printf call sites across legacy source files.
-
R3 — Strictly Opt-In Build Parity: When tokenization is disabled, compiled binaries and simulation behavior must be 100% byte-identical to the baseline build.
-
R4 — ISA-Independent Multi-Architecture Decoding: A single testbench decoder must service heterogeneous 32-bit and 64-bit cores across Arm (AArch64/AArch32), RISC-V (RV32/RV64), and DSP subsystems with differing ABI conventions.
-
R5 — Zero Hardware or Interconnect Changes: The protocol must reuse existing memory-mapped simulation tube apertures without adding RTL logic or modifying the design under test (DUT).
B. Token identity: link-time ELF virtual address
Compile-time string-hashing tokenizers [1] require a pre-processor macro to inspect string literals at every call site, violating R2; once execution enters a variadic C function, the literal has decayed to a const char * pointer. In linked firmware images, however, the const char * pointer passed to tok_printf(const char *fmt, ...) is already a unique identifier: its link-time virtual address in read-only data (.rodata). Using the 32-bit ELF virtual address as the token yields three properties:
-
Zero call-site edits (R2): Redirecting a subsystem's logging requires only a single header alias mapping its print macro to tok_printf.
-
Collision-free across distinct strings: Within a firmware image, two format strings share a .rodata address only if the linker merges textually identical or suffix-overlapping literals (-fmerge-constants); because the dictionary string is identical, reconstructed output remains bit-exact (whereas hash tokenizers also admit collisions between distinct strings). Across subsystems with overlapping local SRAM/TCM address maps, each simulation tube aperture binds exclusively to its core's sidecar dictionary indexed by (aperture_id, VA).
-
CPU architecture independence (R4): Unlike Arm Semihosting [12] (BKPT/HLT traps), ELF .rodata sections are standard across gcc and clang/LLVM toolchains for Arm, RISC-V, and DSP targets.
C. Word-aligned slot wire protocol and severity handling
A tokenized log message is transmitted as a 32-bit token word followed by 32-bit argument slots (Table III, Figure 2). Promoting narrow integers to 32-bit slots and serializing 64-bit values as two deterministic 32-bit words (low word first, then high word) satisfies R4 across LP64, ILP32, and DSP ABIs. Dynamic runtime strings (%s) pack four characters per 32-bit word terminated by a 0xFE sentinel. To preserve exact UVM error-counter timing (R1), warning/error prints retain a single control-byte write ahead of the token word writes on of messages in passing runs). Post-link Python extraction parses each ELF image's .rodata section into a sidecar dictionary (string_dict.txt) recording each string's 32-bit virtual address, ABI-computed slot count , and escaped text (preserving explicit \n line boundaries).
TABLE III ARGUMENT WIRE-SLOT ENCODING CONTRACT
| Specifier | Slots | Wire Encoding |
|---|---|---|
| %d, %i | 1 | Sign-extended to 32 bits |
| %u, %x, %o, %c | 1 | Zero-extended to 32 bits |
| 64-bit integer (%llx), ptr | 2 | Low 32-bit word first, then high word |
| Dynamic string (%s) | Packed 4 chars/word; 0xFE sentinel | |
| Literal percent (%) | 0 | Consumes no argument slot |
| 31 | 0 | 31 | 0 | 31 | 0 | 31 | 0 |
|---|---|---|---|---|---|---|---|
| Word 0: Token IDELF .rodata VA | Word 1Arg Slot 1 (32b) | Word 2..S-164b Hi / Packed %s | Word S: Final SlotScalar / 0xFE Term | ||||
Fig. 2. Word-aligned 32-bit MMIO wire packet layout bus writes on the target processor, reconstructed in by the SystemVerilog monitor).
D. Zero-simulation-time SystemVerilog host decoder
While emitting the token and argument words incurs cycles on the simulated processor, string reconstruction on the host server executes in zero simulated clock cycles (). On every 32-bit MMIO write to the tube aperture, the SystemVerilog monitor executes a three-tier priority state machine:
-
Priority 1 — In-flight argument collection (): Incoming 32-bit words are unconditionally captured as raw argument payload and is decremented.
-
Priority 2 — Token header lookup (, dictionary hit): If idle and the 32-bit word matches a valid virtual address in the aperture's dictionary array, a new token frame begins (emitting immediately in if , or collecting argument words).
-
Priority 3 — Legacy passthrough fallback (, dictionary miss): Unmatched idle writes fall through to the legacy character handler, supporting mixed builds.
Payload isolation and mixed-build hazards. Giving in-flight argument collection highest priority prevents binary argument values (e.g., an integer equal to 0x04, the ASCII end-of-test marker, or another string's VA) from triggering false control actions or address lookups while ; dynamic strings enforce a 64-word (256-byte) ceiling. In mixed legacy/tokenized builds, two idle-state () hazards exist: (1) an un-tokenized 32-bit word on the word-packed path could numerically collide with a .rodata VA (bounded by per-aperture dictionary isolation and distinct memory regions: zero-extended bytes 0x00-0xFF or packed ASCII 0x20202020-0x7E7E7E7E vs. .rodata in low ROM or high DRAM 0x80000000+), and (2) passing a non-literal runtime buffer printf(msg) sends a stack/heap pointer to Priority 3, where a byte equal to 0x04 can trigger early end-of-test. Placing format literals in a dedicated non-allocatable .log_strings ELF section (Section VIII) eliminates both hazards at compile time.
VI. IMPLEMENTATION
The host-side tokenization architecture comprises three modular components shared across all SoC processor subsystems:
-
Post-link ELF dictionary extractor: A standalone Python build hook (using standard ELF section tables [20] via pyelftools) parses each compiled firmware binary's .rodata section, extracts string literals with their link-time virtual addresses and ABI slot counts S, and emits string_dict.txt without compiler plugins or linker-script edits.
-
ISA-agnostic firmware C encoder: A compact C99 variadic routine (<stdarg.h>) containing zero inline assembly walks the format string's specifiers in a single pass ( ) and issues 32-bit volatile MMIO stores to the core's simulation tube aperture. Each subsystem provides a one-line header alias guarded by -DTOKENIZED_LOG.
-
SystemVerilog testbench decoder: A parameterized IEEE 1800 [21] SystemVerilog module instantiated per tube aperture (TOKENIZED_MODE) loads the sidecar dictionary into an associative array at simulation start, captures 32-bit MMIO writes, and emits formatted messages into the UVM log stream in zero simulated clock cycles ( ). Because all components use standard C99, ELF [20], and behavioral SystemVerilog [21], the design is portable to compiled-code simulators such as Verilator [17] and SystemC [13] environments.
VII. EMPIRICAL EVALUATION
A. Experimental methodology and statistical rigor
While the single-call logging reduction (63.5%–90.9% of on-core cycles, Table I) and critical-path savings ( print-weighted, 15.21 unweighted) can be reproduced on a single standalone testbench run, we evaluate host-side tokenized logging at scale across 858 matched full-chip RTL simulation test pairs (1,716 paired runs, comprising all paired tests that completed cleanly in both legs across 1,972 total regression runs) spanning two production verification suites on a complex multi-architecture, multi-core SoC:
-
Subsystem Suite A — High-Bandwidth I/O & Coherency Subsystem (N = 169 matched pairs, 338 runs): A paired A/B production regression of N = 169 matched full-chip address translation, cache coherency, interrupt delivery, and power-aware (UPF) verification tests. Each test executes twice under identical conditions (identical RTL database, simulator binary [a commercial event-driven SystemVerilog RTL simulator], random seed, and compute host class), differing solely in whether firmware tokenization (-DTOKENIZED_LOG) and the SystemVerilog host decoder are enabled.
-
Subsystem Suite B — Multi-Core Control & Boot Subsystem (N = 689 matched pairs, 1,378 runs): A paired A/B production regression of N = 689 matched full-chip multi-core boot, inter-processor communication (IPC), peripheral serial bus, and power-management tests exercising multiple heterogeneous 64-bit and 32-bit application, real-time, and embedded DSP cores spanning Arm, RISC-V, and VLIW/SIMD DSP instruction-set architectures.
Across the 858 matched pairs, baseline simulation consumed 5,022.35 simulator CPU hours and 6,166.43 wall-clock hours, whereas tokenized simulation consumed 3,707.50 CPU hours and 4,495.68 wall-clock hours—saving 1,314.85 CPU hours (-26.18%), 1,670.75 wall-clock hours (-27.09%), and 24.14 GB of cluster disk storage in a single regression pass. Because the suites execute in parallel across cluster hosts, these aggregate hours measure datacenter compute resource consumption rather than single-engineer wait time. To characterize right-skewed regression distributions ( 1–8 ms simulated time), we report: (1) Arithmetic Mean ( ) and Total Sum ( ) for aggregate datacenter compute and storage savings; (2) Median (P50) and Interquartile Range (IQR) for typical single-test turnaround; and (3) Geometric Mean (GMean) for normalized ratios (Tokenized/Baseline and speedup ).
B. 100% bit-exact output parity and simulator memory footprint
Across all 858 matched full-chip test pairs (169/169 in Subsystem Suite A and 689/689 in Subsystem Suite B), host-side tokenized logging achieved 100% character-for-character, line-for-line log parity against the unmodified baseline character streams, with all UVM scoreboards, bus monitors, and end-of-test adjudicators passing unmodified. To verify requirement R3 (strictly opt-in build parity), we compared compiled firmware artifacts across subsystems built with tokenization disabled: loadable binary images (test.bin, 11,040 and 5,536 bytes), disassembly listings (test.dis), linker maps (test.map), and all 13 loadable code, data, and DWARF frame sections in test.elf were 100% byte-for-byte SHA-256 identical between baseline and tokenized builds (differing only in the working-directory path string inside non-loadable.debug_str).
Monitoring simulator process memory (elaborated data-structure and runtime heap footprint reported by a commercial event-driven SystemVerilog RTL simulator at end of run) confirmed zero memory overhead from the SystemVerilog associative dictionary table. Across Subsystem Suite A (N = 169), where baseline and tokenized runs executed the exact same compiled simulator executable, normalized memory (Tokenized/Baseline) was across mean, median, and geometric mean (-0.002% median delta, largest single-test variation -0.01%). Across Subsystem Suite B (N = 689), normalized memory was mean (-1.02%) and median (-1.47%); trace audit confirmed this small reduction reflects static elaboration differences between the baseline snapshot and tokenized workspace build (-1.47% on the 58.3% standard-RTL subset and -0.39% on the 41.7% post-DFT/UPF subset, yielding the exact -1.02% weighted mean).
TABLE IV
PRODUCTION REGRESSION PERFORMANCE ACROSS SUBSYSTEM SUITE A () AND SUBSYSTEM SUITE B () (858 MATCHED FULL-CHIP TEST PAIRS, 1,716 RUNS)
| Metric / Dimension | Mean Δ | Base Med [IQR] | Tok Med [IQR] | Med Δ | GMean Ratio | Best Test | Suite Total |
|---|---|---|---|---|---|---|---|
| Panel A: Subsystem Suite A — High-Bandwidth I/O & Coherency Subsystem (N = 169 matched pairs, 338 runs) | |||||||
| Simulated Time (ms) | -30.08% | 2.876 [1.842] | 1.912 [1.255] | -33.32% | 0.690× | -78.44% (4.64×) | 180.52 ms (-31.51%) |
| Simulator CPU Time (h) | -36.72% | 5.56 [6.74] | 3.09 [4.69] | -41.51% | 0.586× | -83.15% (5.94×) | 564.53 h (-40.23%) |
| Wall-Clock Time (h)† | -29.93% | 6.76 [7.34] | 4.11 [5.51] | -32.89% | 0.662× | -78.33% (4.62×) | 557.10 h (-34.50%) |
| Total Run Dir Disk (MB)‡ | -23.65% | 439.25 [303.6] | 307.57 [228.5] | -25.63% | 0.757× | -70.39% (3.38×) | 22.24 GB (-23.95%) |
| Instruction Trace (MB) | -41.38% | 81.04 [70.64] | 41.05 [49.52] | -42.84% | 0.565× | -79.78% (4.94×) | 6.91 GB (-41.76%) |
| Bus Transaction Log (MB) | -36.98% | 32.99 [27.65] | 18.77 [21.00] | -38.17% | 0.613× | -83.85% (6.19×) | 2.51 GB (-37.55%) |
| Waveform Dump (MB) | -28.10% | 211.45 [99.64] | 136.57 [85.13] | -28.82% | 0.707× | -77.24% (4.39×) | 11.57 GB (-29.84%) |
| All Log Files (MB) | -18.16% | 128.46 [159.7] | 104.93 [113.5] | -18.93% | 0.812× | -59.86% (2.49×) | 6.55 GB (-17.31%) |
| Norm. Throughput (per wall-s) | +8.51% | 1.000× | 1.060× | +2.61% | 1.043× | +113.87% (2.14×) | — |
| Norm. Throughput (per CPU-s) | +24.02% | 1.000× | 1.166× | +15.05% | 1.177× | +147.63% (2.48×) | — |
| Norm. Simulator RAM | 0.00% | 1.000× | 1.000× | 0.00% | 1.000× | -0.01% (1.00×) | exact parity |
Panel B: Subsystem Suite B — Multi-Core Control & Boot Subsystem (N = 689 matched pairs, 1,378 runs)
| Simulated Time (ms) | -11.38% | 2.130 [1.730] | 1.793 [1.233] | -12.43% | 0.880× | -54.35% (2.19×) | 260.73 ms (-14.10%) |
|---|---|---|---|---|---|---|---|
| Simulator CPU Time (h) | -14.41% | 3.05 [3.93] | 2.47 [2.75] | -21.33% | 0.790× | -74.69% (3.95×) | 750.32 h (-20.73%) |
| Wall-Clock Time (h)† | -16.74% | 4.28 [4.85] | 3.18 [2.92] | -22.10% | 0.768× | -75.77% (4.13×) | 1,113.65 h (-24.47%) |
| Post-Cleanup Dir Disk (MB) | -1.49% | 41.34 [7.20] | 41.74 [8.18] | -0.29% | 0.983× | -28.67% (1.40×) | 1.90 GB (-0.91%) |
| Norm. Throughput (per wall-s) | +23.25% | 1.000× | 1.124× | +12.41% | 1.145× | +262.21% (3.62×) | — |
| Norm. Throughput (per CPU-s) | +19.60% | 1.000× | 1.109× | +10.85% | 1.113× | +211.96% (3.12×) | — |
| Norm. Simulator RAM | -1.02% | 1.000× | 0.985× | -1.47% | 0.990× | -1.48% (0.99×) | -1.02% mean |
Wall-clock times are measured on a shared production compute cluster and are therefore subject to contention from unrelated jobs; they are reported for operational context and should not be treated as controlled measurements. The indented artifact classes are not disjoint partitions of the run directory and do not sum to the run-directory total; they are reported individually because they are the classes verification engineers manage separately.
C. Production regression suite performance (N = 169 and N = 689)
Table IV summarizes performance across all N = 169 matched pairs in Subsystem Suite A and N = 689 matched pairs in Subsystem Suite B. Non-parametric two-sided Wilcoxon signed-rank tests and 10,000-resample 95% bootstrap confidence intervals confirm high statistical significance across every primary metric:
-
Subsystem Suite A (N = 169): Median paired reductions are -41.51% in CPU time (95% CI [-46.42%, -35.69%], z = -10.43, ), -32.89% in wall time (95% CI [-38.82%, -29.29%], z = -10.14, ), -33.32% in simulated time (95% CI [-35.01%, -31.58%], across all 168 non-zero pairs, z = -11.24, ), and -25.63% in run-directory disk (95% CI [-27.23%, -23.76%], z = -11.27, ).
-
Subsystem Suite B (N = 689): Median paired reductions are -21.33% in CPU time (95% CI [-24.30%, -18.69%], z = -14.32, ), -22.10% in wall time (95% CI [-26.80%, -21.11%], z = -15.95, ), and -12.43% in simulated time (95% CI [-13.16%, -11.08%], z = -18.08, ).
Three key empirical findings emerge across the two suites:
a) Aggregate cluster compute and turnaround-time savings: On Subsystem Suite A (N = 169), simulator CPU consumption drops from 1,403.31 to 838.78 CPU hours (-564.53 CPU hours, -40.23%) and wall-clock time drops by -557.10 hours (-34.50%); median single-test CPU time falls from 5.56 to 3.09 hours (-41.51%, 1.706× GMean speedup) and wall time falls from 6.76 to 4.11 hours (-32.89%, -2.65 hours per test). On Subsystem Suite B (N = 689), simulator CPU consumption drops from 3,619.04 to 2,868.72 CPU hours (-750.32 CPU hours, -20.73%) and wall-clock time drops by -1,113.65 hours (-24.47%), with median CPU and wall times falling by -21.33% and -22.10%. Combined (N = 858), a single pass saves 1,314.85 CPU hours and 1,670.75 wall-clock hours.
b) Host CPU time falls faster than simulated time: Simulated clock cycles drop by -33.32% (Subsystem Suite A) and -12.43% (Subsystem Suite B) at the median, whereas host CPU time drops by -41.51% and -21.33% (+8.19 and +8.90 percentage-point gaps). Normalized simulator throughput ( ) rises correspondingly: on Subsystem Suite A, +24.02% mean per CPU-s (1.177× GMean, +15.05% median, up to +147.63%) and +8.51% mean per wall-s (1.043× GMean, +2.61% median, up to +113.87%, tempered by the ≈ 1.25 hour fixed job setup and waveform/trace flush overhead per run); on Subsystem Suite B, +19.60% mean per CPU-s (1.113× GMean, +10.85% median, up to +211.96%) and +23.25% mean per wall-s (1.145× GMean, +12.41% median, up to +262.21%). As established in Section III, this reflects the removal of high-fanout fabric and trace-I/O cycles rather than an independent super-linear kernel speedup.
c) In-production ablation of formatting and per-character barriers versus word-packed transport: The difference between the two suites reflects their distinct legacy baselines (Equation (1)). Subsystem Suite A's primary controller formats messages on-core via vsprintf ( ) and issues one char-acter per bus write with a per-character data-synchronization barrier ( ), while application cores format on-core and issue byte-serial cross-fabric stores; tokenization eliminates on-core formatting, collapses writes, and replaces L barriers with one trailing barrier. Subsystem Suite B's primary controller performs no on-core integer formatting ( )—packing four format-string characters per 32-bit write alongside framing and raw argument words ( , , at 1 GHz)—so tokenization eliminates the byte-packing loop and reduces bus writes by ( and ) rather than ( and ). This predicts the exact ordering observed across the 858 pairs ( vs. median CPU time; vs. median simulated cycles), showing that even a subsystem without on-core integer formatting gains over 20% in median CPU and wall time purely from removing byte packing and collapsing MMIO writes.
D. Deep-dive production case studies
To illustrate performance across varying print densities, processor mixes, and simulation modes (standard RTL, low-power UPF, and full waveform dumping), Table V details nine representative production workloads spanning both suites (Workload A1: Address Fault Handling (433p) through Workload A6: Firmware Boot + Full Waveform (49p) in Subsystem Suite A, multi-core boot/crypto workloads Workload B1: Low-Power Boot Access (312p)—Workload B2: Peripheral Serial Stress (148p) in Subsystem Suite B, and peripheral-controller workload Workload B3: Peripheral UART Mux (84p) in Subsystem Suite B).
Three architectural insights stand out from Table V and Figure 3:
• Up to single-test speedup on diagnostic-dense tests. On Workload A1: Address Fault Handling (433p), tokenization reduces simulated device time by ( ) and simulator CPU time from 15.83 to 2.67 hours ( , , saving 13.16 CPU hours on one test); wall-clock runtime falls from 17.34 to 3.76 hours. On Workload B1: Low-Power Boot Access (312p) in Subsystem Suite B, CPU time drops from 11.25 to 2.85 hours ( , ).
- Direct reconciliation of multi-core ( ) and peripheral-dominated ( ) savings. Across Workload A1: Address Fault Handling (433p)—Workload B2: Peripheral Serial Stress (148p) (Figure 3), where cross-fabric application-core prints sit on the critical path, clusters tightly between 13.17 and 18.44 (15.21 unweighted, 15.06 print-weighted; 15.27 / 15.08 across Subsystem Suite A Workload A1: Address Fault Handling (433p)—Workload A6: Firmware Boot + Full Waveform (49p), within of Table I's 13.85 trace measurement). Conversely, on Workload B3: Peripheral UART Mux (84p) (69% word-packed control-core prints), is 5.14 ( simulated time, CPU time), bridging the single-call word-packed model ( ) and

Workload Print Count (N, messages)
Fig. 3. Critical-path simulated time saved per print ( ) versus print count plotted at exact Table V coordinates across all nine instrumented full-chip workloads, compared against the single-call trace baselines from Table I. Multi-core workloads (Workload A1: Address Fault Handling (433p)—Workload B2: Peripheral Serial Stress (148p), filled circles) cluster around the cross-fabric trace cost (13.17–18.44 s/print, unweighted mean 15.21 s, print-weighted mean 15.06 s), whereas peripheral-dominated Workload B3: Peripheral UART Mux (84p) (open square, 5.14 s/print) is consistent with its 69%/31% mix of word-packed ( 2.95 s) and cross-fabric boot prints ( 13.85 s), whose unweighted blended mean is 5.66–6.33 s, reduced to 5.14 s by concurrent bus overlap.
the suite-wide Subsystem Suite B median ( simulated time, CPU time).
- Large CPU savings in power-aware (UPF) simulation. On Workload A5: Low-Power UPF Retention (96p), run in Unified Power Format low-power mode where power-domain instrumentation raises per-cycle evaluation cost, the 13,170 logging cycles attributable to a single printf consume 441.5 server CPU seconds (7.36 CPU minutes). Tokenization saves 11.77 CPU hours ( ) on this single test.
E. Verification artifact and full-chip waveform compression
Because full-chip regressions execute hundreds of tests nightly, simulation disk footprint is a critical datacenter bottleneck. Table VI summarizes artifact compression across full regression runs (N = 169 and N = 689) and deep debug waveform dump runs.
As shown in Table VI, instruction retirement traces shrink by median across Subsystem Suite A ( , GMean, saving 6.91 GB across the suite and up to on Workload A1: Address Fault Handling (433p)), reflecting the elimination of retired libc formatting instructions. Regression waveform dumps shrink by median (11.57 GB saved across Subsystem Suite A), while deep full-chip debug waveforms shrink by 5.94 GB ( ) on Workload A6: Firmware Boot + Full Waveform (49p) ( GB) and 2.98 GB ( ) on Multi-Core Boot ( GB).
Comparing disk behavior across the two suites explains why Subsystem Suite A saves 22.24 GB ( ) whereas Subsystem Suite B post-cleanup directories change by 1.90 GB ( , GB, median 41.34 MB): Subsystem Suite A retains the binary trace subdirectory (waveforms, instruction traces, and bus trackers) for all 169 passing tests,
TABLE V
DEEP-DIVE PRODUCTION CASE STUDIES ACROSS SUBSYSTEM SUITE A (WORKLOADS A1–A6) AND SUBSYSTEM SUITE B (WORKLOADS B1–B3)
| Case Study / Workload | Prints | Simulated Device Time | Simulator CPU Time | Wall Δ | Derived per print* | |||||
|---|---|---|---|---|---|---|---|---|---|---|
| Base | Token | Δ | Base (h) | Token (h) | Δ | ΔCsim | ΔTCPU | |||
| Workload A1: Address Fault Handling (433p) | 433 | 8.26 ms | 1.78 ms | -78.4% | 15.83 | 2.67 | -83.2% | -78.3% | 14.96 μs | 109.4 s |
| Workload A2: Coherency Stress (106p) | 106 | 3.19 ms | 1.64 ms | -48.6% | 7.24 | 1.90 | -73.8% | -65.6% | 14.64 μs | 181.6 s |
| Workload A3: Concurrent Fabric Traffic (81p) | 81 | 3.23 ms | 1.73 ms | -46.3% | 7.57 | 2.04 | -73.1% | -63.6% | 18.44 μs | 246.1 s |
| Workload A4: Doorbell Interrupt Path (85p) | 85 | 2.52 ms | 1.24 ms | -50.9% | 4.14 | 1.24 | -70.0% | -54.6% | 15.06 μs | 122.9 s |
| Workload A5: Low-Power UPF Retention (96p) | 96 | 4.05 ms | 2.79 ms | -31.2% | 18.26 | 6.49 | -64.5% | -61.6% | 13.17 μs | 441.5 s |
| Workload A6: Firmware Boot + Full Waveform (49p) | 49 | 2.38 ms | 1.63 ms | -31.6% | 4.34 | 2.71 | -37.5% | -34.5% | 15.35 μs | 119.5 s |
| Workload B1: Low-Power Boot Access (312p) | 312 | 6.84 ms | 2.15 ms | -68.6% | 11.25 | 2.85 | -74.7% | -73.2% | 15.03 μs | 96.9 s |
| Workload B2: Peripheral Serial Stress (148p) | 148 | 4.19 ms | 1.97 ms | -53.0% | 2.83 | 1.27 | -55.0% | -75.8% | 15.00 μs | 37.8 s |
| Workload B3: Peripheral UART Mux (84p) | 84 | 2.06 ms | 1.62 ms | -21.0% | 3.04 | 1.23 | -59.5% | -53.4% | 5.14 μs | 77.4 s |
*Derived full-chip test ratios: and . In multi-core boot/concurrency workloads (Workload A1: Address Fault Handling (433p)-Workload B2: Peripheral Serial Stress (148p)), critical-path completion is gated by cross-fabric application-core prints (). In peripheral-dominated Subsystem Suite B workloads such as Workload B3: Peripheral UART Mux (84p) (84 total prints: 58 word-packed control-subsystem prints [69%] plus 26 application-core boot prints; adjacent UART/IPC tests span 3.64–5.41 ), is consistent with its 69% word-packed print mix (5.66–6.33 unweighted single-call mean, reduced to 5.14 [an effective 1.23 word-packed contribution] by partial overlap of concurrent control-core prints with off-core bus activity), explaining Subsystem Suite B's –12.43% median simulated-time and –21.33% median CPU-time reduction.
TABLE VI
VERIFICATION ARTIFACT & FULL-CHIP WAVEFORM DISK COMPRESSION (SUBSYSTEM SUITE A: N=169; BOTH SUITES: N=858)
| Scope | Artifact Class | Base → Tok | Saved |
|---|---|---|---|
| Suite A median | Instruction Trace | 81.0 → 41.1 MB | -42.8% |
| Suite A median | Bus Tracker Log | 33.0 → 18.8 MB | -38.2% |
| Suite A median | Regression Waveform | 211.5 → 136.6 MB | -28.8% |
| Suite A total | Suite Run Dirs | 92.9 → 70.6 GB | -24.0% |
| Both suites | Total Cluster Disk | 301.0 → 276.9 GB | -8.0% |
| Workload A1 | Instruction Trace | 264.2 → 53.4 MB | -79.8% |
| Workload A1 | Full Run Directory | 1015.5 → 300.7 MB | -70.4% |
| Workload A6 deep | Full-Chip Waveform | 15.85 → 9.90 GB | -37.5% |
| Boot, deep | Full-Chip Waveform | 13.91 → 10.93 GB | -21.5% |
whereas Subsystem Suite B post-pass cleanup deletes the binary trace subdirectory across all 689 passing tests, leaving only the simulation console log plus run metadata (610 standard tests [88.5%, < 100 MB] average 41.29 MB [24.60 GB], 7 intermediate tests [1.0%, 100–200 MB] total 1.64 GB [0.8%], and 72 uncore AXI burst stress tests [10.4%, > 200 MB] dump 8.5–19.0 GB of UVM AXI transaction logs into the console log, totaling 179.93 GB [87.3%]). Because host-side tokenization preserves human-readable text in the simulation console log (R1), post-cleanup text log volume is unchanged while cycle-proportional binary traces shrink by 28.8%–42.8%.
VIII. ARCHITECTURAL TRADE-OFFS AND DISCUSSION
A. Latent timing dependencies exposed by accelerating printf
A legacy -character message occupies the simulation tube aperture for ordered bus transactions (3.04–15.23 s in Table I). When firmware or testbench code is developed in the presence of that delay, unsynchronized multi-core sequences can inadvertently rely on printf as an implicit timing barrier—a latent defect that remains hidden until logging is accelerated or the firmware executes on emulation or silicon.
Hardware trace inspection during deployment illustrates how narrow such race margins can be. In one multi-core test, six processors perform an unsynchronized read-modify-write on a shared configuration register with a diagnostic print inside the read-to-write window. Under the baseline word-packed driver, the writing processor's 38-character, 1-argument print issued 15 ordered 32-bit MMIO writes ( at ns/tx), inserting 3,407 ns of delay into an s race window; a second processor sampled the register inside that window and read the stale value by a margin of just 261 ns (3%). Under tokenization (2 writes, ns), the register write lands 2.95 s earlier and immediately exposes the missing lock. Surfacing latent multi-core races before silicon bring-up is a direct verification benefit of removing artificial logging delays.
B. Position-independent code and dedicated .log_strings sections
For position-independent code (PIC) or dynamically relocated modules, the encoder can emit Token = VA_fmt - Base_module without call-site edits. While our default extractor scans .rodata so linker scripts require zero edits, placing format literals into a non-allocatable (NOLOAD/INFO). log_strings section inside the subsystem macro alias provides compile-time safety:
#define SUBSYS_PRINTF(fmt, ...) ({ static const char _f[]
attribute((section(".log_strings")) ) = (fmt);
tok_printf(f, ##VA_ARGS); })
Because C requires a static const char[] initializer to be a compile-time literal, non-literal buffers (printf(msg)) fail at compile time, eliminating both mixed-build hazards in Section V-D while stripping format strings from target ROM/SRAM. Similarly, deploying our 32-bit slot protocol over hardware emulator and FPGA trace transactors [16] removes formatting loops from emulated CPUs and cuts host-transactor bandwidth by .
C. Scope and methodological limitations
Three methodological boundaries frame our results: (1) Paired single-seed execution and cohort representativeness: each of the 858 matched test pairs (169/216 baseline-passing in Subsystem Suite A and 689/732 in Subsystem Suite B, drawn from 1,972 total regression runs) ran once per configuration with an identical random seed (n = 1 per seed). Distributional comparison confirms the evaluated cohort is conservative: across Subsystem Suite B, median baseline simulated time across all 732 baseline-passing runs is 2.151 ms vs. 2.130 ms on the 689 paired runs (< 1% delta), while in Subsystem Suite A the 47 Subsystem Suite A tests that pass in baseline but not under tokenization (environment timeouts and race-exposed tests, Section VIII-A) contain a higher share of long-running UPF low-power tests (53.2% [25/47] vs. 28.4% [48/169]; 11.47 h vs. 8.40 h mean baseline CPU time), which exhibit the largest per-print CPU savings (441.5 CPU-s/print, Workload A5: Low-Power UPF Retention (96p)). While Wilcoxon signed-rank tests ( ) and 95% bootstrap confidence intervals rule out random suite-level jitter, shared-cluster wall-clock times remain subject to host contention (e.g., Workload B2: Peripheral Serial Stress (148p) in Table V); (2) Trace vs. whole-test parameterization: single-call parameters ( ) are measured directly from processor instruction traces in Table I, whereas whole-test values in Table V divide test-level runtime savings by print count across nine instrumented workloads; and (3) Deployed baselines and generality: our evaluation compares against the three production logging drivers deployed on a complex multi-architecture, multi-core SoC (including Subsystem Suite B's host-formatted word-packed driver) rather than an in-SRAM ring buffer or a logging-disabled build, so absolute speedup magnitudes depend on a given SoC's interconnect latency and workload print density .
IX. CONCLUSION
Pre-silicon SoC verification pays a high simulation tax for formatted firmware logging: every 30-character, 1-argument printf consumes 3.04–15.23 s (19.60 s at 34 characters and 4 arguments; 15.27 s unweighted / 15.08 s print-weighted critical-path mean across Subsystem Suite A) in formatting instructions (61.7% on local tubes), barriers, and MMIO writes (84.7% on cross-fabric paths), costing 37.8–441.5 host CPU seconds per message. Using link-time ELF virtual addresses as tokens, an ISA-independent 32-bit MMIO slot protocol across Arm, RISC-V, and DSP cores, and a zero-simulation-time ( ) SystemVerilog decoder, our architecture removes on-core radix formatting ( ) and cuts single-call logging latency to —reducing on-core logging cycles by 63.5%–90.9% ( ), MMIO bus-stall cycles by 84.6%–93.3%, retired instructions by 69.6%–70.4%, and bus transactions by 85.0%–94.5% ( ) with zero call-site edits. Across 858 matched full-chip test pairs (1,716 paired runs across 1,972 total runs; N = 169 in Subsystem Suite A, N = 689 in Subsystem Suite B), it achieves 100% bit-exact output parity and 0.00% simulator RAM overhead, saves 1,314.85 CPU hours ( ) and 1,670.75 wall-clock hours ( ) per pass, reduces median single-test CPU time by 41.51% ( , up to ) on Subsystem Suite A and 21.33% ( ) on Subsystem Suite B, boosts mean effective simulator throughput by +24.02% / +19.60% per CPU-s (+8.51% / +23.25% per wall-s), and shrinks Subsystem Suite A compressed waveforms by 28.82% median (2.98–5.94 GB saved per deep debug test).
REFERENCES
[1] Pigweed Authors, “pw_tokenizer: Compress strings to shrink logs by 12×,” https://pigweed.dev/pw_tokenizer/, accessed 2026-09-16.
[2] S. Yang, S. J. Park, and J. Ousterhout, “NanoLog: A nanosecond scale logging system,” in USENIX Annual Technical Conference (ATC), 2018.
[3] Zephyr Project, “Dictionary-based logging,” https://docs.zephyrproject.org/latest/services/logging/, accessed 2026-09-16.
[4] T. Höhendinger, “TRICE: Super fast embedded real-time trace and logging,” https://github.com/rokath/trice, accessed 2026-09-16.
[5] Knurling-rs / Ferrous Systems, “defmt: A highly efficient logging framework for resource-constrained devices,” https://defmt.ferrous-systems.com/, accessed 2026-09-16.
[6] G. M. Amdahl, “Validity of the single processor approach to achieving large scale computing capabilities,” in AFIPS Spring Joint Computer Conference, 1967.
[7] Memfault, “Compact logs,” https://docs.memfault.com/, accessed 2026-09-16.
[8] B. M. Cantrill, M. W. Shapiro, and A. H. Leventhal, “Dynamic instrumentation of production systems,” in USENIX Annual Technical Conference (ATC), 2004.
[9] M. Desnoyers and M. R. Dagenais, “The LTTng tracer: A low impact performance and behavior monitor for GNU/Linux,” in Ottawa Linux Symposium (OLS), 2006.
[10] W. Xu, L. Huang, A. Fox, D. Patterson, and M. I. Jordan, “Detecting large-scale system problems by mining console logs,” in ACM Symposium on Operating Systems Principles (SOSP), 2009.
[11] Accellera Systems Initiative, “Universal verification methodology (UVM) 1.2 user’s guide,” https://www.accellera.org/downloads/standards/uvm, 2015.
[12] Arm Limited, “Semihosting for AArch32 and AArch64,” Arm Architecture Reference Manual Supplement, 2022.
[13] IEEE, “IEEE standard for standard SystemC language reference manual,” IEEE Std 1666-2023, 2023.
[14] MIPI Alliance, “MIPI system trace protocol (STP) specification,” MIPI Alliance Specification, v2.3, 2021.
[15] Arm Limited, “CoreSight system trace macrocell (STM) technical reference manual,” Arm Technical Reference Manual, 2018.
[16] S. Karandikar, H. Mao, D. Kim, D. Biancolin, A. Amid, D. Lee, N. Pemberton, E. Amaro, C. Schmidt, A. Chopra, Q. Huang, K. Kovacs, B. Nikolic, R. Katz, J. Bachrach, and K. Asanović, “FireSim: FPGA-accelerated cycle-exact scale-out system simulation in the public cloud,” in ACM/IEEE International Symposium on Computer Architecture (ISCA), 2018.
[17] W. Snyder, “Verilator: Fast, free, but for me?” in Design and Verification Conference (DVCon), 2010.
[18] S. Beamer and D. Donofrio, “Efficiently exploiting low activity factors to accelerate RTL simulation,” in ACM/IEEE Design Automation Conference (DAC), 2020.
[19] H. Wang and S. Beamer, “RepCut: Superlinear parallel RTL simulation with replication-aided partitioning,” in ACM International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS), 2023.
[20] Tool Interface Standard Committee, “Executable and linking format (ELF) specification, version 1.2,” 1995.
[21] IEEE, “IEEE standard for SystemVerilog—unified hardware design, specification, and verification language,” IEEE Std 1800-2023, 2023.