Stop Paying by the Letter: Accelerating Full-Chip RTL Simulation with Host-Side Tokenized Logging
AI Analysis Abstract Firmware diagnostic logging (printf) significantly burdens cycle-accurate RTL simulation, consuming 3.04 to 15.23 microseconds per call due to on-core formatting and memory-mapped I/O (MMIO) bus stalls. This paper introduces a host-side in-simulation…
AI Analysis
Abstract
Firmware diagnostic logging (printf) significantly burdens cycle-accurate RTL simulation, consuming 3.04 to 15.23 microseconds per call due to on-core formatting and memory-mapped I/O (MMIO) bus stalls. This paper introduces a host-side in-simulation tokenized logging architecture for heterogeneous multi-core SoCs that eliminates these bottlenecks without firmware call-site modifications. By using link-time ELF format-string virtual addresses as tokens over a fixed 32-bit word-aligned slot protocol, on-core logging is reduced to a single-pass specifier scan and (1+S) MMIO word writes. This approach removes on-core radix conversion, 85.0%-94.5% of bus transactions, 84.6%-93.3% of MMIO bus-stall cycles, and 63.5%-90.9% of total on-core logging cycles, while a SystemVerilog monitor reconstructs bit-exact strings in zero simulated cycles. Across 858 full-chip test pairs, the architecture achieved 100% output parity with zero simulator memory overhead, saving 1,314.85 simulator CPU hours per regression pass, reducing median single-test CPU time by 41.51% on Subsystem Suite A and 21.33% on Subsystem Suite B, and shrinking instruction traces by 42.84% and waveform dumps by 28.82%.
Key Highlights
- Eliminates on-core radix conversion and significantly reduces MMIO bus transactions and stalls.
- Achieves 100% bit-exact output parity with zero simulator memory overhead.
- Saves 1,314.85 simulator CPU hours and 1,670.75 wall-clock hours per regression pass across 858 full-chip test pairs.
- Reduces median single-test CPU time by 41.51% (Subsystem Suite A) and 21.33% (Subsystem Suite B).
- Boosts mean effective simulator throughput by +24.02% (Subsystem Suite A) and +19.60% (Subsystem Suite B) per CPU second.
- Shrinks instruction traces by 42.84% and waveform dumps by 28.82% (medians).
- Exposes latent multi-core firmware synchronization races previously masked by logging delays.
Technical Details
- The architecture uses link-time ELF format-string virtual addresses as token IDs.
- A fixed 32-bit word-aligned slot protocol is used for transmitting tokens and arguments, identical across Arm, RISC-V, and DSP cores.
- On-core logging collapses to a single-pass specifier scan and (1+S) MMIO word writes, removing radix conversion.
- A SystemVerilog monitor reconstructs bit-exact strings in zero simulated cycles (Δt_sim=0) using a build-time sidecar dictionary.
- The system is ISA-independent and requires zero firmware call-site edits, using a single header alias.
- Argument wire-slot encoding promotes narrow integers to 32-bit slots and serializes 64-bit values as two 32-bit words (low then high).
- Dynamic runtime strings are packed four characters per 32-bit word, terminated by a 0xFE sentinel.
- A post-link Python ELF dictionary extractor parses .rodata sections to create the sidecar dictionary.
- The SystemVerilog decoder uses a three-tier priority state machine for argument collection, token lookup, and legacy passthrough.
Implications
- Significant acceleration of full-chip RTL simulation, reducing overall verification time and resource consumption.
- Improved simulator throughput by reducing the evaluation cost of logging cycles.
- Reduced disk storage requirements for instruction traces, bus transaction logs, and waveform dumps.
- Exposure of latent multi-core firmware synchronization races due to the removal of artificial logging delays.
- The solution is portable across different CPU architectures (Arm, RISC-V, DSP) and compatible with standard toolchains.
- Maintains 100% live log visibility, crucial for UVM scoreboards and real-time pass/fail adjudication.
Limitations
- Evaluation relies on paired single-seed execution, with each test pair run once per configuration.
- Single-call parameters are measured from processor instruction traces, while whole-test savings are derived by dividing test-level runtime savings by print count.
- The evaluation compares against three specific production logging drivers, so absolute speedup magnitudes depend on the SoC's interconnect latency and workload print density.
- Shared-cluster wall-clock times are subject to host contention, affecting precise measurement of wall-clock savings.
- Some tests that passed in baseline but not under tokenization (due to environment timeouts and race-exposed tests) were excluded from the paired analysis.
Source: https://arxiv.org/abs/2610.27356