Skip to content

Commit

Permalink
Added Decription for RVCDecoder Parameters
Browse files Browse the repository at this point in the history
Signed-off-by: Abdul Wadood <[email protected]>
  • Loading branch information
Abdulwadoodd committed May 21, 2023
1 parent bb50f29 commit 58c808d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/main/scala/rocket/RVC.scala
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,16 @@ class ExpandedInstruction extends Bundle {
val rs3 = UInt(5.W)
}

/* Parameters for RVCDecoder
- Zcb extension contains the compressed I-type (c.lbu, lhu, lh, sb, sh) , M-type (c.mul)
and Bit Manip instructions.
- **usingCompressedSuiteB** parameter is used to enable/disable "Zcb" extension in RocketCore.
- If Zcb is enabled, furthur **usingBitManip** and **usingMulDiv** parameters (if set as True) are used to decode
the corresponding BitManip and M type Instructions.
- If **usingCompressedSuiteB** parameter is not set (i.e. False), decoder will give "unimp"
instruction if it encounters any Zcb instruction. Same is true for **usingBitManip** and **usingMulDiv**.
*/

class RVCDecoder(x: UInt, xLen: Int, useAddiForMv: Boolean = false, usingBitManip: Boolean = false, usingMulDiv: Boolean = false, usingCompressedSuiteB: Boolean = false) {
def inst(bits: UInt, rd: UInt = x(11,7), rs1: UInt = x(19,15), rs2: UInt = x(24,20), rs3: UInt = x(31,27)) = {
val res = Wire(new ExpandedInstruction)
Expand Down

0 comments on commit 58c808d

Please sign in to comment.