Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenXiangShan
NEMU
提交
a5dedd21
N
NEMU
项目概览
OpenXiangShan
/
NEMU
9 个月 前同步成功
通知
7
Star
171
Fork
67
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
N
NEMU
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
a5dedd21
编写于
10月 17, 2022
作者:
X
Xuan Hu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
riscv64: add memory access trigger
Pass breakpoint test case in the riscv-tests repo
上级
f224f857
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
51 addition
and
1 deletion
+51
-1
src/isa/riscv64/instr/rvi/exec.h
src/isa/riscv64/instr/rvi/exec.h
+6
-0
src/isa/riscv64/instr/rvi/ldst_trig.h
src/isa/riscv64/instr/rvi/ldst_trig.h
+43
-0
src/isa/riscv64/local-include/rtl.h
src/isa/riscv64/local-include/rtl.h
+1
-0
src/isa/riscv64/system/trigger.c
src/isa/riscv64/system/trigger.c
+1
-1
未找到文件。
src/isa/riscv64/instr/rvi/exec.h
浏览文件 @
a5dedd21
...
...
@@ -14,6 +14,12 @@
***************************************************************************************/
#include "compute.h"
#ifndef CONFIG_RVSDTRIG
#include "ldst.h"
#else
#include "ldst_trig.h"
#endif
#include "control.h"
#include "fence.h"
src/isa/riscv64/instr/rvi/ldst_trig.h
0 → 100644
浏览文件 @
a5dedd21
#define def_ld_template_with_trigger(name, rtl_instr, width, mmu_mode) \
def_EHelper(name) { \
trig_action_t action = TRIG_ACTION_NONE; \
const vaddr_t vaddr = *dsrc1 + id_src2->imm; \
if (cpu.TM->check_timings.br) { \
action = tm_check_hit(cpu.TM, TRIG_OP_LOAD, vaddr, TRIGGER_NO_VALUE); \
} \
trigger_handler(action); \
concat(rtl_, rtl_instr) (s, ddest, dsrc1, id_src2->imm, width, mmu_mode); \
const rtlreg_t data = *ddest; \
if (cpu.TM->check_timings.ar) { \
action = tm_check_hit(cpu.TM, TRIG_OP_LOAD | TRIG_OP_TIMING, vaddr, data); \
} \
trigger_handler(action); \
}
#define def_st_template_with_trigger(name, rtl_instr, width, mmu_mode) \
def_EHelper(name) { \
trig_action_t action = TRIG_ACTION_NONE; \
const vaddr_t vaddr = *dsrc1 + id_src2->imm; \
const word_t data = *ddest; \
if (cpu.TM->check_timings.bw) { \
action = tm_check_hit(cpu.TM, TRIG_OP_STORE, vaddr, data); \
} \
trigger_handler(action); \
concat(rtl_, rtl_instr) (s, ddest, dsrc1, id_src2->imm, width, mmu_mode); \
}
#define def_all_ldst(suffix, mmu_mode) \
def_ld_template_with_trigger(concat(ld , suffix), lms, 8, mmu_mode) \
def_ld_template_with_trigger(concat(lw , suffix), lms, 4, mmu_mode) \
def_ld_template_with_trigger(concat(lh , suffix), lms, 2, mmu_mode) \
def_ld_template_with_trigger(concat(lb , suffix), lms, 1, mmu_mode) \
def_ld_template_with_trigger(concat(lwu, suffix), lm , 4, mmu_mode) \
def_ld_template_with_trigger(concat(lhu, suffix), lm , 2, mmu_mode) \
def_ld_template_with_trigger(concat(lbu, suffix), lm , 1, mmu_mode) \
def_st_template_with_trigger(concat(sd , suffix), sm , 8, mmu_mode) \
def_st_template_with_trigger(concat(sw , suffix), sm , 4, mmu_mode) \
def_st_template_with_trigger(concat(sh , suffix), sm , 2, mmu_mode) \
def_st_template_with_trigger(concat(sb , suffix), sm , 1, mmu_mode)
def_all_ldst
(,
MMU_DIRECT
)
def_all_ldst
(
_mmu
,
MMU_TRANSLATE
)
src/isa/riscv64/local-include/rtl.h
浏览文件 @
a5dedd21
...
...
@@ -20,6 +20,7 @@
#include <rtl/rtl.h>
#include "reg.h"
#include "csr.h"
#include "trigger.h"
#define FBOX_MASK 0xFFFFFFFF00000000ull
// The bit pattern for a default generated 32-bit floating-point NaN
...
...
src/isa/riscv64/system/trigger.c
浏览文件 @
a5dedd21
...
...
@@ -49,7 +49,7 @@ trig_action_t tm_check_hit(
TM
->
triggers
[
i
].
tdata1
.
mcontrol
.
hit
|=
match
;
if
(
match
&&
!
TM
->
triggers
[
i
].
tdata1
.
mcontrol
.
chain
)
{
action
=
TM
->
triggers
[
i
].
tdata1
.
mcontrol
.
action
;
}
}
chain_ok
=
match
;
}
return
action
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录