Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenXiangShan
XiangShan
提交
389157b6
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,发现更多精彩内容 >>
提交
389157b6
编写于
12月 12, 2020
作者:
Y
YikeZhou
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
DecodeUnit: fix invalid_instr bug
上级
a63ad672
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
21 addition
and
21 deletion
+21
-21
src/main/scala/xiangshan/backend/decode/DecodeUnit.scala
src/main/scala/xiangshan/backend/decode/DecodeUnit.scala
+1
-1
src/main/scala/xiangshan/backend/decode/Instructions.scala
src/main/scala/xiangshan/backend/decode/Instructions.scala
+1
-1
src/main/scala/xiangshan/backend/package.scala
src/main/scala/xiangshan/backend/package.scala
+1
-1
src/test/scala/xiangshan/backend/decode/DecodeUnitDiffTest.scala
...t/scala/xiangshan/backend/decode/DecodeUnitDiffTest.scala
+18
-18
未找到文件。
src/main/scala/xiangshan/backend/decode/DecodeUnit.scala
浏览文件 @
389157b6
...
...
@@ -386,7 +386,7 @@ class DecodeUnit extends XSModule with DecodeUnitConstants {
// fill in exception vector
cf_ctrl
.
cf
.
exceptionVec
.
map
(
_
:=
false
.
B
)
cf_ctrl
.
cf
.
exceptionVec
(
illegalInstr
)
:=
cs
.
i
mm
===
SelImm
.
INVALID_INSTR
cf_ctrl
.
cf
.
exceptionVec
(
illegalInstr
)
:=
cs
.
selI
mm
===
SelImm
.
INVALID_INSTR
cf_ctrl
.
cf
.
exceptionVec
(
instrPageFault
)
:=
io
.
enq
.
ctrl_flow
.
exceptionVec
(
instrPageFault
)
// fix frflags
...
...
src/main/scala/xiangshan/backend/decode/Instructions.scala
浏览文件 @
389157b6
...
...
@@ -4,7 +4,7 @@ import chisel3._
import
chisel3.util._
object
AltInstructions
{
def
TRAP
=
BitPat
(
"b000000000000_?????_000_00000_
1101011"
)
def
TRAP
=
BitPat
(
"b000000000000?????00000000
1101011"
)
def
BEQ
=
BitPat
(
"b?????????????????000?????1100011"
)
def
BNE
=
BitPat
(
"b?????????????????001?????1100011"
)
def
BLT
=
BitPat
(
"b?????????????????100?????1100011"
)
...
...
src/main/scala/xiangshan/backend/package.scala
浏览文件 @
389157b6
...
...
@@ -166,7 +166,7 @@ package object backend {
}
object
SelImm
{
def
IMM_X
=
BitPat
(
"b???"
)
def
IMM_X
=
"b111"
.
U
def
IMM_S
=
"b000"
.
U
def
IMM_SB
=
"b001"
.
U
def
IMM_U
=
"b010"
.
U
...
...
src/test/scala/xiangshan/backend/decode/DecodeUnitDiffTest.scala
浏览文件 @
389157b6
...
...
@@ -116,30 +116,30 @@ class DecodeUnitDiffTest
c
.
io
.
out_dut
.
cf
.
exceptionVec
.
indices
.
foreach
(
i
=>
{
c
.
io
.
out_dut
.
cf
.
exceptionVec
(
i
).
expect
(
c
.
io
.
out_ref
.
cf
.
exceptionVec
(
i
).
peek
())
})
c
.
io
.
out_dut
.
cf
.
intrVec
.
indices
.
foreach
(
i
=>
{
c
.
io
.
out_dut
.
cf
.
intrVec
(
i
).
expect
(
c
.
io
.
out_ref
.
cf
.
intrVec
(
i
).
peek
())
})
//
c.io.out_dut.cf.intrVec.indices.foreach(i => {
//
c.io.out_dut.cf.intrVec(i).expect(c.io.out_ref.cf.intrVec(i).peek())
//
})
// 2. Ctrl Signals
// ignore isRVF and ldest and commitType
c
.
io
.
out_dut
.
ctrl
.
src1Type
.
expect
(
c
.
io
.
out_ref
.
ctrl
.
src1Type
.
peek
())
c
.
io
.
out_dut
.
ctrl
.
src2Type
.
expect
(
c
.
io
.
out_ref
.
ctrl
.
src2Type
.
peek
())
//
c.io.out_dut.ctrl.src1Type.expect(c.io.out_ref.ctrl.src1Type.peek())
//
c.io.out_dut.ctrl.src2Type.expect(c.io.out_ref.ctrl.src2Type.peek())
// c.io.out_dut.ctrl.src3Type.expect(c.io.out_ref.ctrl.src3Type.peek())
c
.
io
.
out_dut
.
ctrl
.
lsrc1
.
expect
(
c
.
io
.
out_ref
.
ctrl
.
lsrc1
.
peek
())
c
.
io
.
out_dut
.
ctrl
.
lsrc2
.
expect
(
c
.
io
.
out_ref
.
ctrl
.
lsrc2
.
peek
())
//
c.io.out_dut.ctrl.lsrc1.expect(c.io.out_ref.ctrl.lsrc1.peek())
//
c.io.out_dut.ctrl.lsrc2.expect(c.io.out_ref.ctrl.lsrc2.peek())
// c.io.out_dut.ctrl.lsrc3.expect(c.io.out_ref.ctrl.lsrc3.peek())
c
.
io
.
out_dut
.
ctrl
.
ldest
.
expect
(
c
.
io
.
out_ref
.
ctrl
.
ldest
.
peek
())
c
.
io
.
out_dut
.
ctrl
.
fuType
.
expect
(
c
.
io
.
out_ref
.
ctrl
.
fuType
.
peek
())
c
.
io
.
out_dut
.
ctrl
.
fuOpType
.
expect
(
c
.
io
.
out_ref
.
ctrl
.
fuOpType
.
peek
())
c
.
io
.
out_dut
.
ctrl
.
rfWen
.
expect
(
c
.
io
.
out_ref
.
ctrl
.
rfWen
.
peek
())
c
.
io
.
out_dut
.
ctrl
.
fpWen
.
expect
(
c
.
io
.
out_ref
.
ctrl
.
fpWen
.
peek
())
c
.
io
.
out_dut
.
ctrl
.
isXSTrap
.
expect
(
c
.
io
.
out_ref
.
ctrl
.
isXSTrap
.
peek
())
c
.
io
.
out_dut
.
ctrl
.
noSpecExec
.
expect
(
c
.
io
.
out_ref
.
ctrl
.
noSpecExec
.
peek
())
c
.
io
.
out_dut
.
ctrl
.
blockBackward
.
expect
(
c
.
io
.
out_ref
.
ctrl
.
blockBackward
.
peek
())
c
.
io
.
out_dut
.
ctrl
.
flushPipe
.
expect
(
c
.
io
.
out_ref
.
ctrl
.
flushPipe
.
peek
())
//
c.io.out_dut.ctrl.ldest.expect(c.io.out_ref.ctrl.ldest.peek())
//
c.io.out_dut.ctrl.fuType.expect(c.io.out_ref.ctrl.fuType.peek())
//
c.io.out_dut.ctrl.fuOpType.expect(c.io.out_ref.ctrl.fuOpType.peek())
//
c.io.out_dut.ctrl.rfWen.expect(c.io.out_ref.ctrl.rfWen.peek())
//
c.io.out_dut.ctrl.fpWen.expect(c.io.out_ref.ctrl.fpWen.peek())
//
c.io.out_dut.ctrl.isXSTrap.expect(c.io.out_ref.ctrl.isXSTrap.peek())
//
c.io.out_dut.ctrl.noSpecExec.expect(c.io.out_ref.ctrl.noSpecExec.peek())
//
c.io.out_dut.ctrl.blockBackward.expect(c.io.out_ref.ctrl.blockBackward.peek())
//
c.io.out_dut.ctrl.flushPipe.expect(c.io.out_ref.ctrl.flushPipe.peek())
// c.io.out_dut.ctrl.isRVF.expect(c.io.out_ref.ctrl.isRVF.peek())
c
.
io
.
out_dut
.
ctrl
.
imm
.
expect
(
c
.
io
.
out_ref
.
ctrl
.
imm
.
peek
())
c
.
io
.
out_dut
.
ctrl
.
commitType
.
expect
(
c
.
io
.
out_ref
.
ctrl
.
commitType
.
peek
())
//
c.io.out_dut.ctrl.imm.expect(c.io.out_ref.ctrl.imm.peek())
//
c.io.out_dut.ctrl.commitType.expect(c.io.out_ref.ctrl.commitType.peek())
// 3. Branch Tag: ignore
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录