https://mp.weixin.qq.com/s/on1LugO9fTFJstMes3T2Xg

介绍riscv-debug的使用实例:使用三种方法写内存。

1. Using System Bus Access

1) Write a word to memory

A. 写sbaddress0寄存器:写入目标内存地址;

B. 写sbdata0寄存器:写入要写入目标内存地址处的值;触发写内存动作:

2) Write a block of memory

A. 写sbcs寄存器:

a. sbaccess=2:访问大小是32bit;

b. sbautoincrement=1:sbaddress is incremented by the access size (in bytes) selected in sbaccess after every system bus access;

B. 写sbaddress0寄存器:写入目标内存地址;

C. 写sbdata0寄存器:写入要写入目标内存地址处的值;触发写内存动作;

D. 写sbdata0寄存器:写入要写入目标内存地址处的值;触发写内存动作;

E. 如此即可逐个把数据写入内存;

2. Using Program Buffer

1) Write a word to memory

A. 准备好Program Buffer:把寄存器s1中的数据写入寄存器s0中的内存地址中;

B. 写data0寄存器:写入目标内存地址;

C. 写command寄存器:写入要执行的抽象命令:把data0寄存器的值拷贝到寄存器s0中;

D. 写data0寄存器:写入待存数据;

E. 写command寄存器:写入要执行的抽象命令:

a. 把data0中的值拷贝到s1中;

b. postexec=1:执行完抽象命令之后,触发Program Buffer的执行;

2) Write a block of memory

A. 准备好Program Buffer:把寄存器s1中的数据写入寄存器s0中的内存地址中,然后把s0中的地址加4;

B. 写data0寄存器:写入目标内存地址;

C. 写command寄存器:写入要执行的抽象命令:把data0寄存器的值拷贝到寄存器s0中;

D. 写data0寄存器:写入待写数据;

E. 写command寄存器:写入要执行的抽象命令:

a. 把data0中的值拷贝到s1中;

b. postexec=1:执行完抽象命令之后,触发Program Buffer的执行;

F. 写abstractauto寄存器:读data0寄存器触发抽象命令的执行;

a. autoexecdata=1: When a bit in this field is 1, read or write accesses to the corresponding data word cause the command in command to be executed again.

G. 写data0寄存器:写入待写数据;触发抽象命令的执行;进而触发Program Buffer的执行;如此循环即可写入全部数据;

H. 最后清除abstractauto寄存器中的autoexecdata位;

3. Using Abstract Memory Access

1) Write a word to memory

A. 写data1寄存器:存入目标内存地址;

B. 写data0寄存器:写入待存数据;

C. 写command寄存器:存入要执行的抽象命令:

a. cmdtype=2:表示命令的类型为Access Memory;

b. aamsize=2:Access the lowest 32 bits of the memory location.

c. aamvirtual=0:Addresses are physical (to the hart they are performed on).

d. write=1:Copy data from arg0 portion of data into the memory location specified in arg1.

这条命令的效果是:把data0寄存器中的数据,写入data1中的地址中;

2) Write a block of memory

这里只介绍一下要点:

a. aampostincrement=1:每次访问完内存之后,都把data1寄存器中的地址加4;

b. abstractauto.autoexecdata=1:读写data0寄存器会触发抽象命令的执行;

Rocket - debug - Example: Write Memory的更多相关文章

  1. Rocket - debug - Example: Read Memory

    https://mp.weixin.qq.com/s/ChXNTbx94WDC72GvmE9bGA 介绍riscv-debug的使用实例:使用三种方法读取内存. 1. Using System Bus ...

  2. Xcode6 运行程序后,右侧Debug区域的Memory显示空白解决方法

    http://chenyh-blog.com/%E8%9B%8B%E7%96%BC%E7%9A%84%E5%86%85%E5%AD%98-%E7%AC%AC%E4%B8%89%E7%AF%87-sdw ...

  3. Rocket - debug - TLDebugModuleInner - Hart Bus Access

    https://mp.weixin.qq.com/s/deNMEyJ1idJDVoZwwo0A1A 简单介绍TLDebugModuleInner中核心总线访问(Hart Bus Access). 参考 ...

  4. Rocket - debug - Example: Triggers

    https://mp.weixin.qq.com/s/zPNyrBOhsytkRrZTDTEvpw 介绍riscv-debug的使用实例:配置Triggers功能. 1. Trigger Trigge ...

  5. Rocket - debug - Periphery

    https://mp.weixin.qq.com/s/uGxn-Xec0LkwdaSsCtQBvw 简单介绍Periphery的实现. 1. ExportDebugDMI/ExportDebugJTA ...

  6. Rocket - debug - DebugTransport

    https://mp.weixin.qq.com/s/EcsuTjb4hFF9Ncig9Gfhew 简单介绍DebugTransport的实现. 1. JtagDTMConfig 1) JtagDTM ...

  7. Rocket - debug - TLDebugModule

    https://mp.weixin.qq.com/s/EhUb1z5oiIw6dJ-90ifDJA 简单介绍TLDebugModule中的实现. 1. device device是一个设备描述符,包含 ...

  8. Rocket - debug - TLDebugModuleInner - ROM Generation

    https://mp.weixin.qq.com/s/j_CgHU4PnY82NMwJzOqHYg 简单介绍Variable ROM Generation. 1. jalAbstract jalAbs ...

  9. Rocket - debug - Example: DMI

    https://mp.weixin.qq.com/s/7suuJ7m2BKCpsHk1K2FzJQ 介绍riscv-debug的使用实例:如何使用DMI. 1. dm Debug Module实现了调 ...

随机推荐

  1. CSS页面定制代码+动漫人物设计

    右下角的小人物(我蛮喜欢的) 把下面这段代码粘贴到设置里页脚代码处 在第六行的model左右的名字可选,我这个是叫z16 然后这里有别人的一篇博客有其他名字https://blog.csdn.net/ ...

  2. E. Sasha and Array 矩阵快速幂 + 线段树

    E. Sasha and Array 这个题目没有特别难,需要自己仔细想想,一开始我想了一个方法,不对,而且还很复杂,然后lj提示了我一下说矩阵乘,然后再仔细想想就知道怎么写了. 这个就是直接把矩阵放 ...

  3. JPA---Spring-data-JPA---Hibernate

    Spring Data JPA--搭建环境 版本---maven  3.6.3 <properties> <spring.version>5.2.5.RELEASE</s ...

  4. docker-compose安装rabbitmq集群(主从集群---》镜像集群)

    docker-compose安装rabbitmq集群(主从集群--->镜像集群) yls 2020/5/11 创建docker-compose.yml 文件 version: '3' servi ...

  5. 管理环境一:venv

    初衷: 在工作的时候,我们会有很多个项目,每个项目使用的库的版本不一样,导致我们切换项目的时候会很麻烦. 比如:我有两个django项目,项目一使用的版本是 django 1.7 , 项目二使用的版本 ...

  6. 小心了!Kubernetes自动化操作工具将让你失去工作

    运行Kubernetes的人已经花费太多时间在操作上,企业正在考虑为Kubernetes编写自动化工具. 尽管IT部门的大部分职位都会增加,但职业顾问说,计算机操作员预计会减少.这个角色涉及运行She ...

  7. 在ef core中使用postgres数据库的全文检索功能实战之中文支持

    前言 有关通用的postgres数据库全文检索在ef core中的使用方法,参见我的上一篇文章. 本文实践了zhparser中文插件进行全文检索. 准备工作 安装插件,最方便的方法是直接使用安装好插件 ...

  8. Fragment 嵌套Fragment注意事项

    最近项目新功能需要在垂直方方向可以循环滚动,并且水平方向也可以水平循环滚动,并且可以定位到指定item上.很自然的想到了ViewPager和 VerticalViewPager来解决项目需求,UI的大 ...

  9. C# 数据操作系列 - 7. EF Core 导航属性配置

    在上一篇,大概介绍了Entity Framework Core关于关系映射的逻辑.在上一篇中留下了EF的外键映射没有说,也就是一对一,一对多,多对一,多对多的关系等.这一篇将为大家细细分析一下,如何设 ...

  10. filebeat-kafka:WARN producer/broker/0 maximum request accumulated, waiting for space

    You need to configure 3 things: Brokers Filebeat kafka output Consumer Here a example (change paths ...