Part 10 · Advanced Topics · Intermediate
Simulation Performance and Memory
Hub - profile-driven UVM optimization: methodology, logging cost, object churn, hierarchy scale, and memory leak prevention.
Overview
Performance work should be evidence-driven. Most large UVM environments lose runtime in a few predictable places: excessive log formatting, avoidable object allocation, overly dense component hierarchy, and unbounded data structures. The fix is not a single trick but a measurement loop.
This topic turns performance tuning into repeatable engineering. You will profile first, prioritize hotspots, apply targeted changes, and validate both speed and correctness. Every lesson includes commands and code patterns you can put directly into regression infrastructure.
Lessons in this topic
Profiling Methodology - build a repeatable baseline and hotspot attribution loop.
Verbosity and Logging Cost - cut expensive logging overhead without losing debuggability.
Object Churn and Field Automation - reduce alloc/copy/print costs in transaction-heavy paths.
Hierarchy and Component Count - control structural overhead in large-scale benches.
Memory, Queues, and Leaks - prevent long-run memory growth and stale object retention.
Performance workflow map
[PERF] [UVM] optimization workflow
baseline run
|
v
profile capture (time + memory)
|
v
hotspot ranking (top N contributors)
|
v
targeted fix + A/B measurement
|
+--> speedup validated?
|
yes ------------------> keep change + add guardrail
|
no
|
v
rollback and inspect next hotspot
[REG] always compare on representative nightly tests, not micro toy only# Baseline command shape
simv +UVM_TESTNAME=axi_long_random \
+UVM_VERBOSITY=UVM_LOW \
-l out/logs/axi_long_random_baseline.logKey takeaways
Profile first, optimize second, re-measure always.
Logging and allocation behavior dominate many UVM performance issues.
Use representative regression tests for optimization decisions.
Treat performance guardrails as part of verification quality.
Common pitfalls
Optimizing code paths that are not hotspots.
Benchmarking with unrealistic tiny tests and overfitting changes.
Trading away observability without adding targeted debug controls.