English · 架构 · 性能 · 验证 · ASIC · 限制 · Roadmap
一个覆盖裸机性能、Sv32/Linux 系统能力与双宽乱序研究的多 Profile RV32 CPU 项目,并公开可复查的仿真合同与 Nangate45 academic ASIC 后端证据。
三套 Profile 是独立 source lock,不是同一份参数化 RTL。默认旗舰与 quickstart 仍是正在优化的 rv32im_ooo_4k;已完成后端审计的是单发射 rv32im_single_perf 和 Linux/Sv32 rv32ima_sv32_linux。默认公开仿真入口为 npc_public_sim_top + filelists/rv32im_ooo_4k.f,运行 make defconfig && make smoke 可得到有界 SMOKE_PASS。
| 结果 | 可核验摘要 | 成熟度与时间边界 | 直接证据 |
|---|---|---|---|
| Single CoreMark | 固定公开配置 timed CPI 1.4849 |
current / verified |
说明 · JSON |
| Linux 性能演进 | historical whole-program CPI 8.587→1.726,同 benchmark family 约 4.98x |
优化端点 historical_verified;A/B comparison partial;当前 source not_reverified |
说明 · JSON |
| Linux 系统启动 | DTB→OpenSBI→S-mode→Linux 6.6.141→initramfs shell |
historical_verified;当前 source not_reverified |
说明 · JSON |
| OoO 历史优化 | frontend-empty 53.76%→23.29%;redirect/control completion 59.38%→17.73% |
historical_verified 于 pre-loop-remediation;当前性能 provisional |
说明 · JSON |
| XC7Z100 历史实现 | 三个历史快照完成 200 MHz routed timing;早期快照有 UART/ILA 观测 |
implementation/timing historical_verified;board/workload binding partial;当前 source not_claimed |
说明 · JSON |
| ASIC 固定闭合点 | Single/Linux × register-expanded/4-macro SRAM,post-route 200–475 MHz |
implementation/internal STA verified;SRAM electrical/signoff partial |
说明 · JSON |
ASIC 数值仅是固定频率的 Nangate45 academic closure point,不是 Fmax、完整 IO/电气闭合、OCV/MMMC、foundry signoff 或 silicon result。SRAM 行的 macro model 与 macro DRC/LVS/PEX 边界见链接文档。
| Profile | 架构重点 | 当前公开状态 | 历史/后端边界 |
|---|---|---|---|
rv32im_single_perf |
RV32IM,5 级单发射,I/D Cache、forwarding、BTB/PHT | 仿真与 fixed-source CoreMark verified |
历史 FPGA 分层披露;register/SRAM fixed point verified |
rv32ima_sv32_linux |
RV32IMA,M/S、Sv32、精确 trap、TLB/PTW | 当前 bounded 回归 verified |
历史 Linux shell verified、当前未深跑;register/SRAM fixed point verified |
rv32im_ooo_4k |
双 dispatch/issue/complete/commit,Rename/PRF/ROB/IQ | 默认 quickstart;性能 provisional |
历史优化不继承到当前;后端 planned / TODO |
| 阅读阶段 | 入口 | 阅读重点 |
|---|---|---|
| 三个 canonical top | Single cpu_top · Linux cpu_top · OoO ooo_npc_top |
先看三套独立 source lock 的顶层边界、时钟复位和外部总线,而不是把它们当作参数化同核。 |
| Single 前端与相关性 | if_stage.v · id_stage.v |
关注 128-entry BTB/PHT、取指队列、RAW/load-use 检测与跨级 forwarding。 |
| Single Cache | ICache.v · DCache.v |
关注各 4 KiB、2-way cache 的 miss/refill、写路径和流水线 backpressure。 |
| Linux 特权与 trap | PrivCsrRegs.v · TrapCtrl.v |
关注 M/S CSR、委托、精确 trap/return 与 satp 切换。 |
| Linux MMU/PTW/LSU | Sv32FrontendPipe.v · Sv32Tlb.v · Sv32DCacheBridge.v · Sv32LSUPipe.v |
关注 ITLB/DTLB、两级 PTW/replay、权限/页故障、store buffer 与 load-hit 路径。 |
| OoO Rename/调度/退休 | ooo_rename_dispatch_recovery_2w.sv · ooo_prf.sv · small_rob.sv · alu_issue_queue_1w.sv |
关注双 dispatch/issue/complete/commit 的 tag、ready、年龄与精确状态边界。 |
| OoO 恢复与 LSU ownership | ooo_branch_checkpoint_state_2w.sv · ooo_lsu_atomic_mem_arbiter_2e.sv · ooo_precise_store_buffer_4entry.sv |
关注 checkpoint/generation 恢复以及 Issue/WB/Commit 与 LSU 的 causal ownership。 |
| 公共 ABI 与验证闭环 | Single wrapper · Linux wrapper · OoO wrapper · profile_abi.hpp · nemu_public_adapter.cpp · verilator_runner.py · verilator_main.cpp · bounded smoke |
关注统一 commit packet、profile-specific NEMU 状态映射、watchdog/PASS marker 与有界自检。 |
依赖为 Python 3.8+、GNU Make、PyYAML 和 Verilator 5.x。默认 quickstart 保持 OoO,并产生可见的 SMOKE_PASS:
python3 -m pip install --user PyYAML
make defconfig
make showconfig config-check source-check
make verilator-lint smoke regression三 Profile 可按同一合同检查:
for profile in rv32im_single_perf rv32ima_sv32_linux rv32im_ooo_4k; do
make "${profile}_defconfig"
make showconfig config-check source-check sim-dry-run verilator-lint smoke regression
done
make runtime-tests docs-check evidence-check showcase-check implementation-check
make verify-checksums public-hygiene四个 Single/Linux ASIC 配置只做公开合同与 dry-run 验证:
for defconfig in rv32im_single_perf_asic_defconfig \
rv32im_single_perf_sram_asic_defconfig \
rv32ima_sv32_linux_asic_defconfig \
rv32ima_sv32_linux_sram_asic_defconfig; do
make "${defconfig}"
make asic-config-check lc-macros-dry-run dc-matrix-dry-run pnr-dry-run sta-dry-run
doneevidence-check/showcase-check 只验证已公开记录,ASIC *-dry-run 只验证配置、身份与命令合同;它们不会调用或伪装 DC、OpenROAD、OpenRCX、PrimeTime 等真实 EDA 执行。
每次构建只选择一套 source set。三个 wrapper 都提供相同名称的 npc_public_sim_top,但只能与同一行的 filelist 配对。
| Profile | Native top | Public wrapper / filelist | Defconfig |
|---|---|---|---|
| Single | cpu_top |
rv32im_single_perf_sim_top.sv / rv32im_single_perf.f |
rv32im_single_perf_defconfig |
| Linux/Sv32 | cpu_top |
rv32ima_sv32_linux_sim_top.sv / rv32ima_sv32_linux.f |
rv32ima_sv32_linux_defconfig |
| OoO(默认) | ooo_npc_top |
rv32im_ooo_4k_sim_top.sv / rv32im_ooo_4k.f |
rv32im_ooo_4k_defconfig |
SoC 接口、MMIO、commit packet 与 wrapper 选择见集成说明。
三 Profile 架构 · 仿真与 difftest · 性能与实现数据 · 历史性能证据 · 系统/FPGA 证据 · 验证矩阵 · ASIC 流程合同 · 后端证据 · 完整限制 · 后续路线 · 文档索引
历史 Linux boot 和 XC7Z100 implementation/board observation 已按 source snapshot 分层公开;当前 Linux source 的深跑复验、当前 Single source 的重新上板、coverage closure 和 silicon 结果仍为 not_claimed。Single/Linux 后续工作集中在 source-matched 系统复验、外部 IO、电气例外、SRAM characterization 与 macro signoff;OoO 当前继续做无环 RTL 优化,其 verified performance 与 register/SRAM 后端保持 provisional / planned。