# 基于FPGA的CPU原型验证与仿真平台

基于FPGA的CPU原型验证与仿真平台是由现场可编程门阵列（FPGA）构建的硬件系统，寄存器传输级（RTL）处理器设计在硅片问世之前便在其上编译并执行，使固件、操作系统和验证工作负载能以硬件速度而非软件仿真速度运行。它们占据软件模拟器（指令集模拟器、gem5、RTL事件仿真器）与最终ASIC之间的硅前阶段，其动机在于：设计验证需求随设计规模呈指数增长，并在设计周期中占据越来越大的比重。

| 关键事实 | 数值 |
|---|---|
| FPGA原型速度（复杂SoC） | 商用原型平台上为20-50 MHz，接口IP可达500 MHz <sup>[1](https://www.synopsys.com/content/dam/synopsys/verification/datasheets/haps-ds.pdf)</sup> |
| 相对软件RTL仿真的加速比 | 1,000-10,000倍；一万亿周期从约3年降至8.7天 <sup>[2](https://eprints.whiterose.ac.uk/id/eprint/244135/1/2085_Camera_Ready_Paper.pdf)</sup><sup> • </sup><sup>[3](https://ar5iv.labs.arxiv.org/html/2401.17984)</sup> |
| 大设计容量 | 96块AMD/Xilinx Alveo U55c板可仿真高达约7.3亿ASIC单元的RISC-V设计 <sup>[3](https://ar5iv.labs.arxiv.org/html/2401.17984)</sup> |
| 商用仿真器编译时间 | 多FPGA划分、布局和布线需数天至数周 <sup>[4](https://people.csail.mit.edu/sanchez/papers/2023.ash.micro.pdf)</sup> |
| 小型软核占用 | PicoRV32：在7系列FPGA上以250-450 MHz运行，占用750-2,000个LUT <sup>[5](https://github.com/BUPT-Y/picorv32)</sup> |
| FPGA上的调试可见性 | 通常可追踪不到0.01%的内部信号，且仅限短时间窗口 <sup>[2](https://eprints.whiterose.ac.uk/id/eprint/244135/1/2085_Camera_Ready_Paper.pdf)</sup> |
| FPGA选型余量 | 至少比初始设计估算多30-40%的资源 <sup>[6](https://www.design-reuse.com/article/58828-fpga-prototyping-of-complex-socs-rtl-code-migration-and-debug-strategies/)</sup> |

## FPGA CPU仿真的实际工作方式

RTL设计经综合、布局和布线映射到FPGA可编程逻辑阵列上，生成比特流，其中处理器逻辑以硬件并行方式执行，而非作为软件仿真器处理的事件。为将仿真芯片与其环境连接，平台采用主机-目标解耦：设计的内部时钟与FPGA时钟及主机通信分离，因此100 MHz的模拟时钟可以以不同的物理速率跳动。例如，FireSim自动将[Rocket Chip](https://www.edgepedia.org/zh/rocket-chip)和BOOM等开放设计转换为AWS EC2 F1上快速（数十至数百MHz）、确定性的基于FPGA的仿真器，并用时序精确的I/O模型补偿时钟差异 <sup>[7](https://alonamid.github.io/papers/carrv2019-firesim_agile.pdf)</sup>。MIDAS仿真器采用同样的思路，在FPGA上承载L2缓存和DRAM的抽象时序模型，而实际数据存放在别处；BOOM-2w随后在SPEC2006int上平均达到18 MIPS <sup>[8](https://carrv.github.io/2017/papers/kim-midas-carrv2017.pdf)</sup>。

大于单块FPGA的设计会被自动切分。Synopsys ProtoCompiler使用时序驱动综合来寻找FPGA间的最优划分和最佳线缆连接 <sup>[1](https://www.synopsys.com/content/dam/synopsys/verification/datasheets/haps-ds.pdf)</sup>。行业指南将划分视为一项兼顾软件考量的架构活动，而不仅仅是对超出单器件容量设计的补救 <sup>[9](https://semiwiki.com/prototyping/s2c-eda/370147-fpga-prototyping-that-creates-useful-presilicon-evidence/)</sup>。在定制多FPGA板上，IO翻转测试以全速在FPGA之间传输脉冲，以检查短路、断路，并验证FPGA间时序 <sup>[6](https://www.design-reuse.com/article/58828-fpga-prototyping-of-complex-socs-rtl-code-migration-and-debug-strategies/)</sup>。

调试探针是有代价的：每个内部调试探针都需要另一根内部互连线，这会侵蚀设计容量和运行时速度 <sup>[10](https://semiwiki.com/prototyping/s2c-eda/320852-ask-not-how-fpga-prototyping-differs-from-emulation-ask-how-fpga-prototyping-and-emulation-can-benefit-you/)</sup>。用片上[逻辑分析仪](https://www.edgepedia.org/zh/logic-analyzer)探测逻辑会消耗块RAM、逻辑和布线资源，并可能破坏时序收敛（即确认所有电路满足所需速度约束）<sup>[2](https://eprints.whiterose.ac.uk/id/eprint/244135/1/2085_Camera_Ready_Paper.pdf)</sup>。

## FPGA仿真与模拟器及商用仿真器的比较

与软件仿真相比，差距是数量级的。IBM的一项研究发现，通过传统RTL软件仿真在乱序超标量处理器上启动Linux需要近五年，而FPGA原型验证的执行速度快1,000-10,000倍 <sup>[2](https://eprints.whiterose.ac.uk/id/eprint/244135/1/2085_Camera_Ready_Paper.pdf)</sup>。RAMP Gold是一个在单块Xilinx Virtex-5板上运行的周期精确全系统仿真器，在价值750美元的XUP板上以接近50 MIPS的速度仿真能够启动真实操作系统的64核共享内存机器，在启用详细时序模型时，在PARSEC上平均比Simics+GEMS快263倍 <sup>[11](http://people.eecs.berkeley.edu/~krste/papers/rampgold-dac2010.pdf)</sup>。

比较并非一边倒地有利，因为胜者取决于运行长度。在SASH研究中，仿真十亿周期在软件中耗时1.1天，采用SASH协同设计方法耗时43分钟，而在双FPGA配置中耗时13.4小时；SASH相对FPGA的加速比在一百万周期时达到332倍，但在一万亿周期时降至0.3倍 <sup>[4](https://people.csail.mit.edu/sanchez/papers/2023.ash.micro.pdf)</sup>。因此，较早的文献与SASH数据在极长周期数下哪种方法胜出这一问题上存在分歧。

商用仿真器占据阶梯上的另一个位置。硬件仿真器是唯一能在MHz速度下运行十亿门级设计的平台；Cadence [Palladium](https://www.edgepedia.org/zh/palladium)使用大规模布尔处理器阵列，Siemens Veloce Strato使用类似的专用硬件 <sup>[4](https://people.csail.mit.edu/sanchez/papers/2023.ash.micro.pdf)</sup>。现代商用仿真器支持十亿门等效及以上的容量，通过自动化可在数周内完成启动调试，并支持事务级加速、在线仿真和QEMU模式 <sup>[10](https://semiwiki.com/prototyping/s2c-eda/320852-ask-not-how-fpga-prototyping-differs-from-emulation-ask-how-fpga-prototyping-and-emulation-can-benefit-you/)</sup>。[FPGA原型验证](https://www.edgepedia.org/zh/fpga-prototyping)的运行时速度高于仿真，适合长时间的软件调试会话，而仿真提供更接近模拟的调试可见性和更高的部署自动化程度 <sup>[10](https://semiwiki.com/prototyping/s2c-eda/320852-ask-not-how-fpga-prototyping-differs-from-emulation-ask-how-fpga-prototyping-and-emulation-can-benefit-you/)</sup>。它们的基于FPGA的仿真器（Cadence Protium、Synopsys ZeBu）编译需数天至数周，因为在多块FPGA上进行划分、布局和布线非常复杂 <sup>[4](https://people.csail.mit.edu/sanchez/papers/2023.ash.micro.pdf)</sup>。平台选择是在成本、启动时间、编译/综合时间、设计容量、执行速度和系统内可用性之间的权衡 <sup>[12](https://dl.acm.org/doi/10.1145/3339985.3358487)</sup>。抽象层次研究通过TLM、ISS、RTL和FPGA层次逐步细化同一RISC-V模型，以量化这些速度/精度权衡 <sup>[13](https://doi.org/10.1109/fdl68117.2025.11165408)</sup>。

## 保真度与局限

决定性的局限是时钟差距。HAPS级原型验证为复杂SoC提供20-50 MHz，接口IP可达500 MHz <sup>[1](https://www.synopsys.com/content/dam/synopsys/verification/datasheets/haps-ds.pdf)</sup>，而ASIC目标为吉赫兹级。FALCON是一个面向领域特定SoC的仿真平台，在大型VCU128和VU19P FPGA上仅在32 MHz主时钟下实现时序收敛 <sup>[14](https://blaauw.engin.umich.edu/wp-content/uploads/sites/342/2024/02/FALCON_-An-FPGA-Emulation-Platform-for-Domain-Specific-SoCs-DSSoCs.pdf)</sup>。FireSim作者量化了其后果：在100 MHz FPGA上直接原型验证一个具有100 ns平均DRAM延迟的1 GHz SoC，会使内存访问看起来比流片后的系统快10倍，这最好情况下会扭曲性能测量，最坏情况下会掩盖时序缺陷 <sup>[7](https://alonamid.github.io/papers/carrv2019-firesim_agile.pdf)</sup>。对缺失组件使用时序精确模型是标准的补偿手段。

全系统仿真在系统层面也不是周期精确的：AMD的文档指出，延迟、带宽和争用行为可能与硬件不同，并且需要具有真实时钟的真实硬件来验证时序收敛、I/O余量以及功耗和热行为 <sup>[15](https://docs.amd.com/r/en-US/ug1701-vitis-accelerated-embedded/Building-the-System-in-HW-Emulation)</sup>。

调试可见性相对于[周期精确仿真](https://www.edgepedia.org/zh/cycle-accurate-simulation)急剧下降。Vivado ILA等FPGA可编程逻辑阵列内的调试器仅能在少量周期（例如数千个周期）内为少量信号提供波形 <sup>[7](https://alonamid.github.io/papers/carrv2019-firesim_agile.pdf)</sup>，通常不到内部信号总数的0.01% <sup>[2](https://eprints.whiterose.ac.uk/id/eprint/244135/1/2085_Camera_Ready_Paper.pdf)</sup>。基于重放的框架试图弥补：Prelude快照重放系统在BOOM和Rocket上评估，在BOOM上相对DESSERT/ENCORE达到32.88倍/2191.2倍加速，在Rocket上达到18.09倍/896.4倍加速，同时通过重放提供接近全信号的可见性 <sup>[2](https://eprints.whiterose.ac.uk/id/eprint/244135/1/2085_Camera_Ready_Paper.pdf)</sup>。

## 数据一览

- 由96块AMD/Xilinx Alveo U55c FPGA组成的集群（12个节点，每节点8块）可仿真高达约7.3亿ASIC单元的RISC-V设计 <sup>[3](https://ar5iv.labs.arxiv.org/html/2401.17984)</sup>。
- 一万亿周期的仿真从估计的3年（1,095天）降至FPGA上的8.7天 <sup>[3](https://ar5iv.labs.arxiv.org/html/2401.17984)</sup>。
- 在16x2网格中的32块FPGA上运行HPC Challenge，将执行时间从8小时（单块FPGA）缩短至1小时，提升8倍 <sup>[3](https://ar5iv.labs.arxiv.org/html/2401.17984)</sup>。
- 资源预算相差数个数量级：TordBoyau RISC-V核在不带分支预测时使用909个LUT，带gshare加RAS时使用1,388个LUT，性能为0.928-1.153 CoreMarks/MHz，频率100-125 MHz <sup>[16](https://github.com/BrunoLevy/TordBoyau)</sup>；[PicoRV32](https://www.edgepedia.org/zh/picorv32)占用750-2,000个LUT，在7系列FPGA上达到250-450 MHz <sup>[5](https://github.com/BUPT-Y/picorv32)</sup>；在Basys3板上由HLS生成的RV32I SoC使用1,078个LUT（5.18%）、326个触发器和3%的BRAM，频率100 MHz，估计功耗81 mW <sup>[17](https://www.mdpi.com/2673-4591/58/1/72)</sup>。
- 在资源占用较高的一端，一个带16 KB L1的Rocket核已占用高达61.54%的ZedBoard可编程逻辑；双核Rocket仅能装入ZC706，仿真板范围从Zybo（17.6K LUT）到ZC706（218.6K LUT）<sup>[18](https://michaeltaylor.org/papers/MICRO17_workshop_carrv_rviov_vega.pdf)</sup>。

## 使用者与用途

其独特价值在于在硅片问世之前运行真实软件。Makinote平台的开源FPGA Shell自动将用户设计连接到标准接口（PCIe Gen4、DDR4/HBM、10g/100g以太网、Aurora），并允许完整的Linux发行版在仿真芯片上运行，同时在其上测试并行应用 <sup>[3](https://ar5iv.labs.arxiv.org/html/2401.17984)</sup>。FALCON基于AMBA的加速器沙箱支持加速器的即插即用式添加、移除和修改，用于功能验证、驱动和固件开发以及假设分析，可在数周内完成，而不必等待最终芯片 <sup>[14](https://blaauw.engin.umich.edu/wp-content/uploads/sites/342/2024/02/FALCON_-An-FPGA-Emulation-Platform-for-Domain-Specific-SoCs-DSSoCs.pdf)</sup>。

学术团队和商业团队对该技术的使用方式不同。商用仿真平台（Synopsys HAPS、Cadence Palladium、Siemens Veloce）提供完整的硬件和软件解决方案，但不易用于研究，而开源平台缺乏完整解决方案且功能有限；这一差距推动了COTS-FPGA研究集群的出现 <sup>[3](https://ar5iv.labs.arxiv.org/html/2401.17984)</sup>。学术RISC-V原型验证通常针对[Zynq](https://www.edgepedia.org/zh/zynq)-7000、ZCU102、KC705和VCU118等中高端FPGA，低成本Artix-7作为替代层级，尽管开放生成器框架需要专门的HDL知识 <sup>[19](https://link.springer.com/article/10.1007/s44163-026-02003-7)</sup>。

## 近期进展

有三项进展值得注意。第一，多FPGA研究集群已增长至数十块板，如2024年描述的96板Alveo集群 <sup>[3](https://ar5iv.labs.arxiv.org/html/2401.17984)</sup>。第二，FPGA加速正扩展到混合设计：2025年在Zynq 7000上结合硬IP处理器和软IP核的框架在qsort上达到最高5.31 MIPS，比开源[Verilator](https://www.edgepedia.org/zh/verilator)快20-35倍，比基于CPU的仿真快150-177倍 <sup>[20](https://arxiv.org/pdf/2504.05284)</sup>。第三，AI加速器原型验证需求正在重塑使用模式：Architect Labs Redwood加速器在两周内完成设计、验证和部署，其定制仿真环境在数百个并发AI代理之间多路复用FPGA访问，将优化运行时间从15小时缩短至约15-30分钟 <sup>[21](https://architectlabs.com/blog/redwood)</sup>。开放工具链也在同步成熟，包括基于开源仿真器的FPGA加速ISS流程 <sup>[20](https://arxiv.org/pdf/2504.05284)</sup> 和RISC-V SoC的开放生成器框架 <sup>[19](https://link.springer.com/article/10.1007/s44163-026-02003-7)</sup>。

## References

1. Synopsys HAPS Datasheet, https://www.synopsys.com/content/dam/synopsys/verification/datasheets/haps-ds.pdf
2. Prelude: Priming-Guided State Reconstruction for Efficient FPGA Processor Debugging, https://eprints.whiterose.ac.uk/id/eprint/244135/1/2085_Camera_Ready_Paper.pdf
3. Makinote: An FPGA-Based HW/SW Platform for Pre-Silicon Emulation of RISC-V Designs (RAPIDO 2024, BSC-CNS), https://ar5iv.labs.arxiv.org/html/2401.17984
4. Accelerating RTL Simulation with Hardware-Software Co-Design (SASH, MICRO 2023), https://people.csail.mit.edu/sanchez/papers/2023.ash.micro.pdf
5. PicoRV32, https://github.com/BUPT-Y/picorv32
6. FPGA Prototyping of Complex SoCs: RTL code migration and debug strategies, https://www.design-reuse.com/article/58828-fpga-prototyping-of-complex-socs-rtl-code-migration-and-debug-strategies/
7. Using FireSim to Enable Agile End-to-End RISC-V Computer Architecture Research (CARRV 2019), https://alonamid.github.io/papers/carrv2019-firesim_agile.pdf
8. Evaluation of RISC-V RTL with FPGA-Accelerated Simulation (MIDAS), https://carrv.github.io/2017/papers/kim-midas-carrv2017.pdf
9. Technical Paper: FPGA Prototyping That Creates Useful Pre-Silicon Evidence (SemiWiki), https://semiwiki.com/prototyping/s2c-eda/370147-fpga-prototyping-that-creates-useful-presilicon-evidence/
10. Ask Not How FPGA Prototyping Differs From Emulation (SemiWiki), https://semiwiki.com/prototyping/s2c-eda/320852-ask-not-how-fpga-prototyping-differs-from-emulation-ask-how-fpga-prototyping-and-emulation-can-benefit-you/
11. RAMP Gold: An FPGA-based Architecture Simulator (DAC 2010), http://people.eecs.berkeley.edu/~krste/papers/rampgold-dac2010.pdf
12. Combining Simulation and FPGA Based Verification to an Affordable and Ultra-Fast Multi-Billion-Gate Verification System (RSP 2019), https://dl.acm.org/doi/10.1145/3339985.3358487
13. A Quantitative Guide to Navigate Speed/Accuracy Tradeoffs in System Level Design of RISC-V Processor Grids (FDL 2025), https://doi.org/10.1109/fdl68117.2025.11165408
14. FALCON: An FPGA Emulation Platform for Domain-Specific SoCs, https://blaauw.engin.umich.edu/wp-content/uploads/sites/342/2024/02/FALCON_-An-FPGA-Emulation-Platform-for-Domain-Specific-SoCs-DSSoCs.pdf
15. Building the System in HW Emulation (AMD UG1701), https://docs.amd.com/r/en-US/ug1701-vitis-accelerated-embedded/Building-the-System-in-HW-Emulation
16. TordBoyau RISC-V core, https://github.com/BrunoLevy/TordBoyau
17. A High-Level Synthesis Approach for a RISC-V RV32I-Based SoC and Its FPGA Implementation, https://www.mdpi.com/2673-4591/58/1/72
18. RV-IOV: Tethering RISC-V Processors via Scalable I/O Virtualization (CARRV 2017), https://michaeltaylor.org/papers/MICRO17_workshop_carrv_rviov_vega.pdf
19. FPGA validated RISC-V SoC with a custom systolic array accelerator for edge AI inference, https://link.springer.com/article/10.1007/s44163-026-02003-7
20. FPGA-accelerated simulation framework on Zynq 7000, https://arxiv.org/pdf/2504.05284
21. Introducing Redwood (Architect Labs), https://architectlabs.com/blog/redwood

---
*Initially written Sep 17, 2026 · Reviewed: Sep 30, 2026 · Edited: Sep 30, 2026; Oct 11, 2026; Oct 15, 2026 · Last review: Sep 30, 2026*

Topic: 技术与人造世界 › 计算技术与数字系统 › 计算机硬件 › Embedded & soft processors › Soft processors & open hardware › FPGA processor implementation & tooling

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/fpga-based-cpu-prototyping-and-emulation-platforms

English original: https://www.edgepedia.org/fpga-based-cpu-prototyping-and-emulation-platforms
