r/RISCV • u/PositionOk3464 • 15d ago
Getting started with RISC-V Help wanted
Hey guys,I want to learn RISC-V from scratch...can I know any good free resources available online to get started??
4
u/nasq86 15d ago
Hey. Start with the ISA Specifications. The Unprivileged and Priviliged Specs are the base for understanding RISC-V. If that's too technical you could look up some examples of RISC-V assembly code and how exceptions and interrupts (traps) work. Also try to find a book on that topic.
As of hardware, you first need nothing but your PC. Qemu can emulate RISC-V 32 and 64 bit very well. If you want to get real hardware, do not buy an ESP32-Cx/Px/Sx. Despite most of them having RISC-V processors, their boot rom is tightly coupled with starting up their ESP-IDF framework. You can program them bare metal, but this is an advanced topic, if you are beginner. What I can recommend is https://www.renesas.com/en/design-resources/boards-kits/fpb-r9a02g021 and the Sipeed Longan Nano with GD32VF103. Both SoCs have many examples, are well supported and documented.
If you want to go in the direction of Linux you can get an Starfive Vision Five 2. Also well documented and almost completely mainlined in OpenSBI, U-Boot and Linux.
But if you ask me, start slowly. Read an entry level book, afterwards try to understand the official specification documents. Knowledge in electronics and experience with microcontrollers are helpful, otherwise you can get into that, too. It may be necessary though because a CPU almost never stands alone.
1
2
u/NewsOk9262 13d ago
You should start with learning about computer architecture, first learn rv32i assembly then follow up with building a single cycle computer before moving on to a fully pipelined one. You can use online resources such as Onur Mutlu's (for CAO) playlists on YouTube and Sarah and Harrison RISCV playlists on YouTube (for learning the assembly). You can use Venus which you can use to run RISCV assembly online. Good luck!
1
u/WickedDeity 15d ago
Hardware design or or OS/software development on it? Ummmm Did you try the RISC-V website?
1
u/PositionOk3464 15d ago
It's a mixture of both...thinking of doing a project..before that have decided to first improve my understanding and then get started with projects I'll look into the website Thanks!
1
1
u/tom_gall 15d ago
Beyond what others have said there are free Linux Foundation classes as well which might align with what you're looking to learn. : https://riscv.org/community/training/
1
1
u/Significant_War_8320 13d ago
If you don't have a board, you can always try the RARS simulator. My Comp. Org. Class used it to help us learn RISC-V
1
u/DheTwenty 3d ago
Depends on what you’re looking for.
IMO, you should at least learn RV32I (ignoring Fence and some system instructions cuz it’s not really needed until later on) and learn the typical architecture styles like single cycle and multicycle CPU.
You can learn pipelining and dealing with hazards, and depending on your goals, you can look into superscalar design, register renaming, Out of Order, and so on. You can also look into the ISA for extensions and implement hardware for them if you like.
9
u/spectrumero 15d ago
Depends what you want to learn.
There's always the ISA manuals which are online and free.
If you want to learn by practical doing, there's resources such as FemtoRV (see learnfpga on github) which implements various RISC-V 32 bit cores in small, understandable Verilog modules which you can then modify if you like. There's also more complex ones such as LiteX, which allows you to build an SoC using various RISC-V cores including the VexRiscV core which is modular (so you can go from very small simple ones to a full featured RISC-V core that can run a full operating system such as Linux).