Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenXiangShan
XiangShan
比较版本
04ff7b10177051b4eaadc838a006c497d02978d1...b8bcc142afff3301369eaca6712b08d963a4e7d4
X
XiangShan
项目概览
OpenXiangShan
/
XiangShan
8 个月 前同步成功
通知
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 搜索 >>
源分支
b8bcc142afff3301369eaca6712b08d963a4e7d4
选择Git版本
...
目标分支
04ff7b10177051b4eaadc838a006c497d02978d1
选择Git版本
比较
Commits (9)
https://gitcode.net/OpenXiangShan/XiangShan/-/commit/633798ad6fa19dfc0f890212040e7b71223d30f8
Move core mbist intf in to XSCore
2023-08-16T13:57:20+08:00
梁森 Liang Sen
liangsen20z@ict.ac.cn
https://gitcode.net/OpenXiangShan/XiangShan/-/commit/53dd1e64a3d41397ef6ef722492e51813a48deb0
Enable cache controller
2023-08-22T14:27:15+08:00
梁森 Liang Sen
liangsen20z@ict.ac.cn
https://gitcode.net/OpenXiangShan/XiangShan/-/commit/69bb8e42f54f66af9c8ccc1261633bbf4cadab6f
Bump huancun
2023-08-29T12:12:23+08:00
梁森 Liang Sen
liangsen20z@ict.ac.cn
https://gitcode.net/OpenXiangShan/XiangShan/-/commit/4bd0456f281e64473d87180c5e21edb382b42272
Update Makefile
2023-08-31T15:00:44+08:00
梁森 Liang Sen
liangsen20z@ict.ac.cn
https://gitcode.net/OpenXiangShan/XiangShan/-/commit/28d33f180343c7fdfcb370d0fcdd3979cb26fdc6
Update Makefile
2023-08-31T15:09:22+08:00
梁森 Liang Sen
liangsen20z@ict.ac.cn
https://gitcode.net/OpenXiangShan/XiangShan/-/commit/d76baadfffbab4a2be6aac44bc105b59226723bc
Update Makefile
2023-08-31T15:16:26+08:00
梁森 Liang Sen
liangsen20z@ict.ac.cn
https://gitcode.net/OpenXiangShan/XiangShan/-/commit/d602ca4d4251022bce57ff7aa85dd5fa8f4dd303
Keep io signals from optimization
2023-08-31T15:52:39+08:00
梁森 Liang Sen
liangsen20z@ict.ac.cn
https://gitcode.net/OpenXiangShan/XiangShan/-/commit/453f212476b3807c581bae69c2f1a66dad480b0e
Update makefile
2023-09-01T10:48:36+08:00
梁森 Liang Sen
liangsen20z@ict.ac.cn
https://gitcode.net/OpenXiangShan/XiangShan/-/commit/b8bcc142afff3301369eaca6712b08d963a4e7d4
Update makefile
2023-09-04T15:56:03+08:00
梁森 Liang Sen
liangsen20z@ict.ac.cn
隐藏空白更改
内联
并排
Showing
6 changed file
with
57 addition
and
52 deletion
+57
-52
Makefile
Makefile
+26
-26
huancun
huancun
+1
-1
src/main/scala/top/Configs.scala
src/main/scala/top/Configs.scala
+4
-1
src/main/scala/top/Top.scala
src/main/scala/top/Top.scala
+5
-0
src/main/scala/xiangshan/XSCore.scala
src/main/scala/xiangshan/XSCore.scala
+21
-5
src/main/scala/xiangshan/XSTile.scala
src/main/scala/xiangshan/XSTile.scala
+0
-19
未找到文件。
Makefile
浏览文件 @
b8bcc142
...
...
@@ -32,7 +32,6 @@ ABS_WORK_DIR := $(shell pwd)
RUN_BIN_DIR
?=
$(ABS_WORK_DIR)
/ready-to-run
RUN_BIN
?=
coremark-2-iteration
CONSIDER_FSDB
?=
1
MFC
?=
0
ifdef
FLASH
RUN_OPTS
:=
+flash
=
$(RUN_BIN_DIR)
/
$(RUN_BIN)
.bin
...
...
@@ -62,13 +61,8 @@ endif
RELEASE_ARGS
=
--disable-all
--remove-assert
--fpga-platform
DEBUG_ARGS
=
--enable-difftest
ifeq
($(MFC),1)
RELEASE_ARGS
+=
-X
none
-E
chirrtl
--output-file
$(TOP)
.chirrtl.fir
DEBUG_ARGS
+=
-X
none
-E
chirrtl
--output-file
$(SIM_TOP)
.chirrtl.fir
else
RELEASE_ARGS
+=
--emission-options
disableRegisterRandomization
-E
verilog
--output-file
$(TOP)
.v
DEBUG_ARGS
+=
--emission-options
disableRegisterRandomization
-E
verilog
--output-file
$(SIM_TOP)
.v
endif
RELEASE_ARGS
+=
--emission-options
disableRegisterRandomization
-E
verilog
DEBUG_ARGS
+=
--emission-options
disableRegisterRandomization
-E
verilog
ifeq
($(RELEASE),1)
override
SIM_ARGS
+=
$(RELEASE_ARGS)
...
...
@@ -85,13 +79,7 @@ $(TOP_V): $(SCALA_FILE)
mkdir
-p
$
(
@D
)
time
-o
$
(
@D
)
/time.log mill
-i
XiangShan.runMain
$(FPGATOP)
-td
$
(
@D
)
\
--config
$(CONFIG)
--full-stacktrace
--num-cores
$(NUM_CORES)
\
$(RELEASE_ARGS)
ifeq
($(MFC),1)
time
-a
-o
$
(
@D
)
/time.log firtool
--disable-all-randomization
--disable-annotation-unknown
\
--annotation-file
=
$(BUILD_DIR)
/
$(TOP)
.anno.json
--format
=
fir
\
--lowering-options
=
noAlwaysComb,disallowExpressionInliningInPorts,explicitBitcast
\
--verilog
--dedup
-o
$(TOP_V)
$(BUILD_DIR)
/
$(TOP)
.chirrtl.fir
endif
$(RELEASE_ARGS)
--output-file
$(TOP)
sed
-e
's/\(peripheral\|memory\)_0_\(aw\|ar\|w\|r\|b\)_bits_/m_\1_\2_/g'
\
-e
's/\(dma\)_0_\(aw\|ar\|w\|r\|b\)_bits_/s_\1_\2_/g'
$@
>
$(BUILD_DIR)
/tmp.v
sed
-e
's/\(peripheral\|memory\)_0_\(aw\|ar\|w\|r\|b\)_/m_\1_\2_/g'
\
...
...
@@ -108,6 +96,11 @@ endif
verilog
:
$(TOP_V)
verilog-release
:
$(MAKE)
verilog
RELEASE
=
1
# split rtl modules and sim top, copy extra files
python3 scripts/parser.py XSTop
--config
$(CONFIG)
SIM_TOP_V
=
$(BUILD_DIR)
/
$(SIM_TOP)
.v
$(SIM_TOP_V)
:
$(SCALA_FILE) $(TEST_FILE)
mkdir
-p
$
(
@D
)
...
...
@@ -115,17 +108,13 @@ $(SIM_TOP_V): $(SCALA_FILE) $(TEST_FILE)
@
date
-R
|
tee
-a
$
(
@D
)
/time.log
time
-o
$
(
@D
)
/time.log mill
-i
XiangShan.test.runMain
$(SIMTOP)
-td
$
(
@D
)
\
--config
$(CONFIG)
--full-stacktrace
--num-cores
$(NUM_CORES)
\
$(SIM_ARGS)
ifeq
($(MFC),1)
time
-a
-o
$
(
@D
)
/time.log firtool
--disable-all-randomization
--disable-annotation-unknown
\
--annotation-file
=
$(BUILD_DIR)
/
$(SIM_TOP)
.anno.json
--format
=
fir
\
--lowering-options
=
noAlwaysComb,disallowExpressionInliningInPorts,explicitBitcast
\
--verilog
--dedup
-o
$(SIM_TOP_V)
$(BUILD_DIR)
/
$(SIM_TOP)
.chirrtl.fir
sed
'/\/\/ ----- 8< ----- .*----- 8< -----/,$d'
$(SIM_TOP_V)
>
res.v
rm
$(SIM_TOP_V)
mv
res.v
$(SIM_TOP_V)
endif
$(SIM_ARGS)
--output-file
$(SIM_TOP)
sed
-e
's/\(peripheral\|memory\)_0_\(aw\|ar\|w\|r\|b\)_bits_/m_\1_\2_/g'
\
-e
's/\(dma\)_0_\(aw\|ar\|w\|r\|b\)_bits_/s_\1_\2_/g'
$@
>
$(BUILD_DIR)
/tmp.v
sed
-e
's/\(peripheral\|memory\)_0_\(aw\|ar\|w\|r\|b\)_/m_\1_\2_/g'
\
-e
's/\(dma\)_0_\(aw\|ar\|w\|r\|b\)_\(ready\|valid\)/s_\1_\2_\3/g'
$(BUILD_DIR)
/tmp.v
>
$(BUILD_DIR)
/tmp1.v
rm
$@
$(BUILD_DIR)
/tmp.v
mv
$(BUILD_DIR)
/tmp1.v
$@
@
git log
-n
1
>>
.__head__
@
git diff
>>
.__diff__
@
sed
-i
's/^/\/\// '
.__head__
...
...
@@ -136,13 +125,24 @@ endif
sed
-i
-e
's/$$fatal/xs_assert(`__LINE__)/g'
$(SIM_TOP_V)
FILELIST
:=
$(ABS_WORK_DIR)
/build/cpu_flist.f
sim-verilog
:
$(SIM_TOP_V)
find
$(ABS_WORK_DIR)
/build
-name
"*.v"
>
$(FILELIST)
sim-verilog-release
:
$(MAKE)
$(SIM_TOP_V)
RELEASE
=
1
# split rtl modules and sim top, copy extra files
python3 scripts/parser.py SimTop
--config
$(CONFIG)
\
--ignore
XSTop
--include
difftest
\
--no-sram-conf
--no-sram-xlsx
clean
:
$(MAKE)
-C
./difftest clean
rm
-rf
./build
clean-release
:
rm
-rf
./
*
-Release-
*
init
:
git submodule update
--init
cd
rocket-chip
&&
git submodule update
--init
api-config-chipsalliance hardfloat
...
...
huancun
@
75b7d144
比较
ee5b6c04
...
75b7d144
Subproject commit
ee5b6c0426a675b55389d71ba192cc562ed260df
Subproject commit
75b7d144ddb54cfcfdda7186d86e9da6c71b882c
src/main/scala/top/Configs.scala
浏览文件 @
b8bcc142
...
...
@@ -281,7 +281,10 @@ class WithNKBL3(n: Int, ways: Int = 8, inclusive: Boolean = true, banks: Int = 1
)
},
enablePerf
=
true
,
ctrl
=
None
,
ctrl
=
Some
(
CacheCtrl
(
address
=
0x39000000
,
numCores
=
tiles
.
size
)),
sramClkDivBy2
=
true
,
sramDepthDiv
=
4
,
tagECC
=
None
,
...
...
src/main/scala/top/Top.scala
浏览文件 @
b8bcc142
...
...
@@ -163,6 +163,10 @@ class XSTop()(implicit p: Parameters) extends BaseXSSoc() with HasSoCParameter
dontTouch
(
io
)
dontTouch
(
peripheral
)
dontTouch
(
memory
)
dontTouch
(
scan_mode
)
dontTouch
(
dft_lgc_rst_n
)
dontTouch
(
dft_mode
)
dontTouch
(
dfx_reset
)
misc
.
module
.
ext_intrs
:=
io
.
extIntrs
for
((
core
,
i
)
<-
core_with_l2
.
zipWithIndex
)
{
...
...
@@ -222,6 +226,7 @@ class XSTop()(implicit p: Parameters) extends BaseXSSoc() with HasSoCParameter
None
}
if
(
dft
.
isDefined
){
dontTouch
(
dft
.
get
)
if
(
mbistBroadCastToTile
.
isDefined
){
mbistBroadCastToTile
.
get
:=
dft
.
get
}
...
...
src/main/scala/xiangshan/XSCore.scala
浏览文件 @
b8bcc142
...
...
@@ -24,8 +24,8 @@ import freechips.rocketchip.diplomacy.{BundleBridgeSource, LazyModule, LazyModul
import
freechips.rocketchip.interrupts.
{
IntSinkNode
,
IntSinkPortSimple
}
import
freechips.rocketchip.tile.HasFPUParameters
import
freechips.rocketchip.tilelink.TLBuffer
import
huancun.mbist.
MBISTPipeline
import
huancun.utils.
{
ModuleNode
,
ResetGen
,
ResetGenNode
,
SRAMTemplate
,
DFTResetSignals
}
import
huancun.mbist.
{
MBISTInterface
,
MBISTPipeline
}
import
huancun.utils.
{
DFTResetSignals
,
ModuleNode
,
ResetGen
,
ResetGenNode
,
SRAMTemplate
}
import
system.HasSoCParameter
import
utils._
import
xiangshan.backend._
...
...
@@ -434,10 +434,26 @@ class XSCoreImp(outer: XSCoreBase) extends LazyModuleImp(outer)
}
else
{
None
}
val
mbist
=
if
(
coreParams
.
hasMbist
&&
coreParams
.
hasShareBus
)
Some
(
IO
(
mbistPipeline
.
get
.
io
.
mbist
.
get
.
cloneType
))
else
None
if
(
coreParams
.
hasMbist
&&
coreParams
.
hasShareBus
){
mbist
.
get
<>
mbistPipeline
.
get
.
io
.
mbist
.
get
val
coreMbistIntf
=
if
(
coreParams
.
hasMbist
&&
coreParams
.
hasShareBus
)
{
val
params
=
mbistPipeline
.
get
.
bd
.
params
val
node
=
mbistPipeline
.
get
.
node
val
intf
=
Some
(
Module
(
new
MBISTInterface
(
params
=
Seq
(
params
),
ids
=
Seq
(
node
.
children
.
flatMap
(
_
.
array_id
)),
name
=
s
"MBIST_intf_core"
,
pipelineNum
=
1
)))
intf
.
get
.
toPipeline
.
head
<>
mbistPipeline
.
get
.
io
.
mbist
.
get
mbistPipeline
.
get
.
genCSV
(
intf
.
get
.
info
,
"MBIST_Core"
)
intf
.
get
.
mbist
:=
DontCare
dontTouch
(
intf
.
get
.
mbist
)
//TODO: add mbist controller connections here
intf
}
else
{
None
}
val
sigFromSrams
=
if
(
coreParams
.
hasMbist
)
Some
(
SRAMTemplate
.
genBroadCastBundleTop
())
else
None
val
dft
=
if
(
coreParams
.
hasMbist
)
Some
(
IO
(
sigFromSrams
.
get
.
cloneType
))
else
None
if
(
coreParams
.
hasMbist
)
{
...
...
src/main/scala/xiangshan/XSTile.scala
浏览文件 @
b8bcc142
...
...
@@ -180,25 +180,6 @@ class XSTileImp(outer: XSTile) extends LazyHardenModuleImp(outer) {
outer
.
misc
.
module
.
beu_errors
.
l2
<>
0.
U
.
asTypeOf
(
outer
.
misc
.
module
.
beu_errors
.
l2
)
}
val
coreMbistIntf
=
if
(
outer
.
coreParams
.
hasMbist
&&
outer
.
coreParams
.
hasShareBus
){
val
params
=
outer
.
core
.
module
.
mbistPipeline
.
get
.
bd
.
params
val
node
=
outer
.
core
.
module
.
mbistPipeline
.
get
.
node
val
intf
=
Some
(
Module
(
new
MBISTInterface
(
params
=
Seq
(
params
),
ids
=
Seq
(
node
.
children
.
flatMap
(
_
.
array_id
)),
name
=
s
"MBIST_intf_core"
,
pipelineNum
=
1
)))
intf
.
get
.
toPipeline
.
head
<>
outer
.
core
.
module
.
mbist
.
get
outer
.
core
.
module
.
mbistPipeline
.
get
.
genCSV
(
intf
.
get
.
info
,
"MBIST_Core"
)
intf
.
get
.
mbist
:=
DontCare
dontTouch
(
intf
.
get
.
mbist
)
//TODO: add mbist controller connections here
intf
}
else
{
None
}
val
l2MbistIntf
=
if
(
outer
.
l2cache
.
isDefined
){
if
(
p
(
XSCoreParamsKey
).
L2CacheParamsOpt
.
get
.
hasMbist
&&
p
(
XSCoreParamsKey
).
L2CacheParamsOpt
.
get
.
hasShareBus
){
val
params
=
outer
.
l2cache
.
get
.
module
.
l2TopPipeLine
.
get
.
bd
.
params
...
...