Skip to content
DenseChip
Learn
PracticeCode labInterview

DenseChip

Navigate

Menu

LearnPracticeCode labInterview

Tools

All toolsSV editorCode repoResume
DenseChip

Practice, courses, and chip-design tools in one focused workspace.

LearnPracticeCode labInterviewToolsLearning paths

© 2026 DenseChip

AboutRoadmapCareersInternshipsFAQContactPrivacyTerms
Skip to lesson

Course contents

  • How to Use This Course
  • The NanoSoC Tour
  • Reading Path
  • SoC Glossary10
  • SoC Metrics Reference
  • SoC Cheatsheet
  • What SoC Integration Is12
  • Architecture and Budgets21
  • Memory Maps and Address Decode26
  • Interconnect and Bus Fabrics26
  • Clock and Reset Architecture24
  • Power Architecture21
  • Interrupts, DMA and Peripherals15
  • Memories, Boot and Security21
  • IP Integration and Handoff21
  • Top-Level Verification and Bring-up21
    • SoC Verification Strategy
    • Integration and Connectivity Tests
    • Firmware Co-Simulation
    • Performance Verification
    • Gate-Level and Power-Aware Simulation
    • Emulation and FPGA Prototyping
      • When to Leave Simulation
      • What Changes in the Design for Prototyping
      • Speed, Visibility and Hybrid Runs
    • Bring-Up Readiness
  • Package, Pads and I/O18
  • Chip Signoff and Tapeout18
  • SoC Interview Prep16
  • Capstone: Integrate NanoSoC14
Loading lesson

←Emulation and FPGA Prototyping
  1. Topics
  2. SoC Design
  3. Top-Level Verification and Bring-up
  4. Emulation and FPGA Prototyping
  5. When to Leave Simulation
On this page

    Part 10 of 14, lesson 16 of 21Part 10 of 14/Top-Level Verification and Bring-up/Lesson 16 of 21All levels

    When to Leave Simulation

    The speed of each platform, the break-even workload, and which NanoSoC tests move.

    Why it matters

    Simulation shows everything and runs slowly; an emulator or a prototype shows little and runs fast, after a build that takes hours. Moving too early wastes the build and loses the visibility that diagnoses wiring bugs in minutes; moving too late means the long tests never run at all. Its one job is the decision: how to compute where a faster platform wins and which NanoSoC tests belong on it.

    The core idea

    Total time on a platform is build time plus workload divided by speed. A faster platform has a longer build and a higher speed, so it loses on short workloads and wins on long ones, and the crossover is a number of cycles you can compute. All speeds and build times below are illustrative teaching values, not figures for any product, and the cycle counts are NanoSoC clk_sys-equivalent cycles.

    Platform

    Speed (illustrative)

    Build or compile (illustrative)

    What you see

    RTL simulation

    5,000 cycles/s

    10 min

    Every signal, every cycle

    Emulator

    1,000,000 cycles/s

    4 h

    Most signals over a captured window; probes change without a rebuild

    FPGA prototype

    12,000,000 cycles/s (clk_sys scaled to 12 MHz)

    8 h

    Only the probes chosen before the build, in an on-chip buffer

    Silicon

    96,000,000 cycles/s

    A new chip

    Pins, registers, whatever debug logic was designed in

    Two NanoSoC workloads show both sides. One full boot is 1,207,768 cycles: simulation takes about 4 minutes after its compile, so no faster platform can beat it once its build is counted. A soak of 1,000,000 DMA jobs at an illustrative 216 cycles per job (seven writes, five reads and the 72-cycle job, about 2.25 us each) is 216 million cycles: 12 hours in simulation, while the run itself takes 3.6 minutes on the emulator and 18 seconds on the prototype. The build is paid once and amortised over every later run, so even one soak finishes sooner in total on the emulator (about 4.1 h) than in simulation (about 12.2 h). The script computes the crossovers and checks that the boot sits below both and the soak above both.

    example.py
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    # Break-even workload between simulation and a faster platform.
    # Speeds and build times are ILLUSTRATIVE; cycle counts follow the boot flow.
    SIM = {"speed": 5_000, "build_s": 600}
    EMU = {"speed": 1_000_000, "build_s": 4 * 3600}
    FPGA = {"speed": 12_000_000, "build_s": 8 * 3600}
    def total_s(p, cycles):
        return p["build_s"] + cycles / p["speed"]
    def break_even(fast):
        # build_s_fast + n/speed_fast == build_s_sim + n/speed_sim, solved for n
        return (fast["build_s"] - SIM["build_s"]) / (1 / SIM["speed"] - 1 / fast["speed"])
    BOOT = round(12580.917 * 96) # clk_sys-equivalent cycles in one full boot
    SOAK = 1_000_000 * 216 # a million DMA jobs at 216 cycles each (illustrative)
    be_emu, be_fpga = break_even(EMU), break_even(FPGA)
    print(f"break-even: emulator {be_emu / 1e6:.1f} M cycles, prototype {be_fpga / 1e6:.1f} M cycles")
    for name, work in (("boot", BOOT), ("soak", SOAK)):
        row = [f"{p}: {total_s(v, work) / 3600:.2f} h" for p, v in (("sim", SIM), ("emu", EMU), ("fpga", FPGA))]
        print(name, *row)
    assert BOOT == 1207768
    assert BOOT < be_emu < SOAK and BOOT < be_fpga < SOAK
    assert total_s(SIM, BOOT) < total_s(EMU, BOOT) < total_s(FPGA, BOOT) # the boot stays in simulation
    assert total_s(EMU, SOAK) < total_s(SIM, SOAK) # even with its build, the emulator wins the soak
    assert SOAK / EMU["speed"] < 300 and SOAK / FPGA["speed"] < 30 # the runs themselves take minutes and seconds
    # the check can fail: a build ten times longer pushes the emulator break-even beyond the soak
    slow_build = dict(EMU, build_s=40 * 3600)
    assert break_even(slow_build) > SOAK
    print("PASS: boot stays in simulation, a 216 M-cycle soak moves, a 40 h build would not pay")

    What the review looks for

    • Each test on the plan names its platform with the break-even arithmetic behind it, using speeds measured on this project once they exist.

    • Short, wiring-level tests stay in simulation: the sweeps, reset order, the first boot. Long and statistical tests move: soaks, long firmware, rare-event hunting, software bring-up.

    • The prototype is not the first place an integration bug is found: simulation passes the connectivity and boot tests before the platform build is started.

    Verify and debug

    Measure before believing: run the same 100,000-cycle slice on each platform and compute the real cycles per second, because speed depends on design size, probes and I/O bridges. If a prototype run fails and simulation passes the same slice, suspect the platform changes of the next lesson first (replaced clocks, memories, missing power domains) before suspecting the design. Bring any failure back to simulation as soon as a window shows the first wrong cycle.

    The prototype used as the first integration test: the DMA interrupt wired to input 6 (planted bug 3) shows up on a prototype as an interrupt service routine that never runs, with a few dozen probes and an eight-hour rebuild between hypotheses. The same bug fails the interrupt-wiring sweep in simulation in a fraction of a second, with every signal visible. Run the cheap tests first; move only what simulation cannot finish.

    If asked when to use an emulator, answer with the crossover: build time plus work over speed on each side, a long soak or a software-heavy test on the fast platform, wiring and reset tests in simulation. Offer a number, not an adjective.

    Check yourself A teammate wants the 1.2-million-cycle boot test on the emulator every night. Is it worth it?

    No, at these illustrative speeds: the boot takes about four minutes in simulation, while the emulator run takes about 1.2 s but only after a 4 h build, and its break-even is about 70 million cycles. It pays only if the build is amortised over far longer tests.

    Related topics

    • Next: What Changes in the Design for Prototyping

    • Verification First Principles: Choosing the Platform

    • Verification First Principles: Simulation Speed Limits

    • Hardware Debug: The Cost of a Bug by Stage

    Previous

    208 / 289

    Next: What Changes in the Design for Prototyping

    Up next

    Up nextWhat Changes in the Design for Prototyping

    Sign in to save progress

    Practice this lessonPrevious lessonReport an error

    See also

    • Speed, Visibility and Hybrid Runs