cva6: D-cache data RAM drops its byte enables, so every cache write corrupts the other way
维护者通常 1 天内回复
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 49/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 领域
- embedded-iot
调研方向
Start with flow/designs/src/cva6/core/cache_subsystem/hpdcache/rtl/src/common/hpdcache_sram_wbyteenable.sv and trace how wbyteenable reaches fakeram7_128x64; then check the way packing in cva6_hpdcache_subsystem.sv and write behavior in hpdcache_memctrl.sv. Reproduce the two-way set test described in the issue and confirm both lines read back correctly after the fix, including against the upstream RAM wrapper behavior.
由索引模型根据 Issue 内容生成。
描述
Where: flow/designs/src/cva6/core/cache_subsystem/hpdcache/rtl/src/common/hpdcache_sram_wbyteenable.sv (unchanged
since cb73ed67f; same at 26Q4 ecb3cfdeb), used by designs/asap7/cva6.
What: the wrapper replaces upstream's hpdcache_sram_wbyteenable_1rw with fakeram7_128x64, which has no write
mask, and leaves its wbyteenable input unconnected. cv32a65x packs both ways of a D-cache set into each 64-bit RAM
word (cva6_hpdcache_subsystem.sv: dataWaysPerRamWord = min(2, 128/32) = 2). hpdcache_memctrl.sv replicates the
write data into both 32-bit lanes and selects the way only through the byte enables. With them dropped, every refill and
every store hit, full-word ones included, also overwrites the other way's word at that address. Any program that fills
both ways of a set reads wrong data. The I-cache is not affected (one macro per way, byte enables all ones).
Shown in simulation: upstream cva6 at 3a389af (the commit designs/src/cva6 is based on) with this tree's changed
files, upstream's Verilator testharness, target cv32a65x, Verilator 5.008, behavioural models of the four fakeram7
macros (read on a rising clock with ce_in high, write when we_in, hold otherwise). A 40-line C program writes two
16-byte lines 1 KB apart (one set, both ways), then reads them back alternately and returns the mismatch count:
| RTL | result | cva6 iss_cmp against Spike |
|---|---|---|
upstream's hpdcache_sram_wbyteenable_1rw |
pass, 525 cycles | 100 GPR updates matched |
this hpdcache_sram_wbyteenable.sv |
fail (tohost = 1), 525 cycles | first mismatch at c.lw a2, 8(a5): Spike 0x11110002, RTL 0x22220002 (the other way's word) |
Consequence: the cva6 netlist the flow builds does not compute correctly; its timing and area are not affected, but
any gate-level or activity-based use of it is.
Possible fixes: a data-RAM macro with a byte write mask connected to wbyteenable, or one macro per way.
- 主要语言
- Verilog
- 星标
- 782
- 派生
- 552
- 平均合并
- 1 天 18 小时
- 30 天内合并 PR
- 73
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
The-OpenROAD-Project/OpenROAD-flow-scripts 的其他 Issue
-
gf180: `-split_cuts {Metal3 0.128}` in the platform PDN config makes overlapping, off-grid Via2/Via3 cuts可能已有人在做 @bandhambalaji 于 2 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 71/100
The-OpenROAD-Project/OpenROAD-flow-scripts#4754 · 1 条评论 ·
维护者通常 1 天内回复
-
build_openroad.sh: kepler-formal is installed with an absolute RUNPATH, so a moved or re-pointed install loads another build's libraries可能已有人在做 @saikatchatrg 于 9 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 90/100
The-OpenROAD-Project/OpenROAD-flow-scripts#4717 · 2 条评论 ·
维护者通常 1 天内回复
-
Make SYNTH_HDL_FRONTEND=slang default可能重新可做 @jeffng-or 于 41 天前认领,目前没有进行中的 PR。 未关闭
难度 2/5 1-3 小时 新手友好度 68/100
The-OpenROAD-Project/OpenROAD-flow-scripts#4548 · 1 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
-
Policy: red/green says a PR is ready for the maintainers' judgement; QoR and pr-head are reported可能已有人在做 @vvbandeira 于 1 天前认领。 未关闭
The-OpenROAD-Project/OpenROAD-flow-scripts#4778 · 已指派 2 人 ·
维护者通常 1 天内回复
-
难度 4/5 1-2 天 新手友好度 48/100
The-OpenROAD-Project/OpenROAD-flow-scripts#4764 · 1 条评论 · 1 个 reaction ·
维护者通常 1 天内回复
查看 The-OpenROAD-Project/OpenROAD-flow-scripts 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
FujiNetWIFI/fujinet-lib#272 ·
维护者通常 1 天内回复
-
cleanup help wanted
难度 2/5 1-3 小时 新手友好度 62/100
ESPresense/ESPresense#2602 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
libretiny-eu/libretiny#435 ·
维护者通常 4 天内回复
-
难度 2/5 1-3 小时 新手友好度 75/100
sususweet/midea_auto_cloud#285 ·
维护者通常 1 天内回复
-
bug system: adam
难度 2/5 1-3 小时 新手友好度 82/100
FujiNetWIFI/fujinet-config#358 ·
维护者通常 1 天内回复