Editing
RISC-V
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Op Codes== <img src="http://linuxgizmos.com/files/riscv_ref_card1.jpg"/> <img src="http://linuxgizmos.com/files/riscv_ref_card2.jpg"/> * "All the 32-bit instructions in the base ISA have their lowest two bits set to 11" - Spec xxxxxxxxxxxxxxaa 16-bit (aa != 11) xxxxxxxxxxxbbb11 32-bit (bbb != 111) xxxxxxxxxx011111 48-bit xxxxxxxxx0111111 64-bit xnnnxxxxx1111111 (80+16*nnn)-bit, nnn != 111 x111xxxxx1111111 Reserved for β₯192-bits Table 9.1 on page 53 has the opcodes. "In the base ISA, there are four core instruction formats (R/I/S/U), as shown in Figure 2.2. All are a fixed 32 bits in length and must be aligned on a four-byte boundary in memory. An instruction address misaligned exception is generated on a taken branch or unconditional jump if the target address is not four-byte aligned." - Spec (2.2) * R-type 31 25 24 20 19 15 14 12 11 7 6 0 +------------+---------+---------+------+---------+-------------+ | funct7 | rs2 | rs1 |funct3| rd | opcode | +------------+---------+---------+------+---------+-------------+ * I-type 31 20 19 15 14 12 11 7 6 0 +----------------------+---------+------+---------+-------------+ | imm | rs1 |funct3| rd | opcode | +----------------------+---------+------+---------+-------------+ * S-type 31 25 24 20 19 15 14 12 11 7 6 0 +------------+---------+---------+------+---------+-------------+ | imm | rs2 | rs1 |funct3| imm | opcode | +------------+---------+---------+------+---------+-------------+ * U-type 31 11 7 6 0 +---------------------------------------+---------+-------------+ | imm | rd | opcode | +---------------------------------------+---------+-------------+ <img src="http://i.stack.imgur.com/Gkjuc.png" width="75%"/> <img src="http://i.stack.imgur.com/IlZmZ.png" width="75%"/>
Summary:
Please note that all contributions to Hegemon Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Hegemon Wiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
Edit source
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information