Skip to content

Commit 58c808d

Browse files
committed
Added Decription for RVCDecoder Parameters
Signed-off-by: Abdul Wadood <abdulwadood.afzal88@gmail.com>
1 parent bb50f29 commit 58c808d

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/main/scala/rocket/RVC.scala

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,16 @@ class ExpandedInstruction extends Bundle {
1616
val rs3 = UInt(5.W)
1717
}
1818

19+
/* Parameters for RVCDecoder
20+
- Zcb extension contains the compressed I-type (c.lbu, lhu, lh, sb, sh) , M-type (c.mul)
21+
and Bit Manip instructions.
22+
- **usingCompressedSuiteB** parameter is used to enable/disable "Zcb" extension in RocketCore.
23+
- If Zcb is enabled, furthur **usingBitManip** and **usingMulDiv** parameters (if set as True) are used to decode
24+
the corresponding BitManip and M type Instructions.
25+
- If **usingCompressedSuiteB** parameter is not set (i.e. False), decoder will give "unimp"
26+
instruction if it encounters any Zcb instruction. Same is true for **usingBitManip** and **usingMulDiv**.
27+
*/
28+
1929
class RVCDecoder(x: UInt, xLen: Int, useAddiForMv: Boolean = false, usingBitManip: Boolean = false, usingMulDiv: Boolean = false, usingCompressedSuiteB: Boolean = false) {
2030
def inst(bits: UInt, rd: UInt = x(11,7), rs1: UInt = x(19,15), rs2: UInt = x(24,20), rs3: UInt = x(31,27)) = {
2131
val res = Wire(new ExpandedInstruction)

0 commit comments

Comments
 (0)