Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RISC-V with custom gateware #35

Open
fdarling opened this issue Mar 28, 2021 · 4 comments
Open

RISC-V with custom gateware #35

fdarling opened this issue Mar 28, 2021 · 4 comments

Comments

@fdarling
Copy link

Are there any examples of programming an OrangeCrab using the soft RISC-V core, but with custom "gateware" for hardware accelerated peripherals? My goal is to largely program using C/assembly, but to also extend the CPU core using Verilog.

In the RISC-V blinky example, I am confused as to where the RISC-V core actually resides. Is it part of the bootloader, which simply runs the (assembly) program stored in flash rather than reconfiguring the FPGA? Or is there a RISC-V core being pulled into the blinky example that becomes part of "custom" FPGA configuration which then runs the assembly code?

I'd appreciate it if you'd shed some light on this!

@tommythorn
Copy link
Contributor

tommythorn commented Mar 29, 2021

You don't say which blinky example (there are many), but assuming it's https://github.com/gregdavill/OrangeCrab-examples/tree/main/riscv/blink then you are right, it's executed by the RISC-V core that's part of the initial FPGA configuration. However for example https://github.com/gregdavill/OrangeCrab-examples/tree/main/verilog/blink is a standalone logic design that would override the initial design.

If you want to extend the core that runs the initial firmware, then I think the sources are in https://github.com/gregdavill/OrangeCrab-test-sw (it's actually not clear as it appears to be a test fixture and I haven't tried it).

@boxfire
Copy link

boxfire commented Sep 10, 2021

I started from the bootloader to do this: https://github.com/gregdavill/foboot/tree/OrangeCrab

You can clone that and cut it into your shape.

@boxfire
Copy link

boxfire commented Sep 10, 2021

@francis2tm
Copy link

Hey @fdarling, I'm exactly in your situation. I pretend to add a custom peripheral into a SoC with a RISC-V core. It seems orangecrab's repos are not centrailized. So far, I've found the CircuitPython SoC (https://github.com/orangecrab-fpga/orangecrab-examples), but it seems that it doesn't have support for common peripherals like SPI, I2C etc. Whereas the SoC from https://github.com/gregdavill/OrangeCrab-test-sw/tree/main/hw looks like it is more complete. However, it is hard to know which one is more complete/updated and if they both run at maximum frequency (which is 48MHz right?) in order to use it as a baseline. Which orangecrab SoC should I start on? @gregdavill any thoughts?

Thanks in advance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants