Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenXiangShan
XiangShan
提交
c89ea98a
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 搜索 >>
提交
c89ea98a
编写于
3月 17, 2021
作者:
W
William Wang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
StoreSet: put LFST into dispatch1
* Future work: optimize timing
上级
28ca676d
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
43 addition
and
5 deletion
+43
-5
src/main/scala/xiangshan/backend/CtrlBlock.scala
src/main/scala/xiangshan/backend/CtrlBlock.scala
+2
-0
src/main/scala/xiangshan/backend/decode/StoreSet.scala
src/main/scala/xiangshan/backend/decode/StoreSet.scala
+9
-4
src/main/scala/xiangshan/backend/dispatch/Dispatch.scala
src/main/scala/xiangshan/backend/dispatch/Dispatch.scala
+7
-0
src/main/scala/xiangshan/backend/dispatch/Dispatch1.scala
src/main/scala/xiangshan/backend/dispatch/Dispatch1.scala
+25
-1
未找到文件。
src/main/scala/xiangshan/backend/CtrlBlock.scala
浏览文件 @
c89ea98a
...
...
@@ -355,6 +355,8 @@ class CtrlBlock extends XSModule with HasCircularQueuePtrHelper {
dispatch
.
io
.
numExist
<>
io
.
fromIntBlock
.
numExist
++
io
.
fromFpBlock
.
numExist
++
io
.
fromLsBlock
.
numExist
dispatch
.
io
.
enqIQCtrl
<>
io
.
toIntBlock
.
enqIqCtrl
++
io
.
toFpBlock
.
enqIqCtrl
++
io
.
toLsBlock
.
enqIqCtrl
// dispatch.io.enqIQData <> io.toIntBlock.enqIqData ++ io.toFpBlock.enqIqData ++ io.toLsBlock.enqIqData
dispatch
.
io
.
csrCtrl
<>
io
.
csrCtrl
dispatch
.
io
.
storeIssue
<>
io
.
fromLsBlock
.
stIn
fpBusyTable
.
io
.
flush
:=
flushReg
...
...
src/main/scala/xiangshan/backend/decode/StoreSet.scala
浏览文件 @
c89ea98a
...
...
@@ -137,12 +137,16 @@ class DispatchToLFST extends XSBundle {
val
ssid
=
UInt
(
SSIDWidth
.
W
)
}
class
LookupLFST
extends
XSBundle
{
val
raddr
=
Vec
(
DecodeWidth
,
Input
(
UInt
(
MemPredPCWidth
.
W
)))
// xor hashed decode pc(VaddrBits-1, 1)
val
ren
=
Vec
(
DecodeWidth
,
Input
(
Bool
()))
// ren iff uop.cf.storeSetHit
val
rdata
=
Vec
(
DecodeWidth
,
Output
(
Bool
()))
}
// Last Fetched Store Table
class
LFST
extends
XSModule
{
val
io
=
IO
(
new
Bundle
{
val
raddr
=
Vec
(
DecodeWidth
,
Input
(
UInt
(
MemPredPCWidth
.
W
)))
// xor hashed decode pc(VaddrBits-1, 1)
val
ren
=
Vec
(
DecodeWidth
,
Input
(
Bool
()))
// ren iff uop.cf.storeSetHit
val
rdata
=
Vec
(
DecodeWidth
,
Output
(
Bool
()))
val
lookup
=
new
LookupLFST
// val update = Input(new MemPredUpdateReq) // RegNext should be added outside
// when redirect, mark canceled store as invalid
val
redirect
=
Input
(
Valid
(
new
Redirect
))
...
...
@@ -161,7 +165,8 @@ class LFST extends XSModule {
// read LFST in rename stage
for
(
i
<-
0
until
DecodeWidth
)
{
io
.
rdata
(
i
)
:=
(
valid
(
io
.
raddr
(
i
))
&&
io
.
ren
(
i
)
||
io
.
csrCtrl
.
no_spec_load
)
&&
!
io
.
csrCtrl
.
lvpred_disable
io
.
lookup
.
rdata
(
i
)
:=
(
valid
(
io
.
lookup
.
raddr
(
i
))
&&
io
.
lookup
.
ren
(
i
)
||
io
.
csrCtrl
.
no_spec_load
)
&&
!
io
.
csrCtrl
.
lvpred_disable
}
// when store is dispatched, mark it as valid
...
...
src/main/scala/xiangshan/backend/dispatch/Dispatch.scala
浏览文件 @
c89ea98a
...
...
@@ -50,6 +50,9 @@ class Dispatch extends XSModule {
val
fpIndex
=
Vec
(
exuParameters
.
FpExuCnt
,
Output
(
UInt
(
log2Ceil
((
NRFpReadPorts
-
exuParameters
.
StuCnt
)
/
3
).
W
)))
// ls: hardwired to (0, 1, 2, 4)
}
val
csrCtrl
=
Input
(
new
CustomCSRCtrlIO
)
// LFST state sync
val
storeIssue
=
Vec
(
StorePipelineWidth
,
Flipped
(
Valid
(
new
ExuInput
)))
})
val
dispatch1
=
Module
(
new
Dispatch1
)
...
...
@@ -74,6 +77,10 @@ class Dispatch extends XSModule {
dispatch1
.
io
.
toFpDq
<>
fpDq
.
io
.
enq
dispatch1
.
io
.
toLsDq
<>
lsDq
.
io
.
enq
dispatch1
.
io
.
allocPregs
<>
io
.
allocPregs
dispatch1
.
io
.
csrCtrl
<>
io
.
csrCtrl
dispatch1
.
io
.
storeIssue
<>
io
.
storeIssue
dispatch1
.
io
.
redirect
<>
io
.
redirect
dispatch1
.
io
.
flush
<>
io
.
flush
// dispatch queue: queue uops and dispatch them to different reservation stations or issue queues
// it may cancel the uops
...
...
src/main/scala/xiangshan/backend/dispatch/Dispatch1.scala
浏览文件 @
c89ea98a
...
...
@@ -9,7 +9,7 @@ import xiangshan.backend.roq.{RoqPtr, RoqEnqIO}
import
xiangshan.backend.rename.RenameBypassInfo
import
xiangshan.mem.LsqEnqIO
import
xiangshan.backend.fu.HasExceptionNO
import
xiangshan.backend.decode.
DispatchToLFST
import
xiangshan.backend.decode.
{
LFST
,
DispatchToLFST
,
LookupLFST
}
class
PreDispatchInfo
extends
XSBundle
{
...
...
@@ -47,9 +47,28 @@ class Dispatch1 extends XSModule with HasExceptionNO {
}
// to store set LFST
val
lfst
=
Vec
(
RenameWidth
,
Valid
(
new
DispatchToLFST
))
// flush or replay, for LFST
val
redirect
=
Flipped
(
ValidIO
(
new
Redirect
))
val
flush
=
Input
(
Bool
())
// LFST ctrl
val
csrCtrl
=
Input
(
new
CustomCSRCtrlIO
)
// LFST state sync
val
storeIssue
=
Vec
(
StorePipelineWidth
,
Flipped
(
Valid
(
new
ExuInput
)))
})
/**
* Store set LFST lookup
*/
// store set LFST lookup may start from rename for better timing
val
lfst
=
Module
(
new
LFST
)
lfst
.
io
.
redirect
<>
io
.
redirect
lfst
.
io
.
flush
<>
io
.
flush
lfst
.
io
.
dispatch
:=
io
.
lfst
lfst
.
io
.
storeIssue
<>
io
.
storeIssue
lfst
.
io
.
csrCtrl
<>
io
.
csrCtrl
/**
* Part 1: choose the target dispatch queue and the corresponding write ports
*/
...
...
@@ -128,6 +147,11 @@ class Dispatch1 extends XSModule with HasExceptionNO {
updatedUop
(
i
).
lqIdx
:=
io
.
enqLsq
.
resp
(
i
).
lqIdx
updatedUop
(
i
).
sqIdx
:=
io
.
enqLsq
.
resp
(
i
).
sqIdx
// lookup store set LFST
lfst
.
io
.
lookup
.
raddr
(
i
)
:=
updatedUop
(
i
).
cf
.
ssid
lfst
.
io
.
lookup
.
ren
(
i
)
:=
updatedUop
(
i
).
cf
.
storeSetHit
updatedUop
(
i
).
cf
.
loadWaitBit
:=
lfst
.
io
.
lookup
.
rdata
(
i
)
// update store set LFST
io
.
lfst
(
i
).
valid
:=
io
.
fromRename
(
i
).
valid
&&
updatedUop
(
i
).
cf
.
storeSetHit
&&
isStore
(
i
)
// or io.fromRename(i).ready && updatedUop(i).cf.storeSetHit && isStore(i), which is much slower
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录