# CV32E40P

**CV32E40P** 是由 OpenHW Group 维护的一款开源、4 级、顺序执行的 32 位 RISC-V 处理器核，实现 RV32IMFCXpulp 指令集，基于 PULP-Platform 项目的 RI5CY 核。<sup>[1](https://github.com/openhwfoundation/cv32e40p)</sup> 它是 OpenHW Group 旗下 CORE-V 系列 RISC-V 核的首个成员，定位为面向微控制器和计算密集型边缘应用的嵌入式级核。<sup>[2](https://docs.openhwfoundation.org/projects/core-v-mcu/doc-src/overview.html)</sup><sup> • </sup><sup>[3](https://github.com/openhwfoundation)</sup>

| 关键事实 | 详情 |
|---|---|
| 架构 | 4 级、顺序执行、32 位 RISC-V 核；指令集 RV32IMFCXpulp<sup>[1](https://github.com/openhwfoundation/cv32e40p)</sup> |
| 起源 | 源自 OR10N OpenRISC 核的分支，2016 年更名为 RI5CY 并转为 RISC-V 核，2020 年 2 月贡献给 OpenHW Group<sup>[4](https://cv32e40p.readthedocs.io/en/latest/intro.html)</sup> |
| 许可证 | Solderpad 硬件许可证 0.51 版；版权归 2020 年 OpenHW Group 及 2018 年苏黎世联邦理工学院和博洛尼亚大学<sup>[4](https://cv32e40p.readthedocs.io/en/latest/intro.html)</sup> |
| 面积 | 采用基于锁存器的寄存器堆时约 50 kGE；含 FPU 时约 90 kGE（FPU 30 kGE 加额外寄存器堆 10 kGE）<sup>[4](https://cv32e40p.readthedocs.io/en/latest/intro.html)</sup> |
| 自定义扩展 | 硬件循环、后增量加载与存储，以及标准 RISC-V ISA 之外的额外 ALU 指令、SIMD 指令和位操作指令<sup>[5](https://cv32e40p.readthedocs.io/en/latest/instruction_set_extensions.html)</sup> |
| 验证 | 2021 年初 v1.0.0 完成功能 RTL 冻结；2024 年 6 月底 v1.8.3（CV32E40Pv2）完成 RTL 冻结<sup>[6](https://github.com/openhwfoundation/cv32e40p/blob/master/docs/source/verification.rst)</sup> |
| 参考 SoC | CORE-V-MCU 展示了 CV32E40P v1.0.0，配备 512 KB 片上 SRAM 和 QuickLogic 嵌入式 FPGA<sup>[2](https://docs.openhwfoundation.org/projects/core-v-mcu/doc-src/overview.html)</sup> |

## 历史

CV32E40P 最初是 OR10N CPU 核的分支，后者使用 OpenRISC ISA。2016 年，它以 RI5CY 之名成为 RISC-V 核，由 PULP 平台团队维护——该团队是[苏黎世联邦理工学院](https://www.edgepedia.org/zh/eth-zurich)与[博洛尼亚大学](https://www.edgepedia.org/zh/university-of-bologna)的合作项目——直至 2020 年 2 月被贡献给 OpenHW Group。<sup>[4](https://cv32e40p.readthedocs.io/en/latest/intro.html)</sup> PULP 项目将该核描述为其主力 4 级设计，实现 RV32IMC，可选配支持 F 扩展的 32 位 FPU，以及面向 DSP 操作的指令集扩展。<sup>[7](https://pulp.ethz.ch/implementation.html)</sup>

贡献给 OpenHW 之后，该核经过重构以符合标准、采用新的存储器协议、支持 RV32F 扩展、重新映射 CSR 地址、处理中断，并遵循 PULP 硬件循环规范。<sup>[8](https://cv32e40p.readthedocs.io/en/latest/index.html)</sup><sup> • </sup><sup>[17](https://docs.openhwgroup.org/projects/cv32e40p-user-manual/en/cv32e40p_v1.8.0/intro.html)</sup>

## 架构

CV32E40P 是一款 4 级顺序流水线，包含取指、译码与寄存器堆读取、执行和写回四级。ALU、乘法器和除法器位于 EX 级；分支条件满足时，分支在该级完成跳转判定，EX 级同样包含加载-存储单元的地址生成硬件。加载结果从 WB 级写回。<sup>[9](https://cv32e40p.readthedocs.io/en/latest/pipeline.html)</sup>

假设指令接口和数据接口均无停顿时，主要指令类别的周期数为：<sup>[9](https://cv32e40p.readthedocs.io/en/latest/pipeline.html)</sup>

- 整数计算指令：1 周期。
- [乘法](https://www.edgepedia.org/zh/multiplication)：`mul` 为 1 周期；高位字结果 `mulh`、`mulhsu` 和 `mulhu` 为 5 周期，使用单周期 32 位 × 32 位乘法器产生 32 位结果。
- 除法与取余：3 至 35 周期，取决于除法器操作数，除数为 0 时达到最大值。
- 加载与存储：对齐访问 1 周期，非对齐字传输或跨越字边界的半字传输 2 周期，事件加载 `cv.elw` 为 4 周期。
- CSR 访问：大多数 CSR 为 1 周期，包括 `mstatus`、`mepc`、`mtvec` 和性能计数器在内的一组常用 CSR 为 4 周期。

该核完全可综合，主要面向 ASIC 设计，同时也支持 FPGA 综合。FPGA 综合需要使用基于触发器的寄存器堆，因为 FPGA 对锁存器支持不佳，且集成方必须提供工艺特定的时钟门控单元。<sup>[4](https://cv32e40p.readthedocs.io/en/latest/intro.html)</sup> FPU 流水线的最佳频率只有在实现工具中使用自动重定时命令才能达到。<sup>[10](https://github.com/openhwfoundation/cv32e40p/blob/master/docs/source/integration.rst)</sup>

## 指令集扩展

除标准 RV32IMC 基础及可选的 F 扩展外，CV32E40P 还实现 Xpulp 自定义扩展，通过将 `COREV_PULP` 设为 1 来启用。这些扩展包括：在工具链中以 `-march=rv32i*_xcvhwlp` 调用的硬件循环扩展、后增量加载与存储指令、额外 ALU 操作、SIMD 指令，以及 `cv.extract`、`cv.insert`、`cv.bclr`、`cv.bset` 和 `cv.bitrev` 等位操作指令。<sup>[5](https://cv32e40p.readthedocs.io/en/latest/instruction_set_extensions.html)</sup> 用于 PULP 集群的事件加载指令 `cv.elw` 是另一项独立扩展，由 `COREV_CLUSTER` 启用，并以 `-march=rv32i*_xcvelw` 调用。<sup>[5](https://cv32e40p.readthedocs.io/en/latest/instruction_set_extensions.html)</sup> 使用这些指令需要用 CORE-V GCC 或 Clang/LLVM 工具链编译。<sup>[5](https://cv32e40p.readthedocs.io/en/latest/instruction_set_extensions.html)</sup>

该核还提供辅助处理单元（APU）接口和可选浮点单元，并支持 Zfinx 配置，在该配置下浮点指令操作整数寄存器堆。<sup>[6](https://github.com/openhwfoundation/cv32e40p/blob/master/docs/source/verification.rst)</sup>

## 验证

验证环境位于独立的 core-v-verif 仓库中，相关工作始于 2020 年 2 月 27 日。2021 年初，该核以 v1.0.0 版本达到功能 RTL 冻结，意味着已按验证计划完成全面验证。从启动到冻结期间，共发现并解决 47 个 RTL 问题和 38 个用户手册问题；其中 RTL 问题有 18 个通过仿真发现，13 个通过审查发现，13 个通过形式验证发现，2 个通过静态代码检查发现，1 个来源不明，其中 40 个是功能缺陷。<sup>[6](https://github.com/openhwfoundation/cv32e40p/blob/master/docs/source/verification.rst)</sup>

第二轮验证活动产出了 CV32E40Pv2，以 v1.8.3 版本发布，RTL 于 2024 年 6 月底冻结。七种参数化配置——分别改变 PULP 扩展、FPU、Zfinx 和 FPU 流水线延迟——通过形式验证和仿真两种方法进行了验证，使用 ImperasDV 参考模型和 198 条断言。v2 工作还针对 RV32IMCF 扩展运行了 RISC-V 兼容性框架 RISCOF，并使用西门子 Questa Processor 工具进行 RISC-V ISA 形式验证，以验证所有指令，包括 Sail 中描述的 300 多条 XPULP 指令。<sup>[6](https://github.com/openhwfoundation/cv32e40p/blob/master/docs/source/verification.rst)</sup> v1.8.3 版本于 2024 年 7 月 15 日发布。<sup>[11](https://github.com/openhwgroup/cv32e40p/releases)</sup>

## 性能与比较

2021 年一项 CARRV 研究中，研究人员比较了密切相关的开源核 Ibex 与 CV32E40P，在基准 RV32IMC ISA 下测得 CV32E40P 的 CoreMark 净性能为 1406，而 Ibex 为 1390，尽管 Ibex 的占用面积小 40%，为 43 kGE 对 72 kGE。在放宽时序条件下，Ibex 达到 3.17 CoreMark/MHz，而 CV32E40P 为 3.11，但前提是使用循环展开等工具链选项，导致代码大小相比 -O3 膨胀 236%。CV32E40P 在不膨胀代码大小的情况下达到了相近性能，作者将其归因于 Xpulp 扩展中的硬件循环和后增量加载/存储指令。在 Embench 工作负载上，CV32E40P 的 IPC 平均快 11%，净性能比最高性能配置的 Ibex 快 28%。<sup>[12](https://carrv.github.io/2021/papers/CARRV2021_paper_8_Gallmann.pdf)</sup>

Xpulp 扩展带来面积代价：一份 PULP 演示量化了 XPULP 扩展的成本为从 25 kGE 增至 40 kGE，即 1.6 倍。<sup>[13](https://pulp.ethz.ch/docs/kgf_sabanci_nov22_compressed.pdf)</sup>

## 系统应用

CORE-V-MCU 是为展示 CV32E40P v1.0.0 而构建的参考 SoC。它将核与 512 KB 片上 SRAM、映射到核存储器空间的 QuickLogic 嵌入式 FPGA，以及一组外设搭配：2 个 UART、2 个 QSPI 主控、2 个 I2C 主控、1 个 SDIO、1 个摄像头并行接口、一个 32 路 I/O 的 GPIO 单元、一个 I2C 从机、一个 4 通道高级 PWM 定时器和 JTAG，另有一个微型 DMA 单元在外设与片上存储器之间搬运数据。物理实现面向 [GlobalFoundries](https://www.edgepedia.org/zh/globalfoundries) 22FDX ASIC 以及 Xilinx Artix-7 和 Kintex-7 FPGA 板卡。<sup>[2](https://docs.openhwfoundation.org/projects/core-v-mcu/doc-src/overview.html)</sup> 该核遵循 2019 年 12 月 13 日的 RISC-V 用户级 ISA、2019 年 6 月 8 日的特权架构（机器模式 ISA 版本 1.11），以及 RISC-V 外部调试支持草案 0.13.2。<sup>[2](https://docs.openhwfoundation.org/projects/core-v-mcu/doc-src/overview.html)</sup>

除参考 SoC 外，该核还出现在各类研究和学生项目中，从 FPGA 上的后量子密码加速器<sup>[14](https://doi.org/10.3390/electronics15102154)</sup>到自动化工作负载专用核定制——后者中，一个生成专用 CV32E40P 的工具链在 21 个基准测试上于 ASIC 上实现了 1.40× 的几何平均加速比。<sup>[15](https://ieeexplore.ieee.org/abstract/document/11611047)</sup>

## 后续产品

在 CORE-V 系列中，CV32E40P 位于 2 级嵌入式级 CV32E20 与 6 级应用级 CVA6 之间，被列为技术成熟度 5 级的已完成项目。<sup>[3](https://github.com/openhwfoundation)</sup> 其演进型号是 CV32E40X，一款面向计算密集型应用的 4 级核，支持 RV32IM[A]C[B][P]XZce_Zicount_Zicsr_Zifencei，带有通用加速器接口（eXtension 接口）、简化的流水线与控制器，以及更智能的预取单元；其设计与验证基于 CV32E40P。<sup>[16](https://github.com/openhwfoundation/programs/blob/master/Project-Descriptions-and-Plans/CV32E40X/CV32E40X-PPL.md)</sup>

## References

1. [openhwfoundation/cv32e40p repository README, GitHub](https://github.com/openhwfoundation/cv32e40p)
2. [CORE-V-MCU Overview, CORE-V MCU documentation, OpenHW Foundation](https://docs.openhwfoundation.org/projects/core-v-mcu/doc-src/overview.html)
3. [OpenHW Foundation GitHub organization project list](https://github.com/openhwfoundation)
4. [Introduction, CORE-V CV32E40P User Manual](https://cv32e40p.readthedocs.io/en/latest/intro.html)
5. [CORE-V Instruction Set Extensions, CORE-V CV32E40P User Manual](https://cv32e40p.readthedocs.io/en/latest/instruction_set_extensions.html)
6. [Verification, cv32e40p docs/source/verification.rst, GitHub](https://github.com/openhwfoundation/cv32e40p/blob/master/docs/source/verification.rst)
7. [PULP Implementation, PULP Platform, ETH Zurich](https://pulp.ethz.ch/implementation.html)
8. [OpenHW Group CV32E40P User Manual, contents and history](https://cv32e40p.readthedocs.io/en/latest/index.html)
9. [Pipeline Details, CORE-V CV32E40P User Manual](https://cv32e40p.readthedocs.io/en/latest/pipeline.html)
10. [Synthesis guidelines, cv32e40p docs/source/integration.rst, GitHub](https://github.com/openhwfoundation/cv32e40p/blob/master/docs/source/integration.rst)
11. [Releases, openhwgroup/cv32e40p, GitHub](https://github.com/openhwgroup/cv32e40p/releases)
12. [J. Gallmann et al. (2021). From Swift to Mighty: A Cost-Benefit Analysis of Ibex and CV32E40P Regarding Application Performance, Power and Area. CARRV 2021.](https://carrv.github.io/2021/papers/CARRV2021_paper_8_Gallmann.pdf)
13. [CV32E40P – aka RI5CY – RISC-V Core for edge AI, PULP presentation, ETH Zurich](https://pulp.ethz.ch/docs/kgf_sabanci_nov22_compressed.pdf)
14. [QUASAR: Achieving Quantum Readiness for Post-Quantum Cryptography on RISC-V at Minimum Hardware Cost, Electronics (2025)](https://doi.org/10.3390/electronics15102154)
15. [ARVIS: Automated RISC-V Workload-Specific Specialisation, IEEE Xplore](https://ieeexplore.ieee.org/abstract/document/11611047)
16. [CV32E40X Project Description and Plans, openhwfoundation/programs, GitHub](https://github.com/openhwfoundation/programs/blob/master/Project-Descriptions-and-Plans/CV32E40X/CV32E40X-PPL.md)
17. [docs.openhwgroup.org](https://docs.openhwgroup.org/projects/cv32e40p-user-manual/en/cv32e40p_v1.8.0/intro.html)

---
*Initially written Oct 15, 2026*

Topic: 技术与人造世界 › 计算技术与数字系统 › 计算机硬件 › 嵌入式与软处理器 › 软处理器与开放硬件 › RISC-V

Copyright 2026 Edgepedia

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

Source: https://www.edgepedia.org/zh/cv32e40p

English original: https://www.edgepedia.org/cv32e40p
