Skip to content

Commit

Permalink
[rocketv] fix vsetvl.
Browse files Browse the repository at this point in the history
  • Loading branch information
qinjun-li authored and Avimitin committed Aug 24, 2024
1 parent 7411a6c commit 1977961
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions rocketv/src/CSR.scala
Original file line number Diff line number Diff line change
Expand Up @@ -815,8 +815,7 @@ class CSR(val parameter: CSRParameter)
CSRs.vxrm -> v.states("vxrm"),
CSRs.vcsr -> v.states("vxrm") ## v.states("vxsat"),
CSRs.vstart -> v.states("vstart"),
CSRs.vtype -> v.states("vlmul") ## v.states("vsew") ## v.states("vta") ## v.states("vma") ## 0.U(23.W) ## v
.states("vill"),
CSRs.vtype -> v.states("vill") ## 0.U(23.W) ## v.states("vma") ## v.states("vta") ## v.states("vsew") ## v.states("vlmul"),
CSRs.vl -> v.states("vl"),
CSRs.vlenb -> v.constants("vlenb")
)
Expand Down
2 changes: 1 addition & 1 deletion rocketv/src/csr/V.scala
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class V(vlen: Int, hypervisor: Boolean) {
case "vsew" => Some(0.U)
case "vta" => Some(false.B)
case "vma" => Some(false.B)
case "vill" => Some(true.B)
case "vill" => Some(false.B)
// The vector extension must have a consistent state at reset. In particular, vtype and vl must have values that can be read and then restored with a single vsetvl instruction.
case "vl" => Some(0.U)
// The vstart, vxrm, vxsat CSRs can have arbitrary values at reset.
Expand Down

0 comments on commit 1977961

Please sign in to comment.