Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenXiangShan
XiangShan
提交
20acd4ae
X
XiangShan
项目概览
OpenXiangShan
/
XiangShan
10 个月 前同步成功
通知
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,体验更适合开发者的 AI 搜索 >>
提交
20acd4ae
编写于
9月 19, 2021
作者:
Y
YikeZhou
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
backend, freelist: remove unused log & assertions
上级
8949e3b0
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
0 addition
and
67 deletion
+0
-67
src/main/scala/xiangshan/backend/rename/freelist/MEFreeList.scala
.../scala/xiangshan/backend/rename/freelist/MEFreeList.scala
+0
-67
未找到文件。
src/main/scala/xiangshan/backend/rename/freelist/MEFreeList.scala
浏览文件 @
20acd4ae
...
...
@@ -271,71 +271,4 @@ class MEFreeList(implicit val p: config.Parameters) extends MultiIOModule with M
archRefCounter
(
i
)
:=
Mux
(
clearArchRefCounter
(
i
),
0.
U
,
Mux
(
updateArchRefCounter
(
i
),
archRefCounterNext
(
i
),
archRefCounter
(
i
)
))
cmtCounter
(
i
)
:=
Mux
(
clearCmtCounter
(
i
),
0.
U
,
Mux
(
updateCmtCounter
(
i
),
cmtCounterNext
(
i
),
cmtCounter
(
i
)
))
}
/*
Re-direct: restore by walking, handled by rename using `dec` port
*/
/*
Debug Info
*/
for
(
i
<-
0
until
NRPhyRegs
)
{
XSDebug
(
specRefCounter
(
i
)
=/=
0.
U
||
archRefCounter
(
i
)
=/=
0.
U
||
cmtCounter
(
i
)
=/=
0.
U
,
p
"preg[$i] specRefCounter:${specRefCounter(i)} archRefCounter:${archRefCounter(i)} cmtCounter:${cmtCounter(i)}\n"
)
XSDebug
(
specRefCounter
(
i
)
=/=
0.
U
||
archRefCounter
(
i
)
=/=
0.
U
||
cmtCounter
(
i
)
=/=
0.
U
,
p
"preg[$i] specRefCounterNext:${specRefCounterNext(i)} archRefCounterNext:${archRefCounterNext(i)} cmtCounterNext:${cmtCounterNext(i)}\n"
)
// specRefCounter(i) must >= cmtCounter(i)
XSError
(
specRefCounter
(
i
)
<
cmtCounter
(
i
),
p
"Commits Overflow of preg${i}"
)
}
XSDebug
(
Array
.
range
(
0
,
MEFreeListSize
).
map
(
x
=>
x
.
toString
()).
mkString
(
"Free List (idx): "
,
"\t"
,
"\n"
))
XSDebug
(
p
"Free List (val): "
+
Array
.
range
(
0
,
MEFreeListSize
).
map
(
x
=>
p
"${freeList(x)}\t"
).
reduceLeft
(
_
+
_
)
+
"\n"
)
XSDebug
(
p
"head:$headPtr tail:$tailPtr headPtrNext:$headPtrNext tailPtrNext:$tailPtrNext freeRegCnt:$freeRegCnt\n"
)
XSDebug
(
p
"flush ${flush} redirect ${redirect} walk ${walk}\n"
)
XSDebug
(
PopCount
(
freeReq
)
=/=
PopCount
(
freeVec
),
p
"WARNING: Please check DEC requirement\n"
)
XSDebug
(
PopCount
(
allocateReq
)
=/=
PopCount
(
needAllocatingVec
),
p
"WARNING: Please check INC requirement\n"
)
/*
Assertions
*/
val
enableFreeListCheck
=
false
if
(
enableFreeListCheck
)
{
for
(
i
<-
0
until
RenameWidth
)
{
for
(
j
<-
(
i
+
1
)
until
RenameWidth
)
{
XSError
(
needAllocatingVec
(
i
)
&&
needAllocatingVec
(
j
)
&&
allocatePhyReg
(
i
)
===
allocatePhyReg
(
j
),
p
"Duplicate INC requirements detected!"
+
allocatePhyReg
.
zipWithIndex
.
map
{
case
(
p
,
idx
)
=>
p
" ($idx):$p"
}.
reduceLeft
(
_
+
_
)
+
"\n"
)
XSError
(
allocateReq
(
i
)
&&
allocateReq
(
j
)
&&
canAllocate
&&
doAllocate
&&
psrcOfMove
(
i
).
valid
&&
psrcOfMove
(
j
).
valid
&&
psrcOfMove
(
i
).
bits
===
psrcOfMove
(
j
).
bits
,
p
"Duplicate ME requirements detected! Cannot inc same specRefCount in 1 cycle!\n"
)
}
// also, we cannot count ref numbers more than 3 (which is very rare)
XSError
(
needAllocatingVec
(
i
)
&&
!
psrcOfMove
(
i
).
valid
&&
specRefCounter
(
allocatePhyReg
(
i
)).
andR
(),
p
"(norm) Exceeding specRefCounter Max Value: preg[${allocatePhyReg(i)}]\n"
)
XSError
(
allocateReq
(
i
)
&&
canAllocate
&&
doAllocate
&&
psrcOfMove
(
i
).
valid
&&
specRefCounter
(
psrcOfMove
(
i
).
bits
).
andR
(),
p
"(move) Exceeding specRefCounter Max Value: preg[${psrcOfMove(i).bits}]\n"
)
}
for
(
i
<-
0
until
CommitWidth
)
{
// we cannot handle duplicate inc/dec requirements on a preg in 1 cycle for now
for
(
j
<-
(
i
+
1
)
until
CommitWidth
)
{
XSInfo
(
freeReq
(
i
)
&&
freeReq
(
j
)
&&
freePhyReg
(
i
)
===
freePhyReg
(
j
),
p
"Duplicate DEC requirements detected!"
+
freePhyReg
.
zipWithIndex
.
map
{
case
(
p
,
idx
)
=>
p
" ($idx):$p"
}.
reduceLeft
(
_
+
_
)
+
"\n"
)
XSInfo
(
freeReq
(
i
)
&&
freeReq
(
j
)
&&
eliminatedMove
(
i
)
&&
eliminatedMove
(
j
)
&&
multiRefPhyReg
(
i
)
===
multiRefPhyReg
(
j
),
p
"Duplicate INC requirements on archRefCount detected!"
+
multiRefPhyReg
.
zipWithIndex
.
map
{
case
(
p
,
idx
)
=>
p
" ($idx):$p"
}.
reduceLeft
(
_
+
_
)
+
"\n"
)
XSError
(
freeVec
(
i
)
&&
freeVec
(
j
)
&&
freePhyReg
(
i
)
===
freePhyReg
(
j
),
"Fatal Error: free 1 reg 2 times in 1 cycle!\n"
)
}
// not inc and dec same reg in 1 cycle
for
(
j
<-
0
until
RenameWidth
)
{
XSDebug
(
allocateReq
(
j
)
&&
canAllocate
&&
doAllocate
&&
psrcOfMove
(
j
).
valid
&&
!
redirect
&&
!
walk
&&
freeReq
(
i
)
&&
freePhyReg
(
i
)
===
allocatePhyReg
(
j
),
p
"INC and DEC Conflict Detected! inc($j): preg ${allocatePhyReg(j)}, dec($i): preg ${freePhyReg(i)}\n"
)
}
}
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录