Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenXiangShan
XiangShan
提交
9dc54045
X
XiangShan
项目概览
OpenXiangShan
/
XiangShan
11 个月 前同步成功
通知
1183
Star
3914
Fork
526
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
X
XiangShan
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
9dc54045
编写于
8月 21, 2020
作者:
Z
ZhangZifei
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
MemEnd: add more log for debug
上级
af8442b6
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
18 addition
and
8 deletion
+18
-8
run
run
+7
-0
src/main/scala/xiangshan/mem/LoadUnit.scala
src/main/scala/xiangshan/mem/LoadUnit.scala
+9
-6
src/main/scala/xiangshan/mem/Lsroq.scala
src/main/scala/xiangshan/mem/Lsroq.scala
+2
-2
未找到文件。
run
0 → 100755
浏览文件 @
9dc54045
mkdir -p build
for t in $(ls tests);
do
echo ${t%.c}
make ARCH=riscv64-noop ALL=${t%.c} V=OFF 2>&1 run | tee > build/${t%.c}.log
cat build/${t%.c}.log | grep "HIT GOOD TRAP"
done
\ No newline at end of file
src/main/scala/xiangshan/mem/LoadUnit.scala
浏览文件 @
9dc54045
...
...
@@ -108,6 +108,8 @@ class LoadUnit extends XSModule {
XSDebug
(
l2_out
.
fire
(),
"load req: pc 0x%x addr 0x%x -> 0x%x op %b\n"
,
l2_out
.
bits
.
uop
.
cf
.
pc
,
l2_out
.
bits
.
vaddr
,
l2_out
.
bits
.
paddr
,
l2_out
.
bits
.
uop
.
ctrl
.
fuOpType
)
XSDebug
(
io
.
dcache
.
req
.
valid
,
p
"dcache req(${io.dcache.req.valid} ${io.dcache.req.ready}): pc:0x${Hexadecimal(io.dcache.req.bits.meta.uop.cf.pc)} roqIdx:${io.dcache.req.bits.meta.uop.roqIdx} lsroqIdx:${io.dcache.req.bits.meta.uop.lsroqIdx} addr:0x${Hexadecimal(io.dcache.req.bits.addr)} vaddr:0x${Hexadecimal(io.dcache.req.bits.meta.vaddr)} paddr:0x${Hexadecimal(io.dcache.req.bits.meta.paddr)} mmio:${io.dcache.req.bits.meta.mmio} tlb_miss:${io.dcache.req.bits.meta.tlb_miss} mask:${io.dcache.req.bits.meta.mask}\n"
)
//-------------------------------------------------------
// LD Pipeline Stage 3
// Compare tag, use addr to query DCache Data
...
...
@@ -158,6 +160,7 @@ class LoadUnit extends XSModule {
l4_out
.
bits
.
mmio
:=
io
.
dcache
.
resp
.
bits
.
meta
.
mmio
l4_out
.
bits
.
mask
:=
io
.
dcache
.
resp
.
bits
.
meta
.
mask
l4_out
.
bits
.
miss
:=
io
.
dcache
.
resp
.
bits
.
miss
XSDebug
(
io
.
dcache
.
resp
.
fire
(),
p
"DcacheResp(l4): data:0x${Hexadecimal(io.dcache.resp.bits.data)} paddr:0x${Hexadecimal(io.dcache.resp.bits.meta.paddr)} pc:0x${Hexadecimal(io.dcache.resp.bits.meta.uop.cf.pc)} roqIdx:${io.dcache.resp.bits.meta.uop.roqIdx} lsroqIdx:${io.dcache.resp.bits.meta.uop.lsroqIdx} miss:${io.dcache.resp.bits.miss}\n"
)
}
.
otherwise
{
l4_out
.
bits
:=
l4_bundle
}
...
...
@@ -194,13 +197,13 @@ class LoadUnit extends XSModule {
PipelineConnect
(
l4_out
,
l5_in
,
io
.
ldout
.
fire
()
||
(
l5_in
.
bits
.
miss
||
l5_in
.
bits
.
mmio
)
&&
l5_in
.
valid
,
false
.
B
)
XSDebug
(
l4_valid
,
"l4:
pc 0x%x addr 0x%x -> 0x%x op %b data 0x%x mask %x forwardData: 0x%x forwardMask: %x dcache %b mmio %b
\n"
,
l4_out
.
bits
.
uop
.
cf
.
pc
,
l4_out
.
bits
.
vaddr
,
l4_out
.
bits
.
paddr
,
XSDebug
(
l4_valid
,
"l4:
out.valid:%d pc 0x%x addr 0x%x -> 0x%x op %b data 0x%x mask %x forwardData: 0x%x forwardMask: %x dcache %b mmio %b miss:%d
\n"
,
l4_out
.
valid
,
l4_out
.
bits
.
uop
.
cf
.
pc
,
l4_out
.
bits
.
vaddr
,
l4_out
.
bits
.
paddr
,
l4_out
.
bits
.
uop
.
ctrl
.
fuOpType
,
l4_out
.
bits
.
data
,
l4_out
.
bits
.
mask
,
l4_out
.
bits
.
forwardData
.
asUInt
,
l4_out
.
bits
.
forwardMask
.
asUInt
,
l4_dcache
,
l4_out
.
bits
.
mmio
)
l4_out
.
bits
.
forwardData
.
asUInt
,
l4_out
.
bits
.
forwardMask
.
asUInt
,
l4_dcache
,
l4_out
.
bits
.
mmio
,
l4_out
.
bits
.
miss
)
XSDebug
(
l5_in
.
valid
,
"L5: pc 0x%x addr 0x%x -> 0x%x op %b data 0x%x mask %x forwardData: 0x%x forwardMask: %x\n"
,
l5_in
.
bits
.
uop
.
cf
.
pc
,
l5_in
.
bits
.
vaddr
,
l5_in
.
bits
.
paddr
,
XSDebug
(
l5_in
.
valid
,
"L5
(%d %d)
: pc 0x%x addr 0x%x -> 0x%x op %b data 0x%x mask %x forwardData: 0x%x forwardMask: %x\n"
,
l5_in
.
valid
,
l5_in
.
ready
,
l5_in
.
bits
.
uop
.
cf
.
pc
,
l5_in
.
bits
.
vaddr
,
l5_in
.
bits
.
paddr
,
l5_in
.
bits
.
uop
.
ctrl
.
fuOpType
,
l5_in
.
bits
.
data
,
l5_in
.
bits
.
mask
,
l5_in
.
bits
.
forwardData
.
asUInt
,
l5_in
.
bits
.
forwardMask
.
asUInt
)
...
...
@@ -210,7 +213,7 @@ class LoadUnit extends XSModule {
XSDebug
(
l4_valid
,
"l4: lsroq forwardData: 0x%x forwardMask: %x\n"
,
io
.
lsroq
.
forward
.
forwardData
.
asUInt
,
io
.
lsroq
.
forward
.
forwardMask
.
asUInt
)
XSDebug
(
io
.
redirect
.
valid
,
p
"Redirect: excp:${io.redirect.bits.isException} misp:${io.redirect.bits.isMisPred} replay:${io.redirect.bits.isReplay} pc:0x${Hexadecimal(io.redirect.bits.pc)} target:0x${Hexadecimal(io.redirect.bits.target)} brTag:${io.redirect.bits.brTag} l2:${io.ldin.bits.uop.needFlush(io.redirect)} l3:${l3_uop.needFlush(io.redirect)} l4:${l4_out.bits.uop.needFlush(io.redirect)}\n"
)
//-------------------------------------------------------
// LD Pipeline Stage 5
// Do data ecc check, merge result and write back to LS ROQ
...
...
src/main/scala/xiangshan/mem/Lsroq.scala
浏览文件 @
9dc54045
...
...
@@ -201,11 +201,11 @@ class Lsroq extends XSModule {
}
when
(
io
.
dcache
.
req
.
fire
()){
XSDebug
(
"miss req: pc
%x addr %x\n"
,
uop
(
missRefillSel
).
cf
.
pc
,
io
.
dcache
.
req
.
bits
.
addr
)
XSDebug
(
"miss req: pc
:0x%x roqIdx:%d lsroqIdx:%d (p)addr:0x%x vaddr:0x%x\n"
,
io
.
dcache
.
req
.
bits
.
meta
.
uop
.
cf
.
pc
,
io
.
dcache
.
req
.
bits
.
meta
.
uop
.
roqIdx
,
io
.
dcache
.
req
.
bits
.
meta
.
uop
.
lsroqIdx
,
io
.
dcache
.
req
.
bits
.
addr
,
io
.
dcache
.
req
.
bits
.
meta
.
v
addr
)
}
when
(
io
.
dcache
.
resp
.
fire
()){
XSDebug
(
"miss resp:
addr %x data %x\n"
,
io
.
dcache
.
resp
.
bits
.
meta
.
paddr
,
io
.
dcache
.
resp
.
bits
.
data
)
XSDebug
(
"miss resp:
pc:0x%x roqIdx:%d lsroqIdx:%d (p)addr:0x%x data %x\n"
,
io
.
dcache
.
resp
.
bits
.
meta
.
uop
.
cf
.
pc
,
io
.
dcache
.
resp
.
bits
.
meta
.
uop
.
roqIdx
,
io
.
dcache
.
resp
.
bits
.
meta
.
uop
.
lsroqIdx
,
io
.
dcache
.
resp
.
bits
.
meta
.
paddr
,
io
.
dcache
.
resp
.
bits
.
data
)
}
// get load result from refill resp
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录