Feedback for first major educational project

37 views
Skip to first unread message

Garrison Taylor

unread,
Jun 28, 2021, 4:26:42 PM6/28/21
to RISC-V HW Dev

I've been working on an RV32I implementation for the past few weeks for my own education. I'm looking for some feedback on it since this is my first verilog project and I would like to keep moving forward with 64-bit, extensions, peripherals, etc. I'm reasonably certain it's risc-v compliant but I'm very new to verilog and I'm not sure if my organization/conventions are anywhere near correct. Here's my code. Any resources I could use, such as documentation, books, articles, anything that could help with improving what I currently have and expanding on it would also be greatly appreciated. Thanks in advance.


iztok.jeras

unread,
Jun 29, 2021, 6:35:45 AM6/29/21
to RISC-V HW Dev, garrison...@gmail.com
Books (please check if there are newer editions):
https://www.amazon.ca/RISC-V-Reader-Open-Architecture-Atlas/dp/0999249118
https://www.amazon.ca/Computer-Organization-Design-RISC-V-Interface/dp/0128122757/ref=sr_1_1?dchild=1&keywords=computer+organization+and+design&qid=1624961870&s=books&sr=1-1

Verilator is a great and fast SystemVerilog simulator, used my many (most) CPU design projects.
While it covers a larger part of the SV language than Icarus, it has limitations and some learning curve. 

Not all language constructs can be synthesized into hardware, in other words, they are not in the RTL subset of the language.
Use a free synthesis tool like Xilinx Vivado, Altera Quartus or an open source tool like Yosys for synthesis,
expect errors in need of fixing.

Include build scripts and instructions in README.md files in the Git repository, it makes it easier to return to the project after taking some time off. It also makes it easier for others to help you with specific issues.

I had a quick glance at the code, it looks average, or good for a beginner.

You can use arrays and $readmemh() to load code into ROM.

After you get the basics to work, you should port:
https://github.com/riscv/riscv-arch-test

It is good to have some reference to compare against, there are some online simulators available, there are also good offline simulators, but I am not sure which one to recommend.

Regards,
Iztok Jeras
Reply all
Reply to author
Forward
0 new messages