Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenXiangShan
XiangShan
提交
4e3ce935
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 搜索 >>
未验证
提交
4e3ce935
编写于
3月 22, 2021
作者:
L
ljw
提交者:
GitHub
3月 22, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Beu: separate l1plus and icache (#705)
上级
6d78a15a
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
13 addition
and
15 deletion
+13
-15
src/main/scala/system/SoC.scala
src/main/scala/system/SoC.scala
+4
-0
src/main/scala/top/Top.scala
src/main/scala/top/Top.scala
+3
-1
src/main/scala/xiangshan/XSCore.scala
src/main/scala/xiangshan/XSCore.scala
+3
-11
src/main/scala/xiangshan/cache/L1plusCache.scala
src/main/scala/xiangshan/cache/L1plusCache.scala
+1
-1
src/main/scala/xiangshan/frontend/Frontend.scala
src/main/scala/xiangshan/frontend/Frontend.scala
+2
-2
未找到文件。
src/main/scala/system/SoC.scala
浏览文件 @
4e3ce935
...
...
@@ -45,6 +45,7 @@ class L1CacheErrorInfo extends XSBundle{
class
XSL1BusErrors
(
val
nCores
:
Int
)
extends
BusErrors
{
val
icache
=
Vec
(
nCores
,
new
L1CacheErrorInfo
)
val
l1plus
=
Vec
(
nCores
,
new
L1CacheErrorInfo
)
val
dcache
=
Vec
(
nCores
,
new
L1CacheErrorInfo
)
override
def
toErrorList
:
List
[
Option
[(
ValidIO
[
UInt
]
,
String
,
String
)]]
=
...
...
@@ -52,6 +53,8 @@ class XSL1BusErrors(val nCores: Int) extends BusErrors {
List
(
Some
(
icache
(
i
).
paddr
,
s
"IBUS_$i"
,
s
"Icache_$i bus error"
),
Some
(
icache
(
i
).
ecc_error
,
s
"I_ECC_$i"
,
s
"Icache_$i ecc error"
),
Some
(
l1plus
(
i
).
paddr
,
s
"L1PLUS_$i"
,
s
"L1PLUS_$i bus error"
),
Some
(
l1plus
(
i
).
ecc_error
,
s
"L1PLUS_ECC_$i"
,
s
"L1PLUS_$i ecc error"
),
Some
(
dcache
(
i
).
paddr
,
s
"DBUS_$i"
,
s
"Dcache_$i bus error"
),
Some
(
dcache
(
i
).
ecc_error
,
s
"D_ECC_$i"
,
s
"Dcache_$i ecc error"
)
)
...
...
@@ -210,6 +213,7 @@ class XSSoc()(implicit p: Parameters) extends LazyModule with HasSoCParameter {
xs_core
(
i
).
module
.
io
.
hartId
:=
i
.
U
xs_core
(
i
).
module
.
io
.
externalInterrupt
.
mtip
:=
clint
.
module
.
io
.
mtip
(
i
)
xs_core
(
i
).
module
.
io
.
externalInterrupt
.
msip
:=
clint
.
module
.
io
.
msip
(
i
)
beu
.
module
.
io
.
errors
.
l1plus
(
i
)
:=
RegNext
(
xs_core
(
i
).
module
.
io
.
l1plus_error
)
beu
.
module
.
io
.
errors
.
icache
(
i
)
:=
RegNext
(
xs_core
(
i
).
module
.
io
.
icache_error
)
beu
.
module
.
io
.
errors
.
dcache
(
i
)
:=
RegNext
(
xs_core
(
i
).
module
.
io
.
dcache_error
)
// xs_core(i).module.io.externalInterrupt.meip := RegNext(RegNext(io.meip(i)))
...
...
src/main/scala/top/Top.scala
浏览文件 @
4e3ce935
...
...
@@ -52,13 +52,14 @@ class XSCoreWithL2Imp(outer: XSCoreWithL2) extends LazyModuleImp(outer)
val
io
=
IO
(
new
Bundle
{
val
hartId
=
Input
(
UInt
(
64.
W
))
val
externalInterrupt
=
new
ExternalInterruptIO
val
icache_error
,
dcache_error
=
new
L1CacheErrorInfo
val
l1plus_error
,
icache_error
,
dcache_error
=
new
L1CacheErrorInfo
})
outer
.
core
.
module
.
io
.
hartId
:=
io
.
hartId
outer
.
core
.
module
.
io
.
externalInterrupt
:=
io
.
externalInterrupt
outer
.
l2prefetcher
.
module
.
io
.
enable
:=
RegNext
(
outer
.
core
.
module
.
io
.
l2_pf_enable
)
outer
.
l2prefetcher
.
module
.
io
.
in
<>
outer
.
l2cache
.
module
.
io
io
.
l1plus_error
<>
outer
.
core
.
module
.
io
.
l1plus_error
io
.
icache_error
<>
outer
.
core
.
module
.
io
.
icache_error
io
.
dcache_error
<>
outer
.
core
.
module
.
io
.
dcache_error
}
...
...
@@ -244,6 +245,7 @@ class XSTop()(implicit p: config.Parameters) extends BaseXSSoc()
core_with_l2
(
i
).
module
.
io
.
externalInterrupt
.
mtip
:=
clint
.
module
.
io
.
mtip
(
i
)
core_with_l2
(
i
).
module
.
io
.
externalInterrupt
.
msip
:=
clint
.
module
.
io
.
msip
(
i
)
core_with_l2
(
i
).
module
.
io
.
externalInterrupt
.
meip
:=
plic
.
module
.
io
.
extra
.
get
.
meip
(
i
)
beu
.
module
.
io
.
errors
.
l1plus
(
i
)
:=
RegNext
(
core_with_l2
(
i
).
module
.
io
.
l1plus_error
)
beu
.
module
.
io
.
errors
.
icache
(
i
)
:=
RegNext
(
core_with_l2
(
i
).
module
.
io
.
icache_error
)
beu
.
module
.
io
.
errors
.
dcache
(
i
)
:=
RegNext
(
core_with_l2
(
i
).
module
.
io
.
dcache_error
)
}
...
...
src/main/scala/xiangshan/XSCore.scala
浏览文件 @
4e3ce935
...
...
@@ -340,7 +340,7 @@ class XSCoreImp(outer: XSCore) extends LazyModuleImp(outer)
val
hartId
=
Input
(
UInt
(
64.
W
))
val
externalInterrupt
=
new
ExternalInterruptIO
val
l2_pf_enable
=
Output
(
Bool
())
val
icache_error
,
dcache_error
=
Output
(
new
L1CacheErrorInfo
)
val
l1plus_error
,
icache_error
,
dcache_error
=
Output
(
new
L1CacheErrorInfo
)
})
val
difftestIO
=
IO
(
new
DifftestBundle
())
...
...
@@ -377,16 +377,8 @@ class XSCoreImp(outer: XSCore) extends LazyModuleImp(outer)
val
l1pluscache
=
outer
.
l1pluscache
.
module
val
ptw
=
outer
.
ptw
.
module
//TODO: connect these signals
def
errorOR
(
src1
:
L1CacheErrorInfo
,
src2
:
L1CacheErrorInfo
)
:
L1CacheErrorInfo
=
{
val
out
=
Wire
(
new
L1CacheErrorInfo
)
out
.
ecc_error
.
valid
:=
src1
.
ecc_error
.
valid
||
src2
.
ecc_error
.
valid
out
.
ecc_error
.
bits
:=
true
.
B
out
.
paddr
.
valid
:=
out
.
ecc_error
.
valid
out
.
paddr
.
bits
:=
Mux
(
src1
.
ecc_error
.
valid
,
src1
.
paddr
.
bits
,
src2
.
paddr
.
bits
)
out
}
io
.
icache_error
<>
errorOR
(
src1
=
frontend
.
io
.
error
,
src2
=
l1pluscache
.
io
.
error
)
io
.
l1plus_error
<>
l1pluscache
.
io
.
error
io
.
icache_error
<>
frontend
.
io
.
error
io
.
dcache_error
<>
memBlock
.
io
.
error
frontend
.
io
.
backend
<>
ctrlBlock
.
io
.
frontend
...
...
src/main/scala/xiangshan/cache/L1plusCache.scala
浏览文件 @
4e3ce935
...
...
@@ -408,7 +408,7 @@ class L1plusCacheImp(outer: L1plusCache) extends LazyModuleImp(outer) with HasL1
// response
io
.
resp
<>
resp_arb
.
io
.
out
io
.
error
<>
pipe
.
io
.
error
io
.
error
<>
RegNext
(
pipe
.
io
.
error
)
resp_arb
.
io
.
in
(
0
)
<>
pipe
.
io
.
resp
resp_arb
.
io
.
in
(
1
)
<>
missQueue
.
io
.
resp
...
...
src/main/scala/xiangshan/frontend/Frontend.scala
浏览文件 @
4e3ce935
...
...
@@ -96,7 +96,7 @@ class FrontendImp (outer: Frontend) extends LazyModuleImp(outer)
// ifu to backend
io
.
backend
.
fetchInfo
<>
ifu
.
io
.
toFtq
io
.
error
<>
ifu
.
io
.
error
io
.
error
<>
RegNext
(
ifu
.
io
.
error
)
// for(out <- ibuffer.io.out){
// XSInfo(out.fire(),
...
...
@@ -106,4 +106,4 @@ class FrontendImp (outer: Frontend) extends LazyModuleImp(outer)
val
frontendBubble
=
PopCount
((
0
until
DecodeWidth
).
map
(
i
=>
io
.
backend
.
cfVec
(
i
).
ready
&&
!
ibuffer
.
io
.
out
(
i
).
valid
))
XSPerf
(
"FrontendBubble"
,
frontendBubble
)
}
\ No newline at end of file
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录