没有合适的资源?快使用搜索试试~ 我知道了~
首页RISC-V调试规范V1.0稳定版:兼容与改进
RISC-V调试规范V1.0稳定版:兼容与改进
需积分: 0 11 下载量 67 浏览量
更新于2024-06-20
收藏 1.41MB PDF 举报
RISC-V Debug Specification Version 1.0-STABLE 是一个官方发布的、针对 RISC-V架构的调试规范,该版本旨在提供一种兼容性较高的调试方法,延续了之前版本0.13.x的优点。作为稳定版,它着重于保持向后兼容性,尽管在必要时可能会对某些边缘情况做出调整,以适应不断发展的技术需求。 编辑团队由 Paul Donahue 和 Tim Newsome 领导,分别来自 Ventana MicroSystems 和 SiFive, Inc.,他们在文档的维护和更新上扮演关键角色。该规范的编写工作包含了多个贡献者的协作,包括但不限于 Bruce Ableidinger、Krste Asanović 等知名业界专家,确保了规格的准确性和实用性。 文档的发布日期为 2023 年 7 月 12 日,且明确指出,在正式成为标准之前,规范可能会有所变化。为了跟踪可能影响实施者的设计更改,建议读者关注官方 GitHub 存储库。 值得注意的是,如果开发者在实施此规范过程中遇到问题,应与编辑团队联系,以便提出可能的修正建议。该规范的内容涵盖了RISC-V架构的调试细节,包括但不限于调试接口、信号定义、数据传输协议等,是设计和实现RISC-V处理器或调试工具的基础文档。 RISC-V Debug Specification Version 1.0-STABLE 是开发人员进行RISC-V系统调试工作的必备参考资料,它强调了稳定性、兼容性和社区参与的重要性,确保了开发者能够在一个统一的框架内进行高效、无缝的调试实践。
资源详情
资源推荐
![](https://csdnimg.cn/release/download_crawler_static/88462361/bg10.jpg)
2 RISC-V Debug Specification Version 1.0-STABLE
DMI
Debug Module Interface (see Section 3.1).
DR JTAG Data Register.
DTM
Debug Transport Module (see Section 6).
DXLEN
Debug XLEN, which is the widest XLEN a hart supports, ignoring the current value of MXL
in misa.
essential feature
An essential feature must be present in order for debug to work correctly.
GPR
General Purpose Register.
hardware platform
A single system consisting of one or more components.
hart
A hardware thread in a RISC-V core.
IDCODE
32-bit Identification CODE, and a JTAG instruction that returns the IDCODE value.
IR JTAG Instruction Register.
JTAG
Refers to work done by IEEE’s Joint Test Action Group, described in IEEE 1149.1.
legacy feature
A legacy feature should only be implemented to support legacy hardware that is present in a
system.
Minimal RISC-V Debug Specification
A subset of the full Debug Specification that allows for very small implementations. See
Chapter 3.
NAPOT
Naturally Aligned Power-Of-Two.
NMI
Non-Maskable Interrupt.
physical address
An address that is directly usable on the system bus.
recommended feature
A recommended feature is not required for debug to work correctly, but it is so useful that it
should not be omitted without good reason.
![](https://csdnimg.cn/release/download_crawler_static/88462361/bg11.jpg)
RISC-V Debug Specification Version 1.0-STABLE 3
SBA
System Bus Access (see Section 3.10).
specialized feature
A specialized feature, that only makes sense in the context of some specific hardware.
TAP
Test Access Port, defined in IEEE 1149.1.
TM Trigger Module (see Section 5).
virtual address
An address as a hart sees it. If the hart is using address translation this may be different
from the physical address. If there is no translation then it will be the same.
xepc
The exception program counter CSR (e.g. mepc) that is appropriate for the mode being
trapped to.
1.2 Context
This specification attempts to support all RISC-V ISA extensions that have, roughly, been ratified
through the first half of 2023. In particular, though, this specification specifically addresses features
in the following extensions:
1. A
2. C
3. D
4. F
5. H
6. Sm1p13
7. Ss1p13
8. Smstateen
9. V
10. Zawrs
11. Zcmp
12. Zicbom
13. Zicboz
14. Zicbop
1.2.1 Versions
Version 0.13 of this document was ratified by the RISC-V Foundation’s board. Versions 0.13.x are
bug fix releases to that ratified specification.
Version 0.14 was a working version that was never officially ratified.
![](https://csdnimg.cn/release/download_crawler_static/88462361/bg12.jpg)
4 RISC-V Debug Specification Version 1.0-STABLE
Version 1.0 is almost entirely forwards and backwards compatible with Version 0.13.
1.2.1.1 Bugfixes from 0.13 to 1.0
Changes that fix a bug in the spec:
1. Fix order of operations described in sbdata0. #392
2. Resume ack is set after resume, in Section 3.5. #400
3. sselect applies to svalue. #402
4. mte only applies when action=0. #411
5. aamsize does not affect Argument Width. #420
6. Clarify that harts halt out of reset if haltreq =1. #419
1.2.1.2 Incompatible Changes from 0.13 to 1.0
Changes that are not backwards-compatible. Debuggers or hardware implementations that imple-
ment 0.13 will have to change something in order to implement 1.0:
1. Make haltsum0 optional if there is only one hart. #505
2. System bus autoincrement only happens if an access actually takes place. (sbdata0) #507
3. Bump version to 3. #512
4. Require debugger to poll dmactive after lowering it. #566
5. Add pending to icount. #574
6. When a selected trigger is disabled, tdata2 and tdata3 can be written with any value sup-
ported by any of the types this trigger supports. #721
7. tcontrol fields only apply to breakpoint traps, not any trap. #723
8. If version is greater than 0, then hit0 (previously called mcontrol6.hit) now contains 0 when a
trigger fires more than one instruction after the instruction that matched. (This information
is now reflected in hit1.) #795
9. If version is greater than 0, then bit 20 of mcontrol6 is no longer used for timing information.
(Previously the bit was called mcontrol6.timing.) #807
10. If version is greater than 0, then the encodings of size for sizes greater than 64 bit have
changed. #807
1.2.1.3 Minor Changes from 0.13 to 1.0
Changes that slightly modify defined behavior. Technically backwards incompatible, but unlikely
to be noticeable:
1. stopcount only applies to hart-local counters. #405
2. version may be invalid when dmactive =0. #414
3. Address triggers (mcontrol) may fire on any accessed address. #421
4. All trigger registers (Section 5.3) are optional. #431
![](https://csdnimg.cn/release/download_crawler_static/88462361/bg13.jpg)
RISC-V Debug Specification Version 1.0-STABLE 5
5. When extending IR, bypass still is all ones. #437
6. ebreaks and ebreaku are WARL. #458
7. NMIs are disabled by stepie. #465
8. R/W1C fields should be cleared by writing every bit high. #472
9. Specify trigger priorities in Table 5.2 relative to exceptions. #478
10. Time may pass before dmactive becomes high. #500
11. Clear MPRV when resuming into lower privilege mode. #503
12. Halt state may not be preserved across reset. #504
13. Hardware should clear trigger action when dmode is cleared and action is 1. #501
14. Change quick access exceptions to halt the target in Section 3.7.1.2. #585
15. Writing 0 to tdata1 forces a state where tdata2 and tdata3 are writable. #598
16. Solutions to deal with reentrancy in Section 5.4 prevent triggers from matching, not merely
firing. This primarily affects icount behavior. #722
17. Attempts to access an unimplemented CSR raise an illegal instruction exception. #791
1.2.1.4 New Features from 0.13 to 1.0
New backwards-compatible feature that did not exist before:
1. Add halt groups and external triggers in Section 3.6. #404
2. Reserve some DMI space for non-standard use. See custom, and custom0 through custom15.
#406
3. Reserve trigger type values for non-standard use. #417
4. Add nmi bit to itrigger. #408 and #709
5. Recommend matching on every accessed address. #449
6. Add resume groups in Section 3.6. #506
7. Add relaxedpriv. #536
8. Move scontext, renaming original to mscontext, and create hcontext. #535
9. Add mcontrol6, deprecating mcontrol. #538
10. Add hypervisor support: ebreakvs, ebreakvu, v, hcontext, mcontrol, mcontrol6, and priv.
#549
11. Optionally make anyunavail and allunavail sticky, controlled by stickyunavail. #520
12. Add tmexttrigger to support trigger module external trigger inputs. #543
13. Describe mcontrol and mcontrol6 behavior with atomic instructions. #561
14. Trigger hit bits must be set on fire, may be set on match. #593
15. Add sbytemask and sbytemask to textra32 and textra64. #588
16. Allow debugger to request harts stay alive with keepalive bit in Section 3.14.2. #592
17. Add ndmresetpending to allow a debugger to determine when ndmreset is complete. #594
18. Add intctl to support triggers from an interrupt controller. #599
1.2.1.5 Incompatible Changes During 1.0 Stable
Backwards-incompatible changes between two versions that are both called 1.0 stable.
![](https://csdnimg.cn/release/download_crawler_static/88462361/bg14.jpg)
6 RISC-V Debug Specification Version 1.0-STABLE
1. nmi was moved from etrigger to itrigger, and is now subject to the mode bits in that
trigger.
2. #728 introduced Message Registers, which were later removed in #878.
3. It may not be possible to read the contents of the Program Buffer using the progbuf registers.
#731
4. tcontrol fields apply to all traps, not just breakpoint traps. This reverts #723. #880
1.3 About This Document
1.3.1 Structure
This document contains two parts. The main part of the document is the specification, which is
given in the numbered chapters. The second part of the document is a set of appendices. The
information in the appendices is intended to clarify and provide examples, but is not part of the
actual specification.
1.3.2 ISA vs. non-ISA
This specification contains both ISA and non-ISA parts. The ISA parts define self-contained ISA
extensions. The other parts of the document describe the non-ISA external debug extension.
Chapters whose contents are solely one or the other are labeled as such in their title. Chapters
without such a label apply to both ISA and non-ISA.
1.3.3 Register Definition Format
All register definitions in this document follow the format shown below. A simple graphic shows
which fields are in the register. The upper and lower bit indices are shown to the top left and top
right of each field. The total number of bits in the field are shown below it.
After the graphic follows a table which for each field lists its name, description, allowed accesses,
and reset value. The allowed accesses are listed in Table 1.2. The reset value is either a constant
or “Preset.” The latter means it is an implementation-specific legal value.
Parts of the register which are currently unused are labeled with the number 0. Software must only
write 0 to those fields, and ignore their value while reading. Hardware must return 0 when those
fields are read, and ignore the value written to them.
This behavior enables us to use those fields later without having to increase the values in the
version fields.
Names of registers and their fields are hyperlinks to their definition, and are also listed in the index
on page 117.
剩余157页未读,继续阅读
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://profile-avatar.csdnimg.cn/05c7889c18d24e229fb4214ec0bac4d6_a401183680.jpg!1)
a401183680
- 粉丝: 1
- 资源: 1
上传资源 快速赚钱
我的内容管理 收起
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助
![](https://csdnimg.cn/release/wenkucmsfe/public/img/voice.245cc511.png)
会员权益专享
最新资源
- 京瓷TASKalfa系列维修手册:安全与操作指南
- 小波变换在视频压缩中的应用
- Microsoft OfficeXP详解:WordXP、ExcelXP和PowerPointXP
- 雀巢在线媒介投放策划:门户网站与广告效果分析
- 用友NC-V56供应链功能升级详解(84页)
- 计算机病毒与防御策略探索
- 企业网NAT技术实践:2022年部署互联网出口策略
- 软件测试面试必备:概念、原则与常见问题解析
- 2022年Windows IIS服务器内外网配置详解与Serv-U FTP服务器安装
- 中国联通:企业级ICT转型与创新实践
- C#图形图像编程深入解析:GDI+与多媒体应用
- Xilinx AXI Interconnect v2.1用户指南
- DIY编程电缆全攻略:接口类型与自制指南
- 电脑维护与硬盘数据恢复指南
- 计算机网络技术专业剖析:人才培养与改革
- 量化多因子指数增强策略:微观视角的实证分析
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
![](https://img-home.csdnimg.cn/images/20220527035711.png)
![](https://img-home.csdnimg.cn/images/20220527035711.png)
![](https://img-home.csdnimg.cn/images/20220527035111.png)
安全验证
文档复制为VIP权益,开通VIP直接复制
![](https://csdnimg.cn/release/wenkucmsfe/public/img/green-success.6a4acb44.png)