Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenXiangShan
XiangShan
提交
bbd262ad
X
XiangShan
项目概览
OpenXiangShan
/
XiangShan
9 个月 前同步成功
通知
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 搜索 >>
提交
bbd262ad
编写于
2月 01, 2021
作者:
L
LinJiawei
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Backend: delay all flushes for 1 cycle
上级
cea0b79d
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
15 addition
and
14 deletion
+15
-14
src/main/scala/xiangshan/backend/CtrlBlock.scala
src/main/scala/xiangshan/backend/CtrlBlock.scala
+14
-13
src/main/scala/xiangshan/backend/roq/Roq.scala
src/main/scala/xiangshan/backend/roq/Roq.scala
+1
-1
未找到文件。
src/main/scala/xiangshan/backend/CtrlBlock.scala
浏览文件 @
bbd262ad
...
...
@@ -213,13 +213,14 @@ class CtrlBlock extends XSModule with HasCircularQueuePtrHelper {
val
backendRedirect
=
redirectGen
.
io
.
stage2Redirect
val
frontendRedirect
=
redirectGen
.
io
.
stage3Redirect
val
flush
=
roq
.
io
.
flushOut
.
valid
val
flushReg
=
RegNext
(
flush
)
redirectGen
.
io
.
exuMispredict
.
zip
(
io
.
fromIntBlock
.
exuRedirect
).
map
({
case
(
x
,
y
)
=>
x
.
valid
:=
y
.
valid
&&
y
.
bits
.
redirect
.
cfiUpdate
.
isMisPred
x
.
bits
:=
y
.
bits
})
redirectGen
.
io
.
loadRelay
:=
io
.
fromLsBlock
.
replay
redirectGen
.
io
.
flush
:=
flush
redirectGen
.
io
.
flush
:=
flush
Reg
ftq
.
io
.
enq
<>
io
.
frontend
.
fetchInfo
for
(
i
<-
0
until
CommitWidth
){
...
...
@@ -227,9 +228,9 @@ class CtrlBlock extends XSModule with HasCircularQueuePtrHelper {
ftq
.
io
.
roq_commits
(
i
).
bits
:=
roq
.
io
.
commits
.
info
(
i
)
}
ftq
.
io
.
redirect
<>
backendRedirect
ftq
.
io
.
flush
:=
flush
ftq
.
io
.
flushIdx
:=
roq
.
io
.
flushOut
.
bits
.
ftqIdx
ftq
.
io
.
flushOffset
:=
roq
.
io
.
flushOut
.
bits
.
ftqOffset
ftq
.
io
.
flush
:=
flush
Reg
ftq
.
io
.
flushIdx
:=
RegNext
(
roq
.
io
.
flushOut
.
bits
.
ftqIdx
)
ftq
.
io
.
flushOffset
:=
RegNext
(
roq
.
io
.
flushOut
.
bits
.
ftqOffset
)
ftq
.
io
.
frontendRedirect
<>
frontendRedirect
ftq
.
io
.
exuWriteback
<>
io
.
fromIntBlock
.
exuRedirect
...
...
@@ -242,7 +243,7 @@ class CtrlBlock extends XSModule with HasCircularQueuePtrHelper {
)
val
flushRedirect
=
Wire
(
Valid
(
new
Redirect
))
flushRedirect
.
valid
:=
RegNext
(
flush
)
flushRedirect
.
valid
:=
flushReg
flushRedirect
.
bits
:=
DontCare
flushRedirect
.
bits
.
ftqIdx
:=
RegEnable
(
roq
.
io
.
flushOut
.
bits
.
ftqIdx
,
flush
)
flushRedirect
.
bits
.
interrupt
:=
true
.
B
...
...
@@ -270,17 +271,17 @@ class CtrlBlock extends XSModule with HasCircularQueuePtrHelper {
// pipeline between decode and dispatch
for
(
i
<-
0
until
RenameWidth
)
{
PipelineConnect
(
decode
.
io
.
out
(
i
),
rename
.
io
.
in
(
i
),
rename
.
io
.
in
(
i
).
ready
,
backendRedirect
.
valid
||
flush
||
io
.
frontend
.
redirect_cfiUpdate
.
valid
)
io
.
frontend
.
redirect_cfiUpdate
.
valid
)
}
rename
.
io
.
redirect
<>
backendRedirect
rename
.
io
.
flush
:=
RegNext
(
flush
)
rename
.
io
.
flush
:=
flushReg
rename
.
io
.
roqCommits
<>
roq
.
io
.
commits
rename
.
io
.
out
<>
dispatch
.
io
.
fromRename
rename
.
io
.
renameBypass
<>
dispatch
.
io
.
renameBypass
dispatch
.
io
.
redirect
<>
backendRedirect
dispatch
.
io
.
flush
:=
RegNext
(
flush
)
dispatch
.
io
.
flush
:=
flushReg
dispatch
.
io
.
enqRoq
<>
roq
.
io
.
enq
dispatch
.
io
.
enqLsq
<>
io
.
toLsBlock
.
enqLsq
dispatch
.
io
.
readIntRf
<>
io
.
toIntBlock
.
readRf
...
...
@@ -296,8 +297,8 @@ class CtrlBlock extends XSModule with HasCircularQueuePtrHelper {
// dispatch.io.enqIQData <> io.toIntBlock.enqIqData ++ io.toFpBlock.enqIqData ++ io.toLsBlock.enqIqData
fpBusyTable
.
io
.
flush
:=
RegNext
(
flush
)
intBusyTable
.
io
.
flush
:=
RegNext
(
flush
)
fpBusyTable
.
io
.
flush
:=
flushReg
intBusyTable
.
io
.
flush
:=
flushReg
for
((
wb
,
setPhyRegRdy
)
<-
io
.
fromIntBlock
.
wbRegs
.
zip
(
intBusyTable
.
io
.
wbPregs
)){
setPhyRegRdy
.
valid
:=
wb
.
valid
&&
wb
.
bits
.
uop
.
ctrl
.
rfWen
setPhyRegRdy
.
bits
:=
wb
.
bits
.
uop
.
pdest
...
...
@@ -320,11 +321,11 @@ class CtrlBlock extends XSModule with HasCircularQueuePtrHelper {
// TODO: is 'backendRedirect' necesscary?
io
.
toIntBlock
.
redirect
<>
backendRedirect
io
.
toIntBlock
.
flush
<>
RegNext
(
flush
)
io
.
toIntBlock
.
flush
<>
flushReg
io
.
toFpBlock
.
redirect
<>
backendRedirect
io
.
toFpBlock
.
flush
<>
RegNext
(
flush
)
io
.
toFpBlock
.
flush
<>
flushReg
io
.
toLsBlock
.
redirect
<>
backendRedirect
io
.
toLsBlock
.
flush
<>
RegNext
(
flush
)
io
.
toLsBlock
.
flush
<>
flushReg
if
(
env
.
DualCoreDifftest
)
{
difftestIO
.
fromRoq
<>
roq
.
difftestIO
...
...
src/main/scala/xiangshan/backend/roq/Roq.scala
浏览文件 @
bbd262ad
...
...
@@ -152,7 +152,7 @@ class RoqEnqPtrWrapper extends XSModule with HasCircularQueuePtrHelper {
// enqueue
val
canAccept
=
io
.
allowEnqueue
&&
!
io
.
hasBlockBackward
val
dispatchNum
=
Mux
(
canAccept
,
PopCount
(
io
.
enq
),
0.
U
)
val
dispatchNum
=
Mux
(
canAccept
&&
!
RegNext
(
redirectOutValid
)
,
PopCount
(
io
.
enq
),
0.
U
)
when
(
redirectOutValid
)
{
enqPtr
:=
0.
U
.
asTypeOf
(
new
RoqPtr
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录