The U-type (upper immediate) instruction has one destination register rd and one immediate fields imm which is 20-bit. Figure 1 shows the instruction format for the U-type instruction.

Figure 1: Instruction Format

Figure 1: Instruction Format

  • Opcode: The opcode or operation code is a 7-bit field that defines the type of operation to be performed.
  • Destination Register: Stores the result of the operation in the destination register rd.
  • Immediate Field: A 20-bit immediate value is specified in here.

Below is table that describes the list of U-type instructions.

opcodeDescriptionInstruction
0010111 (23)add upper immediate to PCauipc rd, upimm
0110111 (55)load upper immediatelui rd, upimm