Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenXiangShan
XiangShan
提交
7e79df6b
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 搜索 >>
提交
7e79df6b
编写于
3月 23, 2023
作者:
Z
zhanglyGit
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
decode: support tail undisturbed
上级
01d8df15
变更
2
展开全部
隐藏空白更改
内联
并排
Showing
2 changed file
with
232 addition
and
219 deletion
+232
-219
src/main/scala/xiangshan/backend/decode/DecodeUnitComp.scala
src/main/scala/xiangshan/backend/decode/DecodeUnitComp.scala
+19
-6
src/main/scala/xiangshan/backend/decode/VecDecoder.scala
src/main/scala/xiangshan/backend/decode/VecDecoder.scala
+213
-213
未找到文件。
src/main/scala/xiangshan/backend/decode/DecodeUnitComp.scala
浏览文件 @
7e79df6b
...
...
@@ -133,6 +133,7 @@ class DecodeUnitComp(maxNumOfUop : Int)(implicit p : Parameters) extends XSModul
for
(
i
<-
0
until
MAX_VLMUL
)
{
csBundle
(
i
).
ctrl
.
lsrc
(
0
)
:=
src1
+
i
.
U
csBundle
(
i
).
ctrl
.
lsrc
(
1
)
:=
src2
+
i
.
U
csBundle
(
i
).
ctrl
.
lsrc
(
2
)
:=
dest
+
i
.
U
csBundle
(
i
).
ctrl
.
ldest
:=
dest
+
i
.
U
csBundle
(
i
).
ctrl
.
uopIdx
:=
i
.
U
}
...
...
@@ -140,9 +141,11 @@ class DecodeUnitComp(maxNumOfUop : Int)(implicit p : Parameters) extends XSModul
is
(
UopDivType
.
VEC_EXT2
)
{
for
(
i
<-
0
until
MAX_VLMUL
/
2
)
{
csBundle
(
2
*
i
).
ctrl
.
lsrc
(
1
)
:=
src2
+
i
.
U
csBundle
(
2
*
i
).
ctrl
.
lsrc
(
2
)
:=
dest
+
(
2
*
i
).
U
csBundle
(
2
*
i
).
ctrl
.
ldest
:=
dest
+
(
2
*
i
).
U
csBundle
(
2
*
i
).
ctrl
.
uopIdx
:=
(
2
*
i
).
U
csBundle
(
2
*
i
+
1
).
ctrl
.
lsrc
(
1
)
:=
src2
+
i
.
U
csBundle
(
2
*
i
+
1
).
ctrl
.
lsrc
(
2
)
:=
dest
+
(
2
*
i
+
1
).
U
csBundle
(
2
*
i
+
1
).
ctrl
.
ldest
:=
dest
+
(
2
*
i
+
1
).
U
csBundle
(
2
*
i
+
1
).
ctrl
.
uopIdx
:=
(
2
*
i
+
1
).
U
}
...
...
@@ -150,15 +153,19 @@ class DecodeUnitComp(maxNumOfUop : Int)(implicit p : Parameters) extends XSModul
is
(
UopDivType
.
VEC_EXT4
)
{
for
(
i
<-
0
until
MAX_VLMUL
/
4
)
{
csBundle
(
4
*
i
).
ctrl
.
lsrc
(
1
)
:=
src2
+
i
.
U
csBundle
(
4
*
i
).
ctrl
.
lsrc
(
2
)
:=
dest
+
(
4
*
i
).
U
csBundle
(
4
*
i
).
ctrl
.
ldest
:=
dest
+
(
4
*
i
).
U
csBundle
(
4
*
i
).
ctrl
.
uopIdx
:=
(
4
*
i
).
U
csBundle
(
4
*
i
+
1
).
ctrl
.
lsrc
(
1
)
:=
src2
+
i
.
U
csBundle
(
4
*
i
+
1
).
ctrl
.
lsrc
(
2
)
:=
dest
+
(
4
*
i
+
1
).
U
csBundle
(
4
*
i
+
1
).
ctrl
.
ldest
:=
dest
+
(
4
*
i
+
1
).
U
csBundle
(
4
*
i
+
1
).
ctrl
.
uopIdx
:=
(
4
*
i
+
1
).
U
csBundle
(
4
*
i
+
2
).
ctrl
.
lsrc
(
1
)
:=
src2
+
i
.
U
csBundle
(
4
*
i
+
2
).
ctrl
.
lsrc
(
2
)
:=
dest
+
(
4
*
i
+
2
).
U
csBundle
(
4
*
i
+
2
).
ctrl
.
ldest
:=
dest
+
(
4
*
i
+
2
).
U
csBundle
(
4
*
i
+
2
).
ctrl
.
uopIdx
:=
(
4
*
i
+
2
).
U
csBundle
(
4
*
i
+
3
).
ctrl
.
lsrc
(
1
)
:=
src2
+
i
.
U
csBundle
(
4
*
i
+
3
).
ctrl
.
lsrc
(
2
)
:=
dest
+
(
4
*
i
+
3
).
U
csBundle
(
4
*
i
+
3
).
ctrl
.
ldest
:=
dest
+
(
4
*
i
+
3
).
U
csBundle
(
4
*
i
+
3
).
ctrl
.
uopIdx
:=
(
4
*
i
+
3
).
U
}
...
...
@@ -166,6 +173,7 @@ class DecodeUnitComp(maxNumOfUop : Int)(implicit p : Parameters) extends XSModul
is
(
UopDivType
.
VEC_EXT8
)
{
for
(
i
<-
0
until
MAX_VLMUL
)
{
csBundle
(
i
).
ctrl
.
lsrc
(
1
)
:=
src2
csBundle
(
i
).
ctrl
.
lsrc
(
2
)
:=
dest
+
i
.
U
csBundle
(
i
).
ctrl
.
ldest
:=
dest
+
i
.
U
csBundle
(
i
).
ctrl
.
uopIdx
:=
i
.
U
}
...
...
@@ -235,6 +243,7 @@ class DecodeUnitComp(maxNumOfUop : Int)(implicit p : Parameters) extends XSModul
csBundle
(
i
+
1
).
ctrl
.
srcType
(
0
)
:=
SrcType
.
fp
csBundle
(
i
+
1
).
ctrl
.
lsrc
(
0
)
:=
FP_TMP_REG_MV
.
U
csBundle
(
i
+
1
).
ctrl
.
lsrc
(
1
)
:=
src2
+
i
.
U
csBundle
(
i
+
1
).
ctrl
.
lsrc
(
2
)
:=
dest
+
i
.
U
csBundle
(
i
+
1
).
ctrl
.
ldest
:=
dest
+
i
.
U
csBundle
(
i
+
1
).
ctrl
.
uopIdx
:=
i
.
U
}
...
...
@@ -243,10 +252,12 @@ class DecodeUnitComp(maxNumOfUop : Int)(implicit p : Parameters) extends XSModul
for
(
i
<-
0
until
MAX_VLMUL
/
2
)
{
csBundle
(
2
*
i
).
ctrl
.
lsrc
(
0
)
:=
src1
+
i
.
U
csBundle
(
2
*
i
).
ctrl
.
lsrc
(
1
)
:=
src2
+
i
.
U
csBundle
(
2
*
i
).
ctrl
.
lsrc
(
2
)
:=
dest
+
(
2
*
i
).
U
csBundle
(
2
*
i
).
ctrl
.
ldest
:=
dest
+
(
2
*
i
).
U
csBundle
(
2
*
i
).
ctrl
.
uopIdx
:=
(
2
*
i
).
U
csBundle
(
2
*
i
+
1
).
ctrl
.
lsrc
(
0
)
:=
src1
+
i
.
U
csBundle
(
2
*
i
+
1
).
ctrl
.
lsrc
(
1
)
:=
src2
+
i
.
U
csBundle
(
2
*
i
+
1
).
ctrl
.
lsrc
(
2
)
:=
dest
+
(
2
*
i
+
1
).
U
csBundle
(
2
*
i
+
1
).
ctrl
.
ldest
:=
dest
+
(
2
*
i
+
1
).
U
csBundle
(
2
*
i
+
1
).
ctrl
.
uopIdx
:=
(
2
*
i
+
1
).
U
}
...
...
@@ -255,10 +266,12 @@ class DecodeUnitComp(maxNumOfUop : Int)(implicit p : Parameters) extends XSModul
for
(
i
<-
0
until
MAX_VLMUL
/
2
)
{
csBundle
(
2
*
i
).
ctrl
.
lsrc
(
0
)
:=
src1
+
i
.
U
csBundle
(
2
*
i
).
ctrl
.
lsrc
(
1
)
:=
src2
+
(
2
*
i
).
U
csBundle
(
2
*
i
).
ctrl
.
lsrc
(
2
)
:=
dest
+
(
2
*
i
).
U
csBundle
(
2
*
i
).
ctrl
.
ldest
:=
dest
+
(
2
*
i
).
U
csBundle
(
2
*
i
).
ctrl
.
uopIdx
:=
(
2
*
i
).
U
csBundle
(
2
*
i
+
1
).
ctrl
.
lsrc
(
0
)
:=
src1
+
i
.
U
csBundle
(
2
*
i
+
1
).
ctrl
.
lsrc
(
1
)
:=
src2
+
(
2
*
i
+
1
).
U
csBundle
(
2
*
i
+
1
).
ctrl
.
lsrc
(
2
)
:=
dest
+
(
2
*
i
+
1
).
U
csBundle
(
2
*
i
+
1
).
ctrl
.
ldest
:=
dest
+
(
2
*
i
+
1
).
U
csBundle
(
2
*
i
+
1
).
ctrl
.
uopIdx
:=
(
2
*
i
+
1
).
U
}
...
...
@@ -289,11 +302,13 @@ class DecodeUnitComp(maxNumOfUop : Int)(implicit p : Parameters) extends XSModul
csBundle
(
2
*
i
+
1
).
ctrl
.
srcType
(
0
)
:=
SrcType
.
fp
csBundle
(
2
*
i
+
1
).
ctrl
.
lsrc
(
0
)
:=
FP_TMP_REG_MV
.
U
csBundle
(
2
*
i
+
1
).
ctrl
.
lsrc
(
1
)
:=
src2
+
i
.
U
csBundle
(
2
*
i
+
1
).
ctrl
.
lsrc
(
2
)
:=
dest
+
(
2
*
i
).
U
csBundle
(
2
*
i
+
1
).
ctrl
.
ldest
:=
dest
+
(
2
*
i
).
U
csBundle
(
2
*
i
+
1
).
ctrl
.
uopIdx
:=
(
2
*
i
).
U
csBundle
(
2
*
i
+
2
).
ctrl
.
srcType
(
0
)
:=
SrcType
.
fp
csBundle
(
2
*
i
+
2
).
ctrl
.
lsrc
(
0
)
:=
FP_TMP_REG_MV
.
U
csBundle
(
2
*
i
+
2
).
ctrl
.
lsrc
(
1
)
:=
src2
+
i
.
U
csBundle
(
2
*
i
+
2
).
ctrl
.
lsrc
(
2
)
:=
dest
+
(
2
*
i
+
1
).
U
csBundle
(
2
*
i
+
2
).
ctrl
.
ldest
:=
dest
+
(
2
*
i
+
1
).
U
csBundle
(
2
*
i
+
2
).
ctrl
.
uopIdx
:=
(
2
*
i
+
1
).
U
}
...
...
@@ -324,11 +339,13 @@ class DecodeUnitComp(maxNumOfUop : Int)(implicit p : Parameters) extends XSModul
csBundle
(
2
*
i
+
1
).
ctrl
.
srcType
(
0
)
:=
SrcType
.
fp
csBundle
(
2
*
i
+
1
).
ctrl
.
lsrc
(
0
)
:=
FP_TMP_REG_MV
.
U
csBundle
(
2
*
i
+
1
).
ctrl
.
lsrc
(
1
)
:=
src2
+
(
2
*
i
).
U
csBundle
(
2
*
i
+
1
).
ctrl
.
lsrc
(
2
)
:=
dest
+
(
2
*
i
).
U
csBundle
(
2
*
i
+
1
).
ctrl
.
ldest
:=
dest
+
(
2
*
i
).
U
csBundle
(
2
*
i
+
1
).
ctrl
.
uopIdx
:=
(
2
*
i
).
U
csBundle
(
2
*
i
+
2
).
ctrl
.
srcType
(
0
)
:=
SrcType
.
fp
csBundle
(
2
*
i
+
2
).
ctrl
.
lsrc
(
0
)
:=
FP_TMP_REG_MV
.
U
csBundle
(
2
*
i
+
2
).
ctrl
.
lsrc
(
1
)
:=
src2
+
(
2
*
i
+
1
).
U
csBundle
(
2
*
i
+
2
).
ctrl
.
lsrc
(
2
)
:=
dest
+
(
2
*
i
+
1
).
U
csBundle
(
2
*
i
+
2
).
ctrl
.
ldest
:=
dest
+
(
2
*
i
+
1
).
U
csBundle
(
2
*
i
+
2
).
ctrl
.
uopIdx
:=
(
2
*
i
+
1
).
U
}
...
...
@@ -338,9 +355,9 @@ class DecodeUnitComp(maxNumOfUop : Int)(implicit p : Parameters) extends XSModul
csBundle
(
2
*
i
).
ctrl
.
lsrc
(
0
)
:=
src1
+
i
.
U
csBundle
(
2
*
i
).
ctrl
.
lsrc
(
1
)
:=
src2
+
(
2
*
i
).
U
csBundle
(
2
*
i
).
ctrl
.
lsrc
(
2
)
:=
dest
+
i
.
U
csBundle
(
2
*
i
).
ctrl
.
ldest
:=
VECTOR_TMP_REG_LMUL
.
U
csBundle
(
2
*
i
).
ctrl
.
uopIdx
:=
(
2
*
i
).
U
csBundle
(
2
*
i
+
1
).
ctrl
.
srcType
(
2
)
:=
SrcType
.
vp
csBundle
(
2
*
i
+
1
).
ctrl
.
lsrc
(
0
)
:=
src1
+
i
.
U
csBundle
(
2
*
i
+
1
).
ctrl
.
lsrc
(
1
)
:=
src2
+
(
2
*
i
+
1
).
U
csBundle
(
2
*
i
+
1
).
ctrl
.
lsrc
(
2
)
:=
VECTOR_TMP_REG_LMUL
.
U
...
...
@@ -374,10 +391,10 @@ class DecodeUnitComp(maxNumOfUop : Int)(implicit p : Parameters) extends XSModul
csBundle
(
2
*
i
+
1
).
ctrl
.
srcType
(
0
)
:=
SrcType
.
fp
csBundle
(
2
*
i
+
1
).
ctrl
.
lsrc
(
0
)
:=
FP_TMP_REG_MV
.
U
csBundle
(
2
*
i
+
1
).
ctrl
.
lsrc
(
1
)
:=
src2
+
(
2
*
i
).
U
csBundle
(
2
*
i
+
1
).
ctrl
.
lsrc
(
2
)
:=
dest
+
i
.
U
csBundle
(
2
*
i
+
1
).
ctrl
.
ldest
:=
VECTOR_TMP_REG_LMUL
.
U
csBundle
(
2
*
i
+
1
).
ctrl
.
uopIdx
:=
(
2
*
i
).
U
csBundle
(
2
*
i
+
2
).
ctrl
.
srcType
(
0
)
:=
SrcType
.
fp
csBundle
(
2
*
i
+
2
).
ctrl
.
srcType
(
2
)
:=
SrcType
.
vp
csBundle
(
2
*
i
+
2
).
ctrl
.
lsrc
(
0
)
:=
FP_TMP_REG_MV
.
U
csBundle
(
2
*
i
+
2
).
ctrl
.
lsrc
(
1
)
:=
src2
+
(
2
*
i
+
1
).
U
csBundle
(
2
*
i
+
2
).
ctrl
.
lsrc
(
2
)
:=
VECTOR_TMP_REG_LMUL
.
U
...
...
@@ -386,12 +403,10 @@ class DecodeUnitComp(maxNumOfUop : Int)(implicit p : Parameters) extends XSModul
}
}
is
(
UopDivType
.
VEC_VVM
)
{
csBundle
(
0
).
ctrl
.
srcType
(
2
)
:=
SrcType
.
vp
csBundle
(
0
).
ctrl
.
lsrc
(
2
)
:=
dest
csBundle
(
0
).
ctrl
.
ldest
:=
VECTOR_TMP_REG_LMUL
.
U
csBundle
(
0
).
ctrl
.
uopIdx
:=
0.
U
for
(
i
<-
1
until
MAX_VLMUL
)
{
csBundle
(
i
).
ctrl
.
srcType
(
2
)
:=
SrcType
.
vp
csBundle
(
i
).
ctrl
.
lsrc
(
0
)
:=
src1
+
i
.
U
csBundle
(
i
).
ctrl
.
lsrc
(
1
)
:=
src2
+
i
.
U
csBundle
(
i
).
ctrl
.
lsrc
(
2
)
:=
VECTOR_TMP_REG_LMUL
.
U
...
...
@@ -423,14 +438,12 @@ class DecodeUnitComp(maxNumOfUop : Int)(implicit p : Parameters) extends XSModul
csBundle
(
0
).
ctrl
.
fpu
.
fcvt
:=
false
.
B
//LMUL
csBundle
(
1
).
ctrl
.
srcType
(
0
)
:=
SrcType
.
fp
csBundle
(
1
).
ctrl
.
srcType
(
2
)
:=
SrcType
.
vp
csBundle
(
1
).
ctrl
.
lsrc
(
0
)
:=
FP_TMP_REG_MV
.
U
csBundle
(
1
).
ctrl
.
lsrc
(
2
)
:=
dest
csBundle
(
1
).
ctrl
.
ldest
:=
VECTOR_TMP_REG_LMUL
.
U
csBundle
(
1
).
ctrl
.
uopIdx
:=
0.
U
for
(
i
<-
1
until
MAX_VLMUL
)
{
csBundle
(
i
+
1
).
ctrl
.
srcType
(
0
)
:=
SrcType
.
fp
csBundle
(
i
+
1
).
ctrl
.
srcType
(
2
)
:=
SrcType
.
vp
csBundle
(
i
+
1
).
ctrl
.
lsrc
(
0
)
:=
FP_TMP_REG_MV
.
U
csBundle
(
i
+
1
).
ctrl
.
lsrc
(
1
)
:=
src2
+
i
.
U
csBundle
(
i
+
1
).
ctrl
.
lsrc
(
2
)
:=
VECTOR_TMP_REG_LMUL
.
U
...
...
src/main/scala/xiangshan/backend/decode/VecDecoder.scala
浏览文件 @
7e79df6b
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录