Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenXiangShan
XiangShan
提交
4a6ab1cd
X
XiangShan
项目概览
OpenXiangShan
/
XiangShan
12 个月 前同步成功
通知
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,发现更多精彩内容 >>
提交
4a6ab1cd
编写于
2月 02, 2021
作者:
L
LinJiawei
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'origin/master' into opt-jump-unit
上级
31ea8750
b5fcc2d4
变更
7
显示空白变更内容
内联
并排
Showing
7 changed file
with
21 addition
and
17 deletion
+21
-17
.github/workflows/emu.yml
.github/workflows/emu.yml
+9
-5
src/main/scala/xiangshan/XSCore.scala
src/main/scala/xiangshan/XSCore.scala
+1
-1
src/main/scala/xiangshan/backend/fu/Alu.scala
src/main/scala/xiangshan/backend/fu/Alu.scala
+1
-1
src/main/scala/xiangshan/backend/issue/ReservationStation.scala
...in/scala/xiangshan/backend/issue/ReservationStation.scala
+2
-0
src/main/scala/xiangshan/mem/lsqueue/LoadQueue.scala
src/main/scala/xiangshan/mem/lsqueue/LoadQueue.scala
+2
-4
src/test/csrc/emu.cpp
src/test/csrc/emu.cpp
+3
-3
src/test/scala/top/XSSim.scala
src/test/scala/top/XSSim.scala
+3
-3
未找到文件。
.github/workflows/emu.yml
浏览文件 @
4a6ab1cd
...
...
@@ -39,7 +39,7 @@ jobs:
echo "AM_HOME=/home/ci-runner/xsenv/nexus-am" >> $GITHUB_ENV
-
name
:
Build EMU
run
:
make ./build/emu SIM_ARGS=--disable-log NEMU_HOME=$NEMU_HOME NOOP_HOME=$NOOP_HOME B=0 E=0 -j220
make ./build/emu SIM_ARGS=--disable-log NEMU_HOME=$NEMU_HOME NOOP_HOME=$NOOP_HOME B=0 E=0 -j220
EMU_TRACE=1 EMU_THREADS=8
-
name
:
Run cputest
run
:
|
CPU_TEST_DIR=$AM_HOME/tests/cputest
...
...
@@ -49,7 +49,7 @@ jobs:
do
t=${test%.c}
echo $t
make -C $CPU_TEST_DIR ALL=$t ARCH=riscv64-noop AM_HOME=$AM_HOME NEMU_HOME=$NEMU_HOME NOOP_HOME=$NOOP_HOME run B=0 E=0
| grep "HIT GOOD TRAP"
numactl -m 1 -C 64-71 make -C $CPU_TEST_DIR ALL=$t ARCH=riscv64-noop AM_HOME=$AM_HOME NEMU_HOME=$NEMU_HOME NOOP_HOME=$NOOP_HOME run
| grep "HIT GOOD TRAP"
if [[ $? != 0 ]];
then
echo $t fail
...
...
@@ -59,10 +59,14 @@ jobs:
exit $ret
-
name
:
Run riscv-tests
run
:
|
make -C $RVTEST_HOME/isa/ SUITES+=rv64ui SUITES+=rv64um SUITES+=rv64ua SUITES+=rv64uf SUITES+=rv64ud NEMU_HOME=$NEMU_HOME NOOP_HOME=$NOOP_HOME noop_run B=0 E=0
numactl -m 1 -C 64-71 make -C $RVTEST_HOME/isa/ SUITES+=rv64ui SUITES+=rv64um SUITES+=rv64ua SUITES+=rv64uf SUITES+=rv64ud NEMU_HOME=$NEMU_HOME NOOP_HOME=$NOOP_HOME noop_run
-
name
:
Run microbench
run
:
|
make -C $AM_HOME/apps/microbench ARCH=riscv64-noop AM_HOME=$AM_HOME NEMU_HOME=$NEMU_HOME NOOP_HOME=$NOOP_HOME mainargs=test run B=0 E=0
numactl -m 1 -C 64-71 make -C $AM_HOME/apps/microbench ARCH=riscv64-noop AM_HOME=$AM_HOME NEMU_HOME=$NEMU_HOME NOOP_HOME=$NOOP_HOME mainargs=test run
-
name
:
Run coremark
run
:
|
make -C $AM_HOME/apps/coremark ARCH=riscv64-noop AM_HOME=$AM_HOME NEMU_HOME=$NEMU_HOME NOOP_HOME=$NOOP_HOME run B=0 E=0
numactl -m 1 -C 64-71 make -C $AM_HOME/apps/coremark ARCH=riscv64-noop AM_HOME=$AM_HOME NEMU_HOME=$NEMU_HOME NOOP_HOME=$NOOP_HOME run
-
name
:
Run Linux
run
:
|
numactl -m 1 -C 64-71 make emu IMAGE=/home/ci-runner/xsenv/workloads/linux-hello/bbl.bin
src/main/scala/xiangshan/XSCore.scala
浏览文件 @
4a6ab1cd
...
...
@@ -414,7 +414,7 @@ class XSCoreImp(outer: XSCore) extends LazyModuleImp(outer)
frontend
.
io
.
backend
<>
ctrlBlock
.
io
.
frontend
frontend
.
io
.
sfence
<>
integerBlock
.
io
.
fenceio
.
sfence
frontend
.
io
.
tlbCsr
:=
RegNext
(
integerBlock
.
io
.
csrio
.
tlb
)
frontend
.
io
.
tlbCsr
:=
integerBlock
.
io
.
csrio
.
tlb
frontend
.
io
.
icacheMemAcq
<>
l1pluscache
.
io
.
req
l1pluscache
.
io
.
resp
<>
frontend
.
io
.
icacheMemGrant
...
...
src/main/scala/xiangshan/backend/fu/Alu.scala
浏览文件 @
4a6ab1cd
...
...
@@ -113,7 +113,7 @@ class Alu extends FunctionUnit with HasRedirectOut {
val
slt
=
xorRes
(
XLEN
-
1
)
^
sltu
val
isW
=
ALUOpType
.
isWordOp
(
func
)
val
shamt
=
Cat
(
isW
&&
src2
(
5
),
src2
(
4
,
0
))
val
shamt
=
Cat
(
!
isW
&&
src2
(
5
),
src2
(
4
,
0
))
val
leftShiftModule
=
Module
(
new
LeftShiftModule
)
leftShiftModule
.
io
.
sllSrc
:=
src1
...
...
src/main/scala/xiangshan/backend/issue/ReservationStation.scala
浏览文件 @
4a6ab1cd
...
...
@@ -489,6 +489,7 @@ class ReservationStationCtrl
val
asynIdxUop
=
(
0
until
iqSize
).
map
(
i
=>
asynUop
(
io
.
indexVec
(
i
))
)
val
readyIdxVec
=
(
0
until
iqSize
).
map
(
i
=>
io
.
validVec
(
i
)
&&
Cat
(
srcQueue
(
io
.
indexVec
(
i
))).
andR
)
val
fastAsynUop
=
ParallelPriorityMux
(
readyIdxVec
zip
asynIdxUop
)
val
fastRoqIdx
=
ParallelPriorityMux
(
readyIdxVec
zip
roqIdx
)
val
fastSentUop
=
Wire
(
new
MicroOp
)
fastSentUop
:=
DontCare
fastSentUop
.
pdest
:=
fastAsynUop
.
pdest
...
...
@@ -502,6 +503,7 @@ class ReservationStationCtrl
val
bpQueue
=
Module
(
new
BypassQueue
(
fixedDelay
))
bpQueue
.
io
.
in
.
valid
:=
selValid
bpQueue
.
io
.
in
.
bits
:=
fastSentUop
bpQueue
.
io
.
in
.
bits
.
roqIdx
:=
fastRoqIdx
bpQueue
.
io
.
redirect
:=
io
.
redirect
bpQueue
.
io
.
flush
:=
io
.
flush
io
.
fastUopOut
.
valid
:=
bpQueue
.
io
.
out
.
valid
...
...
src/main/scala/xiangshan/mem/lsqueue/LoadQueue.scala
浏览文件 @
4a6ab1cd
...
...
@@ -468,8 +468,7 @@ class LoadQueue extends XSModule
val
rollbackGen
=
Wire
(
Valid
(
new
Redirect
))
val
rollbackReg
=
Reg
(
Valid
(
new
Redirect
))
rollbackGen
.
valid
:=
rollbackSelected
.
valid
&&
(!
lastCycleRedirect
.
valid
||
!
isAfter
(
rollbackSelected
.
bits
.
roqIdx
,
lastCycleRedirect
.
bits
.
roqIdx
))
&&
!
lastCycleFlush
!
rollbackSelected
.
bits
.
roqIdx
.
needFlush
(
lastCycleRedirect
,
lastCycleFlush
)
rollbackGen
.
bits
.
roqIdx
:=
rollbackSelected
.
bits
.
roqIdx
rollbackGen
.
bits
.
ftqIdx
:=
rollbackSelected
.
bits
.
cf
.
ftqPtr
...
...
@@ -484,8 +483,7 @@ class LoadQueue extends XSModule
// S3: fire rollback request
io
.
rollback
:=
rollbackReg
io
.
rollback
.
valid
:=
rollbackReg
.
valid
&&
(!
lastCycleRedirect
.
valid
||
!
isAfter
(
rollbackReg
.
bits
.
roqIdx
,
lastCycleRedirect
.
bits
.
roqIdx
))
&&
!
lastCycleFlush
!
rollbackReg
.
bits
.
roqIdx
.
needFlush
(
lastCycleRedirect
,
lastCycleFlush
)
when
(
io
.
rollback
.
valid
)
{
// XSDebug("Mem rollback: pc %x roqidx %d\n", io.rollback.bits.cfi, io.rollback.bits.roqIdx.asUInt)
...
...
src/test/csrc/emu.cpp
浏览文件 @
4a6ab1cd
...
...
@@ -572,7 +572,7 @@ void Emulator::snapshot_load(const char *filename) {
uint64_t
ref_r
[
DIFFTEST_NR_REG
];
stream
.
read
(
ref_r
,
sizeof
(
ref_r
));
ref_difftest_setregs
(
&
ref_r
);
ref_difftest_setregs
(
&
ref_r
,
0
);
uint64_t
nemu_this_pc
;
stream
.
read
(
&
nemu_this_pc
,
sizeof
(
nemu_this_pc
));
...
...
@@ -585,11 +585,11 @@ void Emulator::snapshot_load(const char *filename) {
struct
SyncState
sync_mastate
;
stream
.
read
(
&
sync_mastate
,
sizeof
(
struct
SyncState
));
ref_difftest_set_mastatus
(
&
sync_mastate
);
ref_difftest_set_mastatus
(
&
sync_mastate
,
0
);
uint64_t
csr_buf
[
4096
];
stream
.
read
(
&
csr_buf
,
sizeof
(
csr_buf
));
ref_difftest_set_csr
(
csr_buf
);
ref_difftest_set_csr
(
csr_buf
,
0
);
long
sdcard_offset
=
0
;
stream
.
read
(
&
sdcard_offset
,
sizeof
(
sdcard_offset
));
...
...
src/test/scala/top/XSSim.scala
浏览文件 @
4a6ab1cd
...
...
@@ -6,9 +6,9 @@ import chisel3.util._
import
chipsalliance.rocketchip.config
import
chisel3.stage.ChiselGeneratorAnnotation
import
device._
import
freechips.rocketchip.amba.axi4.
{
AXI4
UserYanker
,
AXI4Xbar
,
AXI4IdentityNode
}
import
freechips.rocketchip.amba.axi4.
{
AXI4
IdIndexer
,
AXI4IdentityNode
,
AXI4UserYanker
,
AXI4Xbar
}
import
freechips.rocketchip.diplomacy.
{
AddressSet
,
BufferParams
,
LazyModule
,
LazyModuleImp
}
import
freechips.rocketchip.tilelink.
{
TLToAXI4
}
import
freechips.rocketchip.tilelink.
TLToAXI4
import
xiangshan._
import
utils._
import
ExcitingUtils.Debug
...
...
@@ -100,7 +100,7 @@ class XSSimSoC(axiSim: Boolean)(implicit p: config.Parameters) extends LazyModul
startAddr
=
0x80000000
L
,
nOp
=
0
,
beatBytes
=
L3BusWidth
/
8
))
soc
.
dma
:=
burst
.
node
soc
.
dma
:=
AXI4IdIndexer
(
16
)
:=
burst
.
node
// AXI MMIO
// -----------------------------------
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录