Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

1Learning Outcomes

More coming soon!

1.1RISC-V Extension: 16-bit instructions

RISC-V Base ISA for RV32, RV64, RV128 all have 32-bit wide instructions. The “Base” ISA is extended by instruction extensions that do a range of items: general multiplication, different architecture support, etc.

One such extension is the 16-bit compressed extension extension, which accommodates variable-length instructions that are multiples of 16-bits in length. To proactively accommodate this and other extensions, the RISC-V Base ISA encodes half-word branch offsets, even when there are no 16-bit instructions in the base set.

In this course, we only focus on RISC-V processors with 32-bit instructions. Implications of this half-word branch offset:

2B-Type vs. I-Type, S-Type: Immediate Formats

Recall a core component of RISC-V design is to keep fields as consistent as possible across instruction formats. We have already seen how source/destination register fields rs1, rs2, and rs2 are consistent across formats, allowing clearer consistency of which registers to read and which to write.

RISC-V also tries to keep bit positions of immediates consistent. The “swirling” of immediate bits in Figure 1 actually simplifies hardware design!

"TODO"

Figure 1:I-Type, S-Type, and B-Type instruction format comparison.

Observations: