Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenXiangShan
XiangShan
提交
e2695e90
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 搜索 >>
未验证
提交
e2695e90
编写于
4月 28, 2023
作者:
Z
zhanglyGit
提交者:
GitHub
4月 28, 2023
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Decode: optimize coding style (#2063)
上级
a7fe2f40
变更
7
展开全部
隐藏空白更改
内联
并排
Showing
7 changed file
with
250 addition
and
247 deletion
+250
-247
src/main/scala/xiangshan/Bundle.scala
src/main/scala/xiangshan/Bundle.scala
+2
-2
src/main/scala/xiangshan/backend/decode/DecodeStage.scala
src/main/scala/xiangshan/backend/decode/DecodeStage.scala
+12
-12
src/main/scala/xiangshan/backend/decode/DecodeUnit.scala
src/main/scala/xiangshan/backend/decode/DecodeUnit.scala
+8
-8
src/main/scala/xiangshan/backend/decode/DecodeUnitComplex.scala
...in/scala/xiangshan/backend/decode/DecodeUnitComplex.scala
+93
-90
src/main/scala/xiangshan/backend/decode/VecDecoder.scala
src/main/scala/xiangshan/backend/decode/VecDecoder.scala
+132
-132
src/main/scala/xiangshan/backend/fu/vector/VIPU.scala
src/main/scala/xiangshan/backend/fu/vector/VIPU.scala
+1
-1
src/main/scala/xiangshan/package.scala
src/main/scala/xiangshan/package.scala
+2
-2
未找到文件。
src/main/scala/xiangshan/Bundle.scala
浏览文件 @
e2695e90
...
...
@@ -179,7 +179,7 @@ class CtrlSignals(implicit p: Parameters) extends XSBundle {
val
noSpecExec
=
Bool
()
// wait forward
val
blockBackward
=
Bool
()
// block backward
val
flushPipe
=
Bool
()
// This inst will flush all the pipe when commit, like exception but can commit
val
uop
DivType
=
UopDiv
Type
()
val
uop
SplitType
=
UopSplit
Type
()
val
selImm
=
SelImm
()
val
imm
=
UInt
(
ImmUnion
.
maxLen
.
W
)
val
commitType
=
CommitType
()
...
...
@@ -196,7 +196,7 @@ class CtrlSignals(implicit p: Parameters) extends XSBundle {
val
replayInst
=
Bool
()
private
def
allSignals
=
srcType
.
take
(
3
)
++
Seq
(
fuType
,
fuOpType
,
rfWen
,
fpWen
,
vecWen
,
isXSTrap
,
noSpecExec
,
blockBackward
,
flushPipe
,
uop
Div
Type
,
selImm
)
isXSTrap
,
noSpecExec
,
blockBackward
,
flushPipe
,
uop
Split
Type
,
selImm
)
def
decode
(
inst
:
UInt
,
table
:
Iterable
[(
BitPat
,
List
[
BitPat
])])
:
CtrlSignals
=
{
val
decoder
=
freechips
.
rocketchip
.
rocket
.
DecodeLogic
(
inst
,
XDecode
.
decodeDefault
,
table
,
EspressoMinimizer
)
...
...
src/main/scala/xiangshan/backend/decode/DecodeStage.scala
浏览文件 @
e2695e90
...
...
@@ -115,7 +115,7 @@ class DecodeStage(implicit p: Parameters) extends XSModule with HasPerfEvents {
val
robCommits
=
Input
(
new
RobCommitIO
)
})
val
decoderComp
=
Module
(
new
DecodeUnitComp
(
MaxUopSize
))
val
decoderComp
lex
=
Module
(
new
DecodeUnitComplex
(
MaxUopSize
))
val
decoders
=
Seq
.
fill
(
DecodeWidth
-
1
)(
Module
(
new
DecodeUnit
))
val
debug_globalCounter
=
RegInit
(
0.
U
(
XLEN
.
W
))
val
vconfigGen
=
Module
(
new
VConfigGen
)
...
...
@@ -128,17 +128,17 @@ class DecodeStage(implicit p: Parameters) extends XSModule with HasPerfEvents {
val
cfSimple
=
Wire
(
Vec
(
DecodeWidth
-
1
,
new
CfCtrl
))
//Comp 1
decoderComp
.
io
.
enq
.
ctrl_flow
:=
io
.
in
(
0
).
bits
decoderComp
.
io
.
csrCtrl
:=
io
.
csrCtrl
decoderComp
.
io
.
vconfig
:=
vconfigGen
.
io
.
vconfigPre
decoderComp
.
io
.
isComplex
:=
isComplex
decoderComp
.
io
.
validFromIBuf
.
zip
(
io
.
in
).
map
{
case
(
dst
,
src
)
=>
dst
:=
src
.
valid
}
decoderComp
.
io
.
readyFromRename
.
zip
(
io
.
out
).
map
{
case
(
dst
,
src
)
=>
dst
:=
src
.
ready
}
cfComplex
:=
decoderComp
.
io
.
deq
.
cf_ctrl
io
.
out
.
zip
(
decoderComp
.
io
.
deq
.
validToRename
).
map
{
case
(
dst
,
src
)
=>
dst
.
valid
:=
src
}
io
.
in
.
zip
(
decoderComp
.
io
.
deq
.
readyToIBuf
).
map
{
case
(
dst
,
src
)
=>
dst
.
ready
:=
src
}
isFirstVset
:=
decoderComp
.
io
.
deq
.
isVset
complexNum
:=
decoderComp
.
io
.
deq
.
complexNum
decoderComp
lex
.
io
.
enq
.
ctrl_flow
:=
io
.
in
(
0
).
bits
decoderComp
lex
.
io
.
csrCtrl
:=
io
.
csrCtrl
decoderComp
lex
.
io
.
vconfig
:=
vconfigGen
.
io
.
vconfigPre
decoderComp
lex
.
io
.
isComplex
:=
isComplex
decoderComp
lex
.
io
.
validFromIBuf
.
zip
(
io
.
in
).
map
{
case
(
dst
,
src
)
=>
dst
:=
src
.
valid
}
decoderComp
lex
.
io
.
readyFromRename
.
zip
(
io
.
out
).
map
{
case
(
dst
,
src
)
=>
dst
:=
src
.
ready
}
cfComplex
:=
decoderComp
lex
.
io
.
deq
.
cf_ctrl
io
.
out
.
zip
(
decoderComp
lex
.
io
.
deq
.
validToRename
).
map
{
case
(
dst
,
src
)
=>
dst
.
valid
:=
src
}
io
.
in
.
zip
(
decoderComp
lex
.
io
.
deq
.
readyToIBuf
).
map
{
case
(
dst
,
src
)
=>
dst
.
ready
:=
src
}
isFirstVset
:=
decoderComp
lex
.
io
.
deq
.
isVset
complexNum
:=
decoderComp
lex
.
io
.
deq
.
complexNum
//Simple 5
decoders
.
zip
(
io
.
in
.
drop
(
1
)).
map
{
case
(
dst
,
src
)
=>
dst
.
io
.
enq
.
ctrl_flow
:=
src
.
bits
}
...
...
src/main/scala/xiangshan/backend/decode/DecodeUnit.scala
浏览文件 @
e2695e90
...
...
@@ -46,9 +46,9 @@ abstract trait DecodeConstants {
// | | | | | | | | | noSpecExec
// | | | | | | | | | | blockBackward
// | | | | | | | | | | | flushPipe
// | | | | | | | | | | | | uop
Div
Type
// | | | | | | | | | | | | uop
Split
Type
// | | | | | | | | | | | | | selImm
List
(
SrcType
.
X
,
SrcType
.
X
,
SrcType
.
X
,
FuType
.
X
,
FuOpType
.
X
,
N
,
N
,
N
,
N
,
N
,
N
,
N
,
Uop
Div
Type
.
X
,
SelImm
.
INVALID_INSTR
)
List
(
SrcType
.
X
,
SrcType
.
X
,
SrcType
.
X
,
FuType
.
X
,
FuOpType
.
X
,
N
,
N
,
N
,
N
,
N
,
N
,
N
,
Uop
Split
Type
.
X
,
SelImm
.
INVALID_INSTR
)
}
// Use SelImm to indicate invalid instr
val
decodeArray
:
Array
[(
BitPat
,
XSDecodeBase
)]
...
...
@@ -85,7 +85,7 @@ abstract class XSDecodeBase {
case
class
XSDecode
(
src1
:
BitPat
,
src2
:
BitPat
,
src3
:
BitPat
,
fu
:
BitPat
,
fuOp
:
BitPat
,
selImm
:
BitPat
,
uop
DivType
:
BitPat
=
UopDiv
Type
.
X
,
uop
SplitType
:
BitPat
=
UopSplit
Type
.
X
,
xWen
:
Boolean
=
false
,
fWen
:
Boolean
=
false
,
vWen
:
Boolean
=
false
,
...
...
@@ -96,14 +96,14 @@ case class XSDecode(
flushPipe
:
Boolean
=
false
,
)
extends
XSDecodeBase
{
def
generate
()
:
List
[
BitPat
]
=
{
List
(
src1
,
src2
,
src3
,
fu
,
fuOp
,
xWen
.
B
,
fWen
.
B
,
(
vWen
||
mWen
).
B
,
xsTrap
.
B
,
noSpec
.
B
,
blockBack
.
B
,
flushPipe
.
B
,
uop
Div
Type
,
selImm
)
List
(
src1
,
src2
,
src3
,
fu
,
fuOp
,
xWen
.
B
,
fWen
.
B
,
(
vWen
||
mWen
).
B
,
xsTrap
.
B
,
noSpec
.
B
,
blockBack
.
B
,
flushPipe
.
B
,
uop
Split
Type
,
selImm
)
}
}
case
class
FDecode
(
src1
:
BitPat
,
src2
:
BitPat
,
src3
:
BitPat
,
fu
:
BitPat
,
fuOp
:
BitPat
,
selImm
:
BitPat
=
SelImm
.
X
,
uop
DivType
:
BitPat
=
UopDiv
Type
.
X
,
uop
SplitType
:
BitPat
=
UopSplit
Type
.
X
,
xWen
:
Boolean
=
false
,
fWen
:
Boolean
=
false
,
vWen
:
Boolean
=
false
,
...
...
@@ -114,7 +114,7 @@ case class FDecode(
flushPipe
:
Boolean
=
false
,
)
extends
XSDecodeBase
{
def
generate
()
:
List
[
BitPat
]
=
{
XSDecode
(
src1
,
src2
,
src3
,
fu
,
fuOp
,
selImm
,
uop
Div
Type
,
xWen
,
fWen
,
vWen
,
mWen
,
xsTrap
,
noSpec
,
blockBack
,
flushPipe
).
generate
()
XSDecode
(
src1
,
src2
,
src3
,
fu
,
fuOp
,
selImm
,
uop
Split
Type
,
xWen
,
fWen
,
vWen
,
mWen
,
xsTrap
,
noSpec
,
blockBack
,
flushPipe
).
generate
()
}
}
...
...
@@ -196,7 +196,7 @@ object XDecode extends DecodeConstants {
AUIPC
->
XSDecode
(
SrcType
.
pc
,
SrcType
.
imm
,
SrcType
.
X
,
FuType
.
jmp
,
JumpOpType
.
auipc
,
SelImm
.
IMM_U
,
xWen
=
T
),
JAL
->
XSDecode
(
SrcType
.
pc
,
SrcType
.
imm
,
SrcType
.
X
,
FuType
.
jmp
,
JumpOpType
.
jal
,
SelImm
.
IMM_UJ
,
xWen
=
T
),
JALR
->
XSDecode
(
SrcType
.
reg
,
SrcType
.
imm
,
SrcType
.
X
,
FuType
.
jmp
,
JumpOpType
.
jalr
,
SelImm
.
IMM_I
,
uop
DivType
=
UopDiv
Type
.
SCA_SIM
,
xWen
=
T
),
JALR
->
XSDecode
(
SrcType
.
reg
,
SrcType
.
imm
,
SrcType
.
X
,
FuType
.
jmp
,
JumpOpType
.
jalr
,
SelImm
.
IMM_I
,
uop
SplitType
=
UopSplit
Type
.
SCA_SIM
,
xWen
=
T
),
BEQ
->
XSDecode
(
SrcType
.
reg
,
SrcType
.
reg
,
SrcType
.
X
,
FuType
.
alu
,
ALUOpType
.
beq
,
SelImm
.
IMM_SB
),
BNE
->
XSDecode
(
SrcType
.
reg
,
SrcType
.
reg
,
SrcType
.
X
,
FuType
.
alu
,
ALUOpType
.
bne
,
SelImm
.
IMM_SB
),
BGE
->
XSDecode
(
SrcType
.
reg
,
SrcType
.
reg
,
SrcType
.
X
,
FuType
.
alu
,
ALUOpType
.
bge
,
SelImm
.
IMM_SB
),
...
...
@@ -750,7 +750,7 @@ class DecodeUnit(implicit p: Parameters) extends XSModule with DecodeUnitConstan
io
.
deq
.
cf_ctrl
:=
cf_ctrl
io
.
deq
.
isVset
:=
FuType
.
isIntExu
(
cs
.
fuType
)
&&
ALUOpType
.
isVset
(
cs
.
fuOpType
)
io
.
deq
.
isComplex
:=
Uop
DivType
.
needSplit
(
cs
.
uopDiv
Type
)
io
.
deq
.
isComplex
:=
Uop
SplitType
.
needSplit
(
cs
.
uopSplit
Type
)
//-------------------------------------------------------------
// Debug Info
...
...
src/main/scala/xiangshan/backend/decode/DecodeUnitComp.scala
→
src/main/scala/xiangshan/backend/decode/DecodeUnitComp
lex
.scala
浏览文件 @
e2695e90
...
...
@@ -37,7 +37,7 @@ trait VectorConstants {
val
VECTOR_TMP_REG_LMUL
=
32
// 32~46 -> 15
}
class
DecodeUnitCompIO
(
implicit
p
:
Parameters
)
extends
XSBundle
{
class
DecodeUnitComp
lex
IO
(
implicit
p
:
Parameters
)
extends
XSBundle
{
val
enq
=
new
Bundle
{
val
ctrl_flow
=
Input
(
new
CtrlFlow
)
}
val
vconfig
=
Input
(
new
VConfig
)
val
isComplex
=
Input
(
Vec
(
DecodeWidth
-
1
,
Bool
()))
...
...
@@ -53,8 +53,8 @@ class DecodeUnitCompIO(implicit p: Parameters) extends XSBundle {
val
csrCtrl
=
Input
(
new
CustomCSRCtrlIO
)
}
class
DecodeUnitComp
(
maxNumOfUop
:
Int
)(
implicit
p
:
Parameters
)
extends
XSModule
with
DecodeUnitConstants
with
VectorConstants
{
val
io
=
IO
(
new
DecodeUnitCompIO
)
class
DecodeUnitComp
lex
(
maxNumOfUop
:
Int
)(
implicit
p
:
Parameters
)
extends
XSModule
with
DecodeUnitConstants
with
VectorConstants
{
val
io
=
IO
(
new
DecodeUnitComp
lex
IO
)
//input bits
val
ctrl_flow
=
Wire
(
new
CtrlFlow
)
ctrl_flow
:=
io
.
enq
.
ctrl_flow
...
...
@@ -65,19 +65,19 @@ class DecodeUnitComp(maxNumOfUop : Int)(implicit p : Parameters) extends XSModul
val
complexNum
=
Wire
(
UInt
(
3.
W
))
//output of DecodeUnit
val
cf_ctrl_
u
=
Wire
(
new
CfCtrl
)
val
isVset_
u
=
Wire
(
Bool
())
val
cf_ctrl_
simple
=
Wire
(
new
CfCtrl
)
val
isVset_
simple
=
Wire
(
Bool
())
//pre decode
val
simple
=
Module
(
new
DecodeUnit
)
simple
.
io
.
enq
.
ctrl_flow
:=
ctrl_flow
simple
.
io
.
vconfig
:=
io
.
vconfig
simple
.
io
.
csrCtrl
:=
io
.
csrCtrl
cf_ctrl_
u
:=
simple
.
io
.
deq
.
cf_ctrl
isVset_
u
:=
simple
.
io
.
deq
.
isVset
cf_ctrl_
simple
:=
simple
.
io
.
deq
.
cf_ctrl
isVset_
simple
:=
simple
.
io
.
deq
.
isVset
//Type of uop Div
val
typeOf
Div
=
cf_ctrl_u
.
ctrl
.
uopDiv
Type
val
typeOf
Split
=
cf_ctrl_simple
.
ctrl
.
uopSplit
Type
//LMUL
val
lmul
=
MuxLookup
(
simple
.
io
.
vconfig
.
vtype
.
vlmul
,
1.
U
(
4.
W
),
Array
(
...
...
@@ -95,43 +95,43 @@ class DecodeUnitComp(maxNumOfUop : Int)(implicit p : Parameters) extends XSModul
"b010"
.
U
->
16.
U
,
"b011"
.
U
->
64.
U
))
val
numOfUopVrgatherei16
=
Mux
((!
simple
.
io
.
vconfig
.
vtype
.
vsew
.
orR
())
&&
(
simple
.
io
.
vconfig
.
vtype
.
vlmul
=/=
"b011"
.
U
),
Cat
(
numOfUopVrgather
,
0.
U
(
1.
W
)),
val
numOfUopVrgatherei16
=
Mux
((!
simple
.
io
.
vconfig
.
vtype
.
vsew
.
orR
())
&&
(
simple
.
io
.
vconfig
.
vtype
.
vlmul
=/=
"b011"
.
U
),
Cat
(
numOfUopVrgather
,
0.
U
(
1.
W
)),
numOfUopVrgather
)
//number of uop
val
numOfUop
=
MuxLookup
(
typeOf
Div
,
1.
U
(
log2Up
(
maxNumOfUop
+
1
).
W
),
Array
(
Uop
Div
Type
.
VEC_0XV
->
2.
U
,
Uop
Div
Type
.
DIR
->
2.
U
,
Uop
Div
Type
.
VEC_VVV
->
lmul
,
Uop
Div
Type
.
VEC_EXT2
->
lmul
,
Uop
Div
Type
.
VEC_EXT4
->
lmul
,
Uop
Div
Type
.
VEC_EXT8
->
lmul
,
Uop
Div
Type
.
VEC_VVM
->
lmul
,
Uop
Div
Type
.
VEC_VXM
->
(
lmul
+&
1.
U
),
Uop
Div
Type
.
VEC_VXV
->
(
lmul
+&
1.
U
),
Uop
Div
Type
.
VEC_VVW
->
Cat
(
lmul
,
0.
U
(
1.
W
)),
// lmul <= 4
Uop
Div
Type
.
VEC_WVW
->
Cat
(
lmul
,
0.
U
(
1.
W
)),
// lmul <= 4
Uop
Div
Type
.
VEC_VXW
->
Cat
(
lmul
,
1.
U
(
1.
W
)),
// lmul <= 4
Uop
Div
Type
.
VEC_WXW
->
Cat
(
lmul
,
1.
U
(
1.
W
)),
// lmul <= 4
Uop
Div
Type
.
VEC_WVV
->
Cat
(
lmul
,
0.
U
(
1.
W
)),
// lmul <= 4
Uop
Div
Type
.
VEC_WXV
->
Cat
(
lmul
,
1.
U
(
1.
W
)),
// lmul <= 4
Uop
Div
Type
.
VEC_SLIDE1UP
->
(
lmul
+&
1.
U
),
Uop
Div
Type
.
VEC_FSLIDE1UP
->
lmul
,
Uop
Div
Type
.
VEC_SLIDE1DOWN
->
Cat
(
lmul
,
0.
U
(
1.
W
)),
Uop
Div
Type
.
VEC_FSLIDE1DOWN
->
(
Cat
(
lmul
,
0.
U
(
1.
W
))
-
1.
U
),
Uop
Div
Type
.
VEC_VRED
->
lmul
,
Uop
Div
Type
.
VEC_SLIDEUP
->
(
numOfUopVslide
+
1.
U
),
Uop
Div
Type
.
VEC_ISLIDEUP
->
numOfUopVslide
,
Uop
Div
Type
.
VEC_SLIDEDOWN
->
(
numOfUopVslide
+
1.
U
),
Uop
Div
Type
.
VEC_ISLIDEDOWN
->
numOfUopVslide
,
Uop
Div
Type
.
VEC_M0X
->
(
lmul
+&
1.
U
),
Uop
Div
Type
.
VEC_MVV
->
(
Cat
(
lmul
,
0.
U
(
1.
W
))
-
1.
U
),
Uop
Div
Type
.
VEC_M0X_VFIRST
->
2.
U
,
Uop
Div
Type
.
VEC_VWW
->
Cat
(
lmul
,
0.
U
(
1.
W
)),
Uop
Div
Type
.
VEC_RGATHER
->
numOfUopVrgather
,
Uop
Div
Type
.
VEC_RGATHER_VX
->
(
numOfUopVrgather
+&
1.
U
),
Uop
Div
Type
.
VEC_RGATHEREI16
->
numOfUopVrgatherei16
,
val
numOfUop
=
MuxLookup
(
typeOf
Split
,
1.
U
(
log2Up
(
maxNumOfUop
+
1
).
W
),
Array
(
Uop
Split
Type
.
VEC_0XV
->
2.
U
,
Uop
Split
Type
.
DIR
->
2.
U
,
Uop
Split
Type
.
VEC_VVV
->
lmul
,
Uop
Split
Type
.
VEC_EXT2
->
lmul
,
Uop
Split
Type
.
VEC_EXT4
->
lmul
,
Uop
Split
Type
.
VEC_EXT8
->
lmul
,
Uop
Split
Type
.
VEC_VVM
->
lmul
,
Uop
Split
Type
.
VEC_VXM
->
(
lmul
+&
1.
U
),
Uop
Split
Type
.
VEC_VXV
->
(
lmul
+&
1.
U
),
Uop
Split
Type
.
VEC_VVW
->
Cat
(
lmul
,
0.
U
(
1.
W
)),
// lmul <= 4
Uop
Split
Type
.
VEC_WVW
->
Cat
(
lmul
,
0.
U
(
1.
W
)),
// lmul <= 4
Uop
Split
Type
.
VEC_VXW
->
Cat
(
lmul
,
1.
U
(
1.
W
)),
// lmul <= 4
Uop
Split
Type
.
VEC_WXW
->
Cat
(
lmul
,
1.
U
(
1.
W
)),
// lmul <= 4
Uop
Split
Type
.
VEC_WVV
->
Cat
(
lmul
,
0.
U
(
1.
W
)),
// lmul <= 4
Uop
Split
Type
.
VEC_WXV
->
Cat
(
lmul
,
1.
U
(
1.
W
)),
// lmul <= 4
Uop
Split
Type
.
VEC_SLIDE1UP
->
(
lmul
+&
1.
U
),
Uop
Split
Type
.
VEC_FSLIDE1UP
->
lmul
,
Uop
Split
Type
.
VEC_SLIDE1DOWN
->
Cat
(
lmul
,
0.
U
(
1.
W
)),
Uop
Split
Type
.
VEC_FSLIDE1DOWN
->
(
Cat
(
lmul
,
0.
U
(
1.
W
))
-
1.
U
),
Uop
Split
Type
.
VEC_VRED
->
lmul
,
Uop
Split
Type
.
VEC_SLIDEUP
->
(
numOfUopVslide
+
1.
U
),
Uop
Split
Type
.
VEC_ISLIDEUP
->
numOfUopVslide
,
Uop
Split
Type
.
VEC_SLIDEDOWN
->
(
numOfUopVslide
+
1.
U
),
Uop
Split
Type
.
VEC_ISLIDEDOWN
->
numOfUopVslide
,
Uop
Split
Type
.
VEC_M0X
->
(
lmul
+&
1.
U
),
Uop
Split
Type
.
VEC_MVV
->
(
Cat
(
lmul
,
0.
U
(
1.
W
))
-
1.
U
),
Uop
Split
Type
.
VEC_M0X_VFIRST
->
2.
U
,
Uop
Split
Type
.
VEC_VWW
->
Cat
(
lmul
,
0.
U
(
1.
W
)),
Uop
Split
Type
.
VEC_RGATHER
->
numOfUopVrgather
,
Uop
Split
Type
.
VEC_RGATHER_VX
->
(
numOfUopVrgather
+&
1.
U
),
Uop
Split
Type
.
VEC_RGATHEREI16
->
numOfUopVrgatherei16
,
))
val
src1
=
Cat
(
0.
U
(
1.
W
),
ctrl_flow
.
instr
(
19
,
15
))
...
...
@@ -141,7 +141,7 @@ class DecodeUnitComp(maxNumOfUop : Int)(implicit p : Parameters) extends XSModul
//uop div up to maxNumOfUop
val
csBundle
=
Wire
(
Vec
(
maxNumOfUop
,
new
CfCtrl
))
csBundle
.
map
{
case
dst
=>
dst
:=
cf_ctrl_
u
dst
:=
cf_ctrl_
simple
dst
.
ctrl
.
firstUop
:=
false
.
B
dst
.
ctrl
.
lastUop
:=
false
.
B
}
...
...
@@ -149,16 +149,16 @@ class DecodeUnitComp(maxNumOfUop : Int)(implicit p : Parameters) extends XSModul
csBundle
(
0
).
ctrl
.
firstUop
:=
true
.
B
csBundle
(
numOfUop
-
1.
U
).
ctrl
.
lastUop
:=
true
.
B
switch
(
typeOf
Div
)
{
is
(
Uop
Div
Type
.
DIR
)
{
when
(
isVset_
u
)
{
csBundle
(
0
).
ctrl
.
flushPipe
:=
ALUOpType
.
isVsetvli
(
cf_ctrl_
u
.
ctrl
.
fuOpType
)
&&
cf_ctrl_u
.
ctrl
.
lsrc
(
0
).
orR
||
ALUOpType
.
isVsetvl
(
cf_ctrl_u
.
ctrl
.
fuOpType
)
csBundle
(
0
).
ctrl
.
fuOpType
:=
ALUOpType
.
vsetExchange
(
cf_ctrl_
u
.
ctrl
.
fuOpType
)
switch
(
typeOf
Split
)
{
is
(
Uop
Split
Type
.
DIR
)
{
when
(
isVset_
simple
)
{
csBundle
(
0
).
ctrl
.
flushPipe
:=
ALUOpType
.
isVsetvli
(
cf_ctrl_
simple
.
ctrl
.
fuOpType
)
&&
cf_ctrl_simple
.
ctrl
.
lsrc
(
0
).
orR
||
ALUOpType
.
isVsetvl
(
cf_ctrl_simple
.
ctrl
.
fuOpType
)
csBundle
(
0
).
ctrl
.
fuOpType
:=
ALUOpType
.
vsetExchange
(
cf_ctrl_
simple
.
ctrl
.
fuOpType
)
csBundle
(
1
).
ctrl
.
ldest
:=
INT_VCONFIG
.
U
csBundle
(
1
).
ctrl
.
flushPipe
:=
false
.
B
}
}
is
(
Uop
Div
Type
.
VEC_VVV
)
{
is
(
Uop
Split
Type
.
VEC_VVV
)
{
for
(
i
<-
0
until
MAX_VLMUL
)
{
csBundle
(
i
).
ctrl
.
lsrc
(
0
)
:=
src1
+
i
.
U
csBundle
(
i
).
ctrl
.
lsrc
(
1
)
:=
src2
+
i
.
U
...
...
@@ -167,7 +167,7 @@ class DecodeUnitComp(maxNumOfUop : Int)(implicit p : Parameters) extends XSModul
csBundle
(
i
).
ctrl
.
uopIdx
:=
i
.
U
}
}
is
(
Uop
Div
Type
.
VEC_EXT2
)
{
is
(
Uop
Split
Type
.
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
...
...
@@ -179,7 +179,7 @@ class DecodeUnitComp(maxNumOfUop : Int)(implicit p : Parameters) extends XSModul
csBundle
(
2
*
i
+
1
).
ctrl
.
uopIdx
:=
(
2
*
i
+
1
).
U
}
}
is
(
Uop
Div
Type
.
VEC_EXT4
)
{
is
(
Uop
Split
Type
.
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
...
...
@@ -199,7 +199,7 @@ class DecodeUnitComp(maxNumOfUop : Int)(implicit p : Parameters) extends XSModul
csBundle
(
4
*
i
+
3
).
ctrl
.
uopIdx
:=
(
4
*
i
+
3
).
U
}
}
is
(
Uop
Div
Type
.
VEC_EXT8
)
{
is
(
Uop
Split
Type
.
VEC_EXT8
)
{
for
(
i
<-
0
until
MAX_VLMUL
)
{
csBundle
(
i
).
ctrl
.
lsrc
(
1
)
:=
src2
csBundle
(
i
).
ctrl
.
lsrc
(
2
)
:=
dest
+
i
.
U
...
...
@@ -207,7 +207,7 @@ class DecodeUnitComp(maxNumOfUop : Int)(implicit p : Parameters) extends XSModul
csBundle
(
i
).
ctrl
.
uopIdx
:=
i
.
U
}
}
is
(
Uop
Div
Type
.
VEC_0XV
)
{
is
(
Uop
Split
Type
.
VEC_0XV
)
{
/*
FMV.D.X
*/
...
...
@@ -244,7 +244,7 @@ class DecodeUnitComp(maxNumOfUop : Int)(implicit p : Parameters) extends XSModul
csBundle
(
1
).
ctrl
.
fpWen
:=
false
.
B
csBundle
(
1
).
ctrl
.
vecWen
:=
true
.
B
}
is
(
Uop
Div
Type
.
VEC_VXV
)
{
is
(
Uop
Split
Type
.
VEC_VXV
)
{
/*
FMV.D.X
*/
...
...
@@ -277,7 +277,7 @@ class DecodeUnitComp(maxNumOfUop : Int)(implicit p : Parameters) extends XSModul
csBundle
(
i
+
1
).
ctrl
.
uopIdx
:=
i
.
U
}
}
is
(
Uop
Div
Type
.
VEC_VVW
)
{
is
(
Uop
Split
Type
.
VEC_VVW
)
{
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
...
...
@@ -291,7 +291,7 @@ class DecodeUnitComp(maxNumOfUop : Int)(implicit p : Parameters) extends XSModul
csBundle
(
2
*
i
+
1
).
ctrl
.
uopIdx
:=
(
2
*
i
+
1
).
U
}
}
is
(
Uop
Div
Type
.
VEC_WVW
)
{
is
(
Uop
Split
Type
.
VEC_WVW
)
{
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
...
...
@@ -305,7 +305,7 @@ class DecodeUnitComp(maxNumOfUop : Int)(implicit p : Parameters) extends XSModul
csBundle
(
2
*
i
+
1
).
ctrl
.
uopIdx
:=
(
2
*
i
+
1
).
U
}
}
is
(
Uop
Div
Type
.
VEC_VXW
)
{
is
(
Uop
Split
Type
.
VEC_VXW
)
{
/*
FMV.D.X
*/
...
...
@@ -342,7 +342,7 @@ class DecodeUnitComp(maxNumOfUop : Int)(implicit p : Parameters) extends XSModul
csBundle
(
2
*
i
+
2
).
ctrl
.
uopIdx
:=
(
2
*
i
+
1
).
U
}
}
is
(
Uop
Div
Type
.
VEC_WXW
)
{
is
(
Uop
Split
Type
.
VEC_WXW
)
{
/*
FMV.D.X
*/
...
...
@@ -379,7 +379,7 @@ class DecodeUnitComp(maxNumOfUop : Int)(implicit p : Parameters) extends XSModul
csBundle
(
2
*
i
+
2
).
ctrl
.
uopIdx
:=
(
2
*
i
+
1
).
U
}
}
is
(
Uop
Div
Type
.
VEC_WVV
)
{
is
(
Uop
Split
Type
.
VEC_WVV
)
{
for
(
i
<-
0
until
MAX_VLMUL
/
2
)
{
csBundle
(
2
*
i
).
ctrl
.
lsrc
(
0
)
:=
src1
+
i
.
U
...
...
@@ -394,7 +394,7 @@ class DecodeUnitComp(maxNumOfUop : Int)(implicit p : Parameters) extends XSModul
csBundle
(
2
*
i
+
1
).
ctrl
.
uopIdx
:=
(
2
*
i
+
1
).
U
}
}
is
(
Uop
Div
Type
.
VEC_WXV
)
{
is
(
Uop
Split
Type
.
VEC_WXV
)
{
/*
FMV.D.X
*/
...
...
@@ -431,7 +431,7 @@ class DecodeUnitComp(maxNumOfUop : Int)(implicit p : Parameters) extends XSModul
csBundle
(
2
*
i
+
2
).
ctrl
.
uopIdx
:=
(
2
*
i
+
1
).
U
}
}
is
(
Uop
Div
Type
.
VEC_VVM
)
{
is
(
Uop
Split
Type
.
VEC_VVM
)
{
csBundle
(
0
).
ctrl
.
lsrc
(
2
)
:=
dest
csBundle
(
0
).
ctrl
.
ldest
:=
VECTOR_TMP_REG_LMUL
.
U
csBundle
(
0
).
ctrl
.
uopIdx
:=
0.
U
...
...
@@ -444,7 +444,7 @@ class DecodeUnitComp(maxNumOfUop : Int)(implicit p : Parameters) extends XSModul
}
csBundle
(
numOfUop
-
1.
U
).
ctrl
.
ldest
:=
dest
}
is
(
Uop
Div
Type
.
VEC_VXM
)
{
is
(
Uop
Split
Type
.
VEC_VXM
)
{
/*
FMV.D.X
*/
...
...
@@ -481,7 +481,7 @@ class DecodeUnitComp(maxNumOfUop : Int)(implicit p : Parameters) extends XSModul
}
csBundle
(
numOfUop
-
1.
U
).
ctrl
.
ldest
:=
dest
}
is
(
Uop
Div
Type
.
VEC_SLIDE1UP
)
{
is
(
Uop
Split
Type
.
VEC_SLIDE1UP
)
{
/*
FMV.D.X
*/
...
...
@@ -517,7 +517,7 @@ class DecodeUnitComp(maxNumOfUop : Int)(implicit p : Parameters) extends XSModul
csBundle
(
i
+
1
).
ctrl
.
uopIdx
:=
i
.
U
}
}
is
(
Uop
Div
Type
.
VEC_FSLIDE1UP
)
{
is
(
Uop
Split
Type
.
VEC_FSLIDE1UP
)
{
//LMUL
csBundle
(
0
).
ctrl
.
srcType
(
0
)
:=
SrcType
.
fp
csBundle
(
0
).
ctrl
.
lsrc
(
0
)
:=
src1
...
...
@@ -534,7 +534,7 @@ class DecodeUnitComp(maxNumOfUop : Int)(implicit p : Parameters) extends XSModul
csBundle
(
i
).
ctrl
.
uopIdx
:=
i
.
U
}
}
is
(
Uop
Div
Type
.
VEC_SLIDE1DOWN
)
{
// lmul+lmul = 16
is
(
Uop
Split
Type
.
VEC_SLIDE1DOWN
)
{
// lmul+lmul = 16
/*
FMV.D.X
*/
...
...
@@ -577,7 +577,7 @@ class DecodeUnitComp(maxNumOfUop : Int)(implicit p : Parameters) extends XSModul
csBundle
(
numOfUop
-
1.
U
).
ctrl
.
lsrc
(
0
)
:=
FP_TMP_REG_MV
.
U
csBundle
(
numOfUop
-
1.
U
).
ctrl
.
ldest
:=
dest
+
lmul
-
1.
U
}
is
(
Uop
Div
Type
.
VEC_FSLIDE1DOWN
)
{
is
(
Uop
Split
Type
.
VEC_FSLIDE1DOWN
)
{
//LMUL
for
(
i
<-
0
until
MAX_VLMUL
)
{
csBundle
(
2
*
i
).
ctrl
.
srcType
(
0
)
:=
SrcType
.
vp
...
...
@@ -597,7 +597,7 @@ class DecodeUnitComp(maxNumOfUop : Int)(implicit p : Parameters) extends XSModul
csBundle
(
numOfUop
-
1.
U
).
ctrl
.
lsrc
(
0
)
:=
src1
csBundle
(
numOfUop
-
1.
U
).
ctrl
.
ldest
:=
dest
+
lmul
-
1.
U
}
is
(
Uop
Div
Type
.
VEC_VRED
)
{
is
(
Uop
Split
Type
.
VEC_VRED
)
{
when
(
simple
.
io
.
vconfig
.
vtype
.
vlmul
===
"b001"
.
U
){
csBundle
(
0
).
ctrl
.
srcType
(
2
)
:=
SrcType
.
DC
csBundle
(
0
).
ctrl
.
lsrc
(
0
)
:=
src2
+
1.
U
...
...
@@ -653,7 +653,7 @@ class DecodeUnitComp(maxNumOfUop : Int)(implicit p : Parameters) extends XSModul
}
}
is
(
Uop
Div
Type
.
VEC_SLIDEUP
)
{
is
(
Uop
Split
Type
.
VEC_SLIDEUP
)
{
// FMV.D.X
csBundle
(
0
).
ctrl
.
srcType
(
0
)
:=
SrcType
.
reg
csBundle
(
0
).
ctrl
.
srcType
(
1
)
:=
SrcType
.
imm
...
...
@@ -686,7 +686,7 @@ class DecodeUnitComp(maxNumOfUop : Int)(implicit p : Parameters) extends XSModul
}
}
is
(
Uop
Div
Type
.
VEC_ISLIDEUP
)
{
is
(
Uop
Split
Type
.
VEC_ISLIDEUP
)
{
// LMUL
for
(
i
<-
0
until
MAX_VLMUL
)
for
(
j
<-
0
to
i
){
...
...
@@ -699,7 +699,7 @@ class DecodeUnitComp(maxNumOfUop : Int)(implicit p : Parameters) extends XSModul
}
}
is
(
Uop
Div
Type
.
VEC_SLIDEDOWN
)
{
is
(
Uop
Split
Type
.
VEC_SLIDEDOWN
)
{
// FMV.D.X
csBundle
(
0
).
ctrl
.
srcType
(
0
)
:=
SrcType
.
reg
csBundle
(
0
).
ctrl
.
srcType
(
1
)
:=
SrcType
.
imm
...
...
@@ -734,7 +734,7 @@ class DecodeUnitComp(maxNumOfUop : Int)(implicit p : Parameters) extends XSModul
}
}
is
(
Uop
Div
Type
.
VEC_ISLIDEDOWN
)
{
is
(
Uop
Split
Type
.
VEC_ISLIDEDOWN
)
{
// LMUL
for
(
i
<-
0
until
MAX_VLMUL
)
for
(
j
<-
(
0
to
i
).
reverse
){
...
...
@@ -749,7 +749,7 @@ class DecodeUnitComp(maxNumOfUop : Int)(implicit p : Parameters) extends XSModul
}
}
is
(
Uop
Div
Type
.
VEC_M0X
)
{
is
(
Uop
Split
Type
.
VEC_M0X
)
{
// LMUL
for
(
i
<-
0
until
MAX_VLMUL
)
{
val
srcType0
=
if
(
i
==
0
)
SrcType
.
DC
else
SrcType
.
vp
...
...
@@ -788,7 +788,7 @@ class DecodeUnitComp(maxNumOfUop : Int)(implicit p : Parameters) extends XSModul
csBundle
(
lmul
).
ctrl
.
fpu
.
fcvt
:=
false
.
B
}
is
(
Uop
Div
Type
.
VEC_MVV
)
{
is
(
Uop
Split
Type
.
VEC_MVV
)
{
// LMUL
for
(
i
<-
0
until
MAX_VLMUL
)
{
val
srcType0
=
if
(
i
==
0
)
SrcType
.
DC
else
SrcType
.
vp
...
...
@@ -810,7 +810,7 @@ class DecodeUnitComp(maxNumOfUop : Int)(implicit p : Parameters) extends XSModul
}
}
is
(
Uop
Div
Type
.
VEC_M0X_VFIRST
)
{
is
(
Uop
Split
Type
.
VEC_M0X_VFIRST
)
{
// LMUL
csBundle
(
0
).
ctrl
.
rfWen
:=
false
.
B
csBundle
(
0
).
ctrl
.
fpWen
:=
true
.
B
...
...
@@ -836,7 +836,7 @@ class DecodeUnitComp(maxNumOfUop : Int)(implicit p : Parameters) extends XSModul
csBundle
(
1
).
ctrl
.
fpu
.
fcvt
:=
false
.
B
}
is
(
Uop
Div
Type
.
VEC_VWW
)
{
is
(
Uop
Split
Type
.
VEC_VWW
)
{
for
(
i
<-
0
until
MAX_VLMUL
*
2
)
{
when
(
i
.
U
<
lmul
){
csBundle
(
i
).
ctrl
.
srcType
(
2
)
:=
SrcType
.
DC
...
...
@@ -860,7 +860,7 @@ class DecodeUnitComp(maxNumOfUop : Int)(implicit p : Parameters) extends XSModul
}
}
is
(
Uop
Div
Type
.
VEC_RGATHER
)
{
is
(
Uop
Split
Type
.
VEC_RGATHER
)
{
def
genCsBundle_VEC_RGATHER
(
len
:
Int
)
:
Unit
={
for
(
i
<-
0
until
len
)
for
(
j
<-
0
until
len
)
{
...
...
@@ -891,7 +891,7 @@ class DecodeUnitComp(maxNumOfUop : Int)(implicit p : Parameters) extends XSModul
}
}
is
(
Uop
Div
Type
.
VEC_RGATHER_VX
)
{
is
(
Uop
Split
Type
.
VEC_RGATHER_VX
)
{
def
genCsBundle_RGATHER_VX
(
len
:
Int
)
:
Unit
={
for
(
i
<-
0
until
len
)
for
(
j
<-
0
until
len
)
{
...
...
@@ -946,7 +946,7 @@ class DecodeUnitComp(maxNumOfUop : Int)(implicit p : Parameters) extends XSModul
}
}
is
(
Uop
Div
Type
.
VEC_RGATHEREI16
)
{
is
(
Uop
Split
Type
.
VEC_RGATHEREI16
)
{
def
genCsBundle_VEC_RGATHEREI16_SEW8
(
len
:
Int
)
:
Unit
={
for
(
i
<-
0
until
len
)
for
(
j
<-
0
until
len
)
{
...
...
@@ -1018,32 +1018,35 @@ class DecodeUnitComp(maxNumOfUop : Int)(implicit p : Parameters) extends XSModul
}
//uops dispatch
val
normal
::
ext
::
Nil
=
Enum
(
2
)
val
stateReg
=
RegInit
(
normal
)
val
s_normal
::
s_ext
::
Nil
=
Enum
(
2
)
val
state
=
RegInit
(
s_normal
)
val
state_next
=
WireDefault
(
state
)
val
uopRes
=
RegInit
(
0.
U
)
//readyFromRename Counter
val
readyCounter
=
PriorityMuxDefault
(
io
.
readyFromRename
.
map
(
x
=>
!
x
).
zip
((
0
to
(
RenameWidth
-
1
)).
map
(
_
.
U
)),
RenameWidth
.
U
)
switch
(
state
Reg
)
{
is
(
normal
)
{
state
Reg
:=
Mux
(
io
.
validFromIBuf
(
0
)
&&
(
numOfUop
>
readyCounter
)
&&
(
readyCounter
=/=
0.
U
),
ext
,
normal
)
switch
(
state
)
{
is
(
s_
normal
)
{
state
_next
:=
Mux
(
io
.
validFromIBuf
(
0
)
&&
(
numOfUop
>
readyCounter
)
&&
(
readyCounter
=/=
0.
U
),
s_ext
,
s_
normal
)
}
is
(
ext
)
{
state
Reg
:=
Mux
(
io
.
validFromIBuf
(
0
)
&&
(
uopRes
>
readyCounter
),
ext
,
normal
)
is
(
s_
ext
)
{
state
_next
:=
Mux
(
io
.
validFromIBuf
(
0
)
&&
(
uopRes
>
readyCounter
),
s_ext
,
s_
normal
)
}
}
val
uopRes0
=
Mux
(
stateReg
===
normal
,
numOfUop
,
uopRes
)
val
uopResJudge
=
Mux
(
stateReg
===
normal
,
state
:=
state_next
val
uopRes0
=
Mux
(
state
===
s_normal
,
numOfUop
,
uopRes
)
val
uopResJudge
=
Mux
(
state
===
s_normal
,
io
.
validFromIBuf
(
0
)
&&
(
readyCounter
=/=
0.
U
)
&&
(
uopRes0
>
readyCounter
),
io
.
validFromIBuf
(
0
)
&&
(
uopRes0
>
readyCounter
))
uopRes
:=
Mux
(
uopResJudge
,
uopRes0
-
readyCounter
,
0.
U
)
for
(
i
<-
0
until
RenameWidth
)
{
cf_ctrl
(
i
)
:=
MuxCase
(
csBundle
(
i
),
Seq
(
(
state
Reg
===
normal
)
->
csBundle
(
i
),
(
state
Reg
===
ext
)
->
Mux
((
i
.
U
+
numOfUop
-
uopRes
)
<
maxNumOfUop
.
U
,
csBundle
(
i
.
U
+
numOfUop
-
uopRes
),
csBundle
(
maxNumOfUop
-
1
))
(
state
===
s_
normal
)
->
csBundle
(
i
),
(
state
===
s_
ext
)
->
Mux
((
i
.
U
+
numOfUop
-
uopRes
)
<
maxNumOfUop
.
U
,
csBundle
(
i
.
U
+
numOfUop
-
uopRes
),
csBundle
(
maxNumOfUop
-
1
))
))
}
...
...
@@ -1076,7 +1079,7 @@ class DecodeUnitComp(maxNumOfUop : Int)(implicit p : Parameters) extends XSModul
}
io
.
deq
.
cf_ctrl
:=
cf_ctrl
io
.
deq
.
isVset
:=
isVset_
u
io
.
deq
.
isVset
:=
isVset_
simple
io
.
deq
.
complexNum
:=
complexNum
io
.
deq
.
validToRename
:=
validToRename
io
.
deq
.
readyToIBuf
:=
readyToIBuf
...
...
src/main/scala/xiangshan/backend/decode/VecDecoder.scala
浏览文件 @
e2695e90
此差异已折叠。
点击以展开。
src/main/scala/xiangshan/backend/fu/vector/VIPU.scala
浏览文件 @
e2695e90
...
...
@@ -25,7 +25,7 @@ import utils._
import
utility._
import
yunsuan.vector.alu.
{
VAluOpcode
,
VIAlu
}
import
yunsuan.
{
VectorElementFormat
,
VipuType
}
import
xiangshan.
{
SelImm
,
SrcType
,
Uop
Div
Type
,
XSCoreParamsKey
,
XSModule
,
FuType
}
import
xiangshan.
{
SelImm
,
SrcType
,
Uop
Split
Type
,
XSCoreParamsKey
,
XSModule
,
FuType
}
import
scala.collection.Seq
...
...
src/main/scala/xiangshan/package.scala
浏览文件 @
e2695e90
...
...
@@ -557,7 +557,7 @@ package object xiangshan {
def
apply
()
=
UInt
(
4.
W
)
}
object
Uop
Div
Type
{
object
Uop
Split
Type
{
def
SCA_SIM
=
"b000000"
.
U
//
def
DIR
=
"b010001"
.
U
// dirty: vset
def
VEC_VVV
=
"b010010"
.
U
// VEC_VVV
...
...
@@ -597,7 +597,7 @@ package object xiangshan {
def
X
=
BitPat
(
"b000000"
)
def
apply
()
=
UInt
(
6.
W
)
def
needSplit
(
Uop
DivType
:
UInt
)
=
UopDivType
(
4
)
||
UopDiv
Type
(
5
)
def
needSplit
(
Uop
SplitType
:
UInt
)
=
UopSplitType
(
4
)
||
UopSplit
Type
(
5
)
}
object
ExceptionNO
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录