Verification foundations

Co-simulation & Emulation

Co-simulation and emulation connect hardware with software models and accelerate system-level verification beyond traditional RTL simulation.

Co-simulation (Hardware-Software Verification)

Co-simulation runs hardware (RTL design) and software (actual code/firmware) together to verify their interaction before silicon.

Key Concept:
  • Hardware (RTL) simulated in simulator
  • Software (C/C++) runs in same environment
  • Real software communicates with simulated hardware
  • Catch hardware-software interface bugs early
Benefits:
  • Test with real software code
  • Find SoC-level issues before post-silicon
  • Parallelization: HW and SW teams can work together
  • More realistic test scenarios

Co-simulation Approaches

1. Simulation-based Co-simulation
  • Both HW (RTL) and SW run in simulator
  • Simulator provides platform APIs
  • Slowest but most detailed visibility
  • Tools: Mentor Questa, Cadence iUS
2. Virtual Prototype
  • Hardware modeled at behavioral/TLM level (not RTL)
  • Software runs on virtual platform
  • Much faster than RTL simulation
  • Good for early software development
  • Tools: QEMU, SystemC, Virtual Prototyping platforms
3. Hardware Emulation
  • RTL compiled to FPGA or specialized hardware
  • Real software runs on emulation platform
  • Much faster than simulation
  • Close to real hardware speeds
  • Tools: Synopsys HAPS, Mentor Veloce

Hardware Emulation

Emulation maps RTL design onto specialized hardware (usually FPGAs) to achieve 100-1000x faster execution than RTL simulation.

How It Works:
  1. RTL code compiled and mapped to FPGA logic
  2. Design runs at FPGA speeds (MHz-GHz range)
  3. Real software can communicate with emulated hardware
  4. Can run for extended periods (hours, days)
Advantages:
  • Speed: 100-1000x faster than simulation
  • Scale: Can run realistic workloads
  • Visibility: Good signal observability
  • Debug: Can capture waveforms and stop/step
Disadvantages:
  • Cost: Expensive hardware ($1-10M+)
  • Latency: Still slower than real silicon (~100x)
  • Scalability: Limited to available FPGA resources

When to Use Co-simulation & Emulation

Co-simulation Best For:
  • SoC (System-on-Chip) verification
  • Early software development and porting
  • Hardware-software interface testing
  • Detailed debugging and analysis
Emulation Best For:
  • System-level performance testing
  • Long-running workloads (boot, stress)
  • Real software execution (OS, drivers)
  • Extended testing campaigns
  • Parallel test execution

Verification Platform Hierarchy

Platform Speed Visibility Cost Scalability
RTL Simulation 1x (baseline) Excellent Low Limited by simulation
Co-simulation 10-50x Very Good Medium Good
Virtual Prototype 100-1000x Good Low-Medium Very Good
Emulation 100-1000x Good Very High Good
Real Silicon 1000000x Limited Very High N/A
Co-simulation & Emulation Best Practices
  • Use appropriate platform: Choose based on verification needs
  • Start with simulation: Verify basics before emulation
  • Plan infrastructure: Co-sim/emulation requires setup
  • Automate test execution: Maximize platform utilization
  • Parallelize: Use multiple instances for different test scenarios
  • Archive results: Keep detailed logs of long-running tests