Where are the actual RISC-V instruction codes? [closed]
Asked Answered
B

2

7

I have downloaded the latest...

RISC-V Instruction Set Manual, Volume 1: User-Level ISA

...which is interesting but it never actually gives values for the opcodes/funct3 and other instruction formats. For example, the LOAD/STORE/BRANCH opcodes are listed by name but it does not provide the actual bit values they represent.

Where are all the codes actual listed?

Boar answered 30/8, 2016 at 23:2 Comment(1)
It's actually really irritating. I still don't understand why they didn't just put the value beside the name and be done with it. Not like it's ever going to change.Malposition
P
3

https://riscv.org/specifications/

Table 9.1 and all of Chapter 9.

Philomenaphiloo answered 4/9, 2016 at 0:27 Comment(2)
I think you mean Chapter 19. 9 is the double precision floats.Boneblack
Looks like it keeps moving around. In the riscV-spec.pdf "Document Version 20191214-draft" I believe it's now Chapter 26 "RV32/64G Instruction Set Listings"Rambouillet
W
7

They are also already conveniently encoded in the source code of the sodor project:

https://github.com/ucb-bar/riscv-sodor

for constants that capture the bit patterns in various useful ways, see:

src/common/instructions.scala

or, directly from the browser:

https://github.com/ucb-bar/riscv-sodor/blob/master/src/main/scala/common/instructions.scala

Wiseacre answered 19/9, 2016 at 12:55 Comment(1)
Looks very useful, many thanks.Boar
P
3

https://riscv.org/specifications/

Table 9.1 and all of Chapter 9.

Philomenaphiloo answered 4/9, 2016 at 0:27 Comment(2)
I think you mean Chapter 19. 9 is the double precision floats.Boneblack
Looks like it keeps moving around. In the riscV-spec.pdf "Document Version 20191214-draft" I believe it's now Chapter 26 "RV32/64G Instruction Set Listings"Rambouillet

© 2022 - 2024 — McMap. All rights reserved.