[TASK] 香山 Issue #6668:csrr x0,vl / vlenb 错误重命名 x0

Open
#178 15 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 5 days

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Documentation
Clarity
Clearly specified
Activity status
Active
Tech stack
scala

Research direction

Start by reading XiangShan Issue #6668, its comments, and any linked repair history, then reproduce the supplied xs_csrr_x0_vl.elf.zip case on the specified kunminghu-v3 version and record the commit and configuration. Trace the vl and vlenb CSR pseudo-decode writeback controls through rename, using the x0 assertions and the vtype control case as evidence. Document the cause, reproduction steps, and before-and-after behavior under xiangshan-course/docs/6-xiangshan-debug/xiangshan-issue-6668/, and update VERSIONS.md.

Written by the indexing model from the issue text.

Description

fix bug task
所属目录

debug

任务背景与目标

开始任务前,请先确认以下两点:

  1. 阅读原始 Issue 及其评论、关联 PR,判断该问题是否仍有进一步研究的价值。
  2. 使用最新的 kunminghu-v3 运行原始测试用例,检查问题是否仍然存在,并记录测试使用的 commit 和配置。

如果问题已经修复,请结合修复 PR 或提交记录,分析原始成因、修复思路及具体实现,并验证修复前后的行为差异。

如果问题尚未修复,请尝试复现并定位根因,探索可行的修复方案,完成修改及验证。

围绕 XiangShan Issue #6668 完成复现、根因分析及修复验证,形成可重复执行的 debug 案例。

  • 网页:Issue #6668
  • 提交日期:2026-10-05。
  • 概况:csrr zero,vl 和 csrr zero,vlenb 错误开启整数寄存器写回,给 x0 分配物理寄存器,触发 rfWen cannot be 1 when Int regfile ldest is 0、pdest for $0 should be 0 断言。
  • 版本对照:v3 09453ff8f 在 DiffTest/no-diff 下均失败;报告称 v2、NEMU、Spike 正常,未指定 v2 对照 commit。csrr zero,vtype 等控制组正常。
  • 定位线索:CSR 伪译码的整数写回使能和 x0 特判。
  • 状态:Open,bug/WIP feature,未见关联修复 PR。
  • 材料:xs_csrr_x0_vl.elf.zip。

本任务重点:追踪 vl/vlenb CSR 伪译码至 rename 的写回控制,解释 x0 为何被错误分配物理寄存器。

交付清单
  • 复现问题,提交测试用例、运行方法及结果,注明 commit 和配置。
  • 分析触发条件与根因,提交分析文档和关键证据。
  • 说明并验证修复方案,提供修复前后对照;已有修复附 PR/commit,自行修复附补丁。
  • 按指定目录提交成果,如确定修复方案可尝试提出 XiangShan PR。
任务难度

中

预估工时

16

质押积分

20

补充信息
  • 提交目录:xiangshan-course/docs/6-xiangshan-debug/xiangshan-issue-6668/,并更新章节 VERSIONS.md。
  • 附分析文档、复现程序、运行脚本和关键日志;自行修复时附补丁。
Dominant language
Scala
Stars
63
Forks
58
Avg merge
4d 20h
Merged PRs (30d)
49

Getting set up

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from OpenXiangShan/XiangShanLab

All issues in OpenXiangShan/XiangShanLab

Similar issues

More Scala issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.