Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenXiangShan
XiangShan
提交
f1d78cf7
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 搜索 >>
提交
f1d78cf7
编写于
9月 20, 2022
作者:
L
LinJiawei
提交者:
William Wang
1月 29, 2023
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
BOP: support only prefetch store
上级
0ce3de17
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
17 addition
and
8 deletion
+17
-8
src/main/scala/xiangshan/Bundle.scala
src/main/scala/xiangshan/Bundle.scala
+1
-0
src/main/scala/xiangshan/backend/MemBlock.scala
src/main/scala/xiangshan/backend/MemBlock.scala
+1
-0
src/main/scala/xiangshan/backend/fu/CSR.scala
src/main/scala/xiangshan/backend/fu/CSR.scala
+10
-8
src/main/scala/xiangshan/cache/dcache/DCacheWrapper.scala
src/main/scala/xiangshan/cache/dcache/DCacheWrapper.scala
+2
-0
src/main/scala/xiangshan/cache/dcache/mainpipe/MissQueue.scala
...ain/scala/xiangshan/cache/dcache/mainpipe/MissQueue.scala
+3
-0
未找到文件。
src/main/scala/xiangshan/Bundle.scala
浏览文件 @
f1d78cf7
...
...
@@ -483,6 +483,7 @@ class CustomCSRCtrlIO(implicit p: Parameters) extends XSBundle {
val
l1D_pf_enable_pht
=
Output
(
Bool
())
val
l1D_pf_active_threshold
=
Output
(
UInt
(
4.
W
))
val
l1D_pf_active_stride
=
Output
(
UInt
(
6.
W
))
val
l2_pf_store_only
=
Output
(
Bool
())
// ICache
val
icache_parity_enable
=
Output
(
Bool
())
// Labeled XiangShan
...
...
src/main/scala/xiangshan/backend/MemBlock.scala
浏览文件 @
f1d78cf7
...
...
@@ -127,6 +127,7 @@ class MemBlockImp(outer: MemBlock) extends LazyModuleImp(outer)
val
csrCtrl
=
DelayN
(
io
.
csrCtrl
,
2
)
dcache
.
io
.
csr
.
distribute_csr
<>
csrCtrl
.
distribute_csr
dcache
.
io
.
l2_pf_store_only
:=
RegNext
(
io
.
csrCtrl
.
l2_pf_store_only
,
false
.
B
)
io
.
csrUpdate
:=
RegNext
(
dcache
.
io
.
csr
.
update
)
io
.
error
<>
RegNext
(
RegNext
(
dcache
.
io
.
error
))
when
(!
csrCtrl
.
cache_error_enable
){
...
...
src/main/scala/xiangshan/backend/fu/CSR.scala
浏览文件 @
f1d78cf7
...
...
@@ -491,14 +491,15 @@ class CSR(implicit p: Parameters) extends FunctionUnit with HasCSRConst with PMP
// spfctl Bit [15:10]: L1D prefetch active page stride
// turn off L2 BOP, turn on L1 SMS by default
val
spfctl
=
RegInit
(
UInt
(
XLEN
.
W
),
Seq
(
30
<<
10
,
// L1D active page stride [15:10]
12
<<
6
,
// L1D active page threshold [9:6]
0
<<
5
,
// L1D enable pht [5]
1
<<
4
,
// L1D enable agt [4]
0
<<
3
,
// L1D train on hit agt [3]
1
<<
2
,
// L1D pf enable [2]
0
<<
1
,
// L2 pf enable [1]
1
<<
0
,
// L1I pf enable [0]
0
<<
16
,
// L2 pf store only [16] init: false
30
<<
10
,
// L1D active page stride [15:10] init: 30
12
<<
6
,
// L1D active page threshold [9:6] init: 12
1
<<
5
,
// L1D enable pht [5] init: true
1
<<
4
,
// L1D enable agt [4] init: true
0
<<
3
,
// L1D train on hit [3] init: false
1
<<
2
,
// L1D pf enable [2] init: true
1
<<
1
,
// L2 pf enable [1] init: true
1
<<
0
,
// L1I pf enable [0] init: true
).
reduce
(
_
|
_
).
U
(
XLEN
.
W
))
csrio
.
customCtrl
.
l1I_pf_enable
:=
spfctl
(
0
)
csrio
.
customCtrl
.
l2_pf_enable
:=
spfctl
(
1
)
...
...
@@ -508,6 +509,7 @@ class CSR(implicit p: Parameters) extends FunctionUnit with HasCSRConst with PMP
csrio
.
customCtrl
.
l1D_pf_enable_pht
:=
spfctl
(
5
)
csrio
.
customCtrl
.
l1D_pf_active_threshold
:=
spfctl
(
9
,
6
)
csrio
.
customCtrl
.
l1D_pf_active_stride
:=
spfctl
(
15
,
10
)
csrio
.
customCtrl
.
l2_pf_store_only
:=
spfctl
(
16
)
// sfetchctl Bit 0: L1I Cache Parity check enable
val
sfetchctl
=
RegInit
(
UInt
(
XLEN
.
W
),
"b0"
.
U
)
...
...
src/main/scala/xiangshan/cache/dcache/DCacheWrapper.scala
浏览文件 @
f1d78cf7
...
...
@@ -646,6 +646,7 @@ class DCacheToLsuIO(implicit p: Parameters) extends DCacheBundle {
class
DCacheIO
(
implicit
p
:
Parameters
)
extends
DCacheBundle
{
val
hartId
=
Input
(
UInt
(
8.
W
))
val
l2_pf_store_only
=
Input
(
Bool
())
val
lsu
=
new
DCacheToLsuIO
val
csr
=
new
L1CacheToCsrIO
val
error
=
new
L1CacheErrorInfo
...
...
@@ -710,6 +711,7 @@ class DCacheImp(outer: DCache) extends LazyModuleImp(outer) with HasDCacheParame
val
wb
=
Module
(
new
WritebackQueue
(
edge
))
missQueue
.
io
.
hartId
:=
io
.
hartId
missQueue
.
io
.
l2_pf_store_only
:=
RegNext
(
io
.
l2_pf_store_only
,
false
.
B
)
val
errors
=
ldu
.
map
(
_
.
io
.
error
)
++
// load error
Seq
(
mainPipe
.
io
.
error
)
// store / misc error
...
...
src/main/scala/xiangshan/cache/dcache/mainpipe/MissQueue.scala
浏览文件 @
f1d78cf7
...
...
@@ -167,6 +167,7 @@ class MissEntry(edge: TLEdgeOut)(implicit p: Parameters) extends DCacheModule {
val
req_handled_by_this_entry
=
Output
(
Bool
())
val
forwardInfo
=
Output
(
new
MissEntryForwardIO
)
val
l2_pf_store_only
=
Input
(
Bool
())
})
assert
(!
RegNext
(
io
.
primary_valid
&&
!
io
.
primary_ready
))
...
...
@@ -611,6 +612,7 @@ class MissQueue(edge: TLEdgeOut)(implicit p: Parameters) extends DCacheModule wi
// forward missqueue
val
forward
=
Vec
(
LoadPipelineWidth
,
new
LduToMissqueueForwardIO
)
val
l2_pf_store_only
=
Input
(
Bool
())
})
// 128KBL1: FIXME: provide vaddr for l2
...
...
@@ -677,6 +679,7 @@ class MissQueue(edge: TLEdgeOut)(implicit p: Parameters) extends DCacheModule wi
e
.
io
.
hartId
:=
io
.
hartId
e
.
io
.
id
:=
i
.
U
e
.
io
.
l2_pf_store_only
:=
io
.
l2_pf_store_only
e
.
io
.
req
.
valid
:=
io
.
req
.
valid
e
.
io
.
primary_valid
:=
io
.
req
.
valid
&&
!
merge
&&
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录