Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenXiangShan
XiangShan
提交
a8fa6bb0
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 搜索 >>
提交
a8fa6bb0
编写于
11月 16, 2020
作者:
W
William Wang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
LSQ: opt lsIdx allocate timing
上级
d7136c3e
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
12 addition
and
6 deletion
+12
-6
src/main/scala/xiangshan/mem/lsqueue/separated/LSQWrapper.scala
...in/scala/xiangshan/mem/lsqueue/separated/LSQWrapper.scala
+4
-3
src/main/scala/xiangshan/mem/lsqueue/separated/LoadQueue.scala
...ain/scala/xiangshan/mem/lsqueue/separated/LoadQueue.scala
+4
-1
src/main/scala/xiangshan/mem/lsqueue/separated/StoreQueue.scala
...in/scala/xiangshan/mem/lsqueue/separated/StoreQueue.scala
+4
-1
src/main/scala/xiangshan/mem/lsqueue/unified/Lsroq.scala
src/main/scala/xiangshan/mem/lsqueue/unified/Lsroq.scala
+0
-1
未找到文件。
src/main/scala/xiangshan/mem/lsqueue/separated/LSQWrapper.scala
浏览文件 @
a8fa6bb0
...
...
@@ -139,11 +139,12 @@ class LsqWrappper extends XSModule with HasDCacheParameters {
// fix valid, allocate lq / sq index
(
0
until
RenameWidth
).
map
(
i
=>
{
val
isStore
=
CommitType
.
lsInstIsStore
(
io
.
dp1Req
(
i
).
bits
.
ctrl
.
commitType
)
val
prevCanIn
=
if
(
i
==
0
)
true
.
B
else
Cat
((
0
until
i
).
map
(
i
=>
io
.
dp1Req
(
i
).
ready
)).
andR
loadQueue
.
io
.
dp1Req
(
i
).
valid
:=
!
isStore
&&
io
.
dp1Req
(
i
).
valid
&&
prevCanIn
storeQueue
.
io
.
dp1Req
(
i
).
valid
:=
isStore
&&
io
.
dp1Req
(
i
).
valid
&&
prevCanIn
loadQueue
.
io
.
dp1Req
(
i
).
valid
:=
!
isStore
&&
io
.
dp1Req
(
i
).
valid
storeQueue
.
io
.
dp1Req
(
i
).
valid
:=
isStore
&&
io
.
dp1Req
(
i
).
valid
loadQueue
.
io
.
lqIdxs
(
i
)
<>
io
.
lsIdxs
(
i
).
lqIdx
storeQueue
.
io
.
sqIdxs
(
i
)
<>
io
.
lsIdxs
(
i
).
sqIdx
loadQueue
.
io
.
lqReady
<>
storeQueue
.
io
.
lqReady
loadQueue
.
io
.
sqReady
<>
storeQueue
.
io
.
sqReady
io
.
lsIdxs
(
i
).
lsroqIdx
:=
DontCare
io
.
dp1Req
(
i
).
ready
:=
storeQueue
.
io
.
dp1Req
(
i
).
ready
&&
loadQueue
.
io
.
dp1Req
(
i
).
ready
})
...
...
src/main/scala/xiangshan/mem/lsqueue/separated/LoadQueue.scala
浏览文件 @
a8fa6bb0
...
...
@@ -28,6 +28,8 @@ object LqPtr extends HasXSParameter {
class
LoadQueue
extends
XSModule
with
HasDCacheParameters
with
HasCircularQueuePtrHelper
{
val
io
=
IO
(
new
Bundle
()
{
val
dp1Req
=
Vec
(
RenameWidth
,
Flipped
(
DecoupledIO
(
new
MicroOp
)))
val
lqReady
=
Output
(
Vec
(
RenameWidth
,
Bool
()))
val
sqReady
=
Input
(
Vec
(
RenameWidth
,
Bool
()))
val
lqIdxs
=
Output
(
Vec
(
RenameWidth
,
new
LqPtr
))
// LSIdx will be assembled in LSQWrapper
val
brqRedirect
=
Input
(
Valid
(
new
Redirect
))
val
loadIn
=
Vec
(
LoadPipelineWidth
,
Flipped
(
Valid
(
new
LsPipelineBundle
)))
...
...
@@ -91,7 +93,8 @@ class LoadQueue extends XSModule with HasDCacheParameters with HasCircularQueueP
// data(index).bwdMask := 0.U(8.W).asBools
}
val
numTryEnqueue
=
offset
+&
io
.
dp1Req
(
i
).
valid
io
.
dp1Req
(
i
).
ready
:=
numTryEnqueue
<=
emptyEntries
io
.
lqReady
(
i
)
:=
numTryEnqueue
<=
emptyEntries
io
.
dp1Req
(
i
).
ready
:=
io
.
lqReady
(
i
)
&*
io
.
sqReady
(
i
)
io
.
lqIdxs
(
i
)
:=
lqIdx
XSDebug
(
false
,
true
.
B
,
"(%d, %d) "
,
io
.
dp1Req
(
i
).
ready
,
io
.
dp1Req
(
i
).
valid
)
}
...
...
src/main/scala/xiangshan/mem/lsqueue/separated/StoreQueue.scala
浏览文件 @
a8fa6bb0
...
...
@@ -25,6 +25,8 @@ object SqPtr extends HasXSParameter {
class
StoreQueue
extends
XSModule
with
HasDCacheParameters
with
HasCircularQueuePtrHelper
{
val
io
=
IO
(
new
Bundle
()
{
val
dp1Req
=
Vec
(
RenameWidth
,
Flipped
(
DecoupledIO
(
new
MicroOp
)))
val
lqReady
=
Input
(
Vec
(
RenameWidth
,
Bool
()))
val
sqReady
=
Output
(
Vec
(
RenameWidth
,
Bool
()))
val
sqIdxs
=
Output
(
Vec
(
RenameWidth
,
new
SqPtr
))
val
brqRedirect
=
Input
(
Valid
(
new
Redirect
))
val
storeIn
=
Vec
(
StorePipelineWidth
,
Flipped
(
Valid
(
new
LsPipelineBundle
)))
...
...
@@ -87,7 +89,8 @@ class StoreQueue extends XSModule with HasDCacheParameters with HasCircularQueue
// data(index).bwdMask := 0.U(8.W).asBools
}
val
numTryEnqueue
=
offset
+&
io
.
dp1Req
(
i
).
valid
io
.
dp1Req
(
i
).
ready
:=
numTryEnqueue
<=
emptyEntries
io
.
sqReady
(
i
)
:=
numTryEnqueue
<=
emptyEntries
io
.
dp1Req
(
i
).
ready
:=
io
.
lqReady
(
i
)
&&
io
.
sqReady
(
i
)
io
.
sqIdxs
(
i
)
:=
sqIdx
XSDebug
(
false
,
true
.
B
,
"(%d, %d) "
,
io
.
dp1Req
(
i
).
ready
,
io
.
dp1Req
(
i
).
valid
)
}
...
...
src/main/scala/xiangshan/mem/lsqueue/unified/Lsroq.scala
浏览文件 @
a8fa6bb0
...
...
@@ -13,7 +13,6 @@ import xiangshan.backend.roq.RoqPtr
class
LsRoqEntry
extends
XSBundle
{
val
vaddr
=
UInt
(
VAddrBits
.
W
)
// TODO: need opt
val
paddr
=
UInt
(
PAddrBits
.
W
)
val
op
=
UInt
(
6.
W
)
val
mask
=
UInt
(
8.
W
)
val
data
=
UInt
(
XLEN
.
W
)
val
exception
=
UInt
(
16.
W
)
// TODO: opt size
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录