Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zfa: fix zfa extension opcode #157

Merged
merged 1 commit into from
Aug 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion src/main/scala/yunsuan/package.scala
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,10 @@ package object yunsuan {
def vfredmin = LiteralCat(0.U(1.W), 0.U(1.W), 0.U(1.W), VfaddOpCode.fmin_re)
def vfredosum = LiteralCat(0.U(1.W), 0.U(1.W), 0.U(1.W), VfaddOpCode.fsum_ore)
def vfwredosum= LiteralCat(0.U(1.W), 0.U(1.W), 1.U(1.W), VfaddOpCode.fsum_ore)
def fminm = LiteralCat(0.U(1.W), 0.U(1.W), 0.U(1.W), VfaddOpCode.fminm)
def fmaxm = LiteralCat(0.U(1.W), 0.U(1.W), 0.U(1.W), VfaddOpCode.fmaxm)
def fleq = LiteralCat(0.U(1.W), 0.U(1.W), 0.U(1.W), VfaddOpCode.fleq)
def fltq = LiteralCat(0.U(1.W), 0.U(1.W), 0.U(1.W), VfaddOpCode.fltq)
}

object VfaddOpCode {
Expand All @@ -475,6 +479,10 @@ package object yunsuan {
def fmin_re = "b10100".U(5.W)
def fmax_re = "b10101".U(5.W)
def fsum_ore = "b10110".U(5.W) // ordered
def fminm = "b11110".U(5.W)
def fmaxm = "b10011".U(5.W)
def fleq = "b11100".U(5.W)
def fltq = "b11011".U(5.W)
}

object VfmaType{
Expand Down Expand Up @@ -522,7 +530,7 @@ package object yunsuan {
}

object VfcvtType {
def width = 8
def width = 9
// f/i(input) ## f/i(output) ## intr's func1
def vfcvt_xufv = "b10_000000".U(8.W)
def vfcvt_xfv = "b10_000001".U(8.W)
Expand Down Expand Up @@ -555,6 +563,9 @@ object VfcvtType {
def fcvt_wu_h = "b10_001000".U(8.W)
def fcvt_l_h = "b10_011001".U(8.W)
def fcvt_lu_h = "b10_011000".U(8.W)
def fround = "b11_000000".U(8.W)
def froundnx = "b11_000100".U(8.W)
def fcvtmod_w_d = "b1_10_010001".U(9.W)
}


Expand Down
Loading