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
- Opcode: The opcode or operation code is a
7-bitfield 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-bitimmediate value is specified in here.
Below is table that describes the list of U-type instructions.
Table 1:
S-type Instruction
| opcode | Description | Instruction |
|---|---|---|
| 0010111 (23) | add upper immediate to PC | auipc rd, upimm |
| 0110111 (55) | load upper immediate | lui rd, upimm |