RISC-V Instruction Format
Posted: Fri Feb 05, 2021 2:47 pm
So I've been fascinated by RISC-V ever since I discovered it like back in... Sometime around march or April of 2020. Maybe earlier. But the instruction format always confused me. The ISA manual used figures for all the instructions, and so it was hard for me to figure out the layout of the instruction itself and all that. The riscv-opcodes repository gave me code for masks and matches, e.g.: 0x8002 and 0xf07f for the JR instruction using the constant names MATCH_C_JR and MASK_C_JR) but that doesn't really help me with the layout of the instructions.
Wikipedia defines all of the instruction formats, but I get lost in the sub-tables. The LaTex code doesn't really help either. Can someone link me to a resource that describes, or write a description for, the layout of the various instruction formats and how to tell the difference between each one?
Wikipedia defines all of the instruction formats, but I get lost in the sub-tables. The LaTex code doesn't really help either. Can someone link me to a resource that describes, or write a description for, the layout of the various instruction formats and how to tell the difference between each one?