NEORV32 on a Cologne Chip GateMate FPGA #983
Replies: 8 comments 10 replies
-
Nice. I've also done some experiments with the Gatemate FPGA architecture last year. I've got some designs running correctly, but never the neorv32 design I tried. Yosys always generated a mysterious |
Beta Was this translation helpful? Give feedback.
-
A CPE could be configured as Very brief background information: The |
Beta Was this translation helpful? Give feedback.
-
That's a good tip, thank you! The next P&R version will throw an error if the file is missing. |
Beta Was this translation helpful? Give feedback.
-
Both files |
Beta Was this translation helpful? Give feedback.
-
This issue "actually" only occurs when block RAM collides with the connections to the IOs at the bottom or top edge of the chip. There are CPEs whose outputs can be routed either to the block RAM or the IOs. We can avoid it by repositioning the block RAMs or IOs. Do you have an example netlist with CCF for me so that i could take a closer look at it? |
Beta Was this translation helpful? Give feedback.
-
Boards delivered after Feb 29th have an improved filter and should no longer suffer from an improper power supply: |
Beta Was this translation helpful? Give feedback.
-
@stnolting any performance and area metrics you can share on the NEORV32?! The following two in particular:
We'd like to contrast NEORV32 to our eduBOS5. BTW, GateMate issues uncovered by our openCologne project may also be of interest, such as this one... |
Beta Was this translation helpful? Give feedback.
-
Your Makefile isn't incorrect; the relative path you used for the GHDL plugin is one way to resolve the issue. However, there's an alternative approach that might simplify your setup, as detailed here. This method involves some additional steps when installing the GHDL-Yosys plugin, which can help avoid path-related problems. Additionally, it might be helpful to review the config.mk file from the same repository. It contains some commands and configurations that could be of help. Also, @pu-cc it would be maybe a good idea to update the Toolchain Install with these added instructions regarding GHDL? |
Beta Was this translation helpful? Give feedback.
-
I have been wanting to experiment with the GateMate FPGAs from @colognechip for some time now. Fortunately, @OLIMEX offers a low-cost and open source dev board (GateMateA1-EVB) that I had to get right away! It costs only 50€ (plus taxes and shipping), offers some nice on-board peripherals and has many external interfaces.
Downloading and "installing" the GateMate toolchain is very easy. I am using the Linux version for synthesis (on Ubuntu-based WSL) and the Windows version for programming (on Win10). The provided examples worked out of the box! 🚀 However, it would be nice if the toolchain would be available also on GitHub.
The Setup
So I created a simple NEORV32 setup featuring a standard RISC-V CPU configuration, on-board memories and some peripherals like a UART, a timer and some basic IO. The synthesis flow uses the GHDL plugin for Yosys for processing the VHDL sources. You can find all the sources including a simple Makefile and some brief documentation in https://github.com/stnolting/neorv32-setups/tree/main/cologne_chip/GateMateA1-EVB.
This what the results looks like on my desk: the setup is operational and the bootloader is waiting to be fed with an executable.
(GIF made with imgflip.com)
Findings
Finally, here are some insights, pitfalls and open questions I discovered during my very first (and very botched) experiments. As always, comments and feedback are very welcome!
The toolchain seems to be compiled with some hardcoded relative paths. I had to copy the toolchain's
bin
folder right into the root directory ofneorv32-setups
. Otherwise, (Yosys+)GHDL cannot find the built-in IEEE libraries:Or maybe this is just a bug in my Makefile?!
What about those "CC_MX8" multiplexer primitives? Why can't they be used (
-nomx8
synthesis flag)?If the toolchain is not provided with a pin mapping file (
*.ccf
), the implementation still runs smoothly without issuing an error. Had to learn this the hard way.The toolchain generates a
*.bit
file. However, the actual bitstream is the*.cfg
file.For some processor configurations (nothing too specific) P&R terminated with an error like this:
Other configurations went through implementation without problems, but caused run-time errors like broken UART output or did not even run at all (for example, when decreasing the UART0 FIFO sizes from 64 to 16 entries). I am still trying to figure which specific configurations/combos are causing this issue (and why).
I had to enable the synthesis retiming option (
--retime
). Without this flag, Yosys keeps generating an invalid netlist that still contains a conditionalassign
like this:I seems like it always fails to map a certain ALU signal. Need to investigate further.
I copied the PLL instance from the provided
blink
example to get a higher clock speed for the processors. Unfortunately, the PLL does not seem to lock. I read somewhere that some Olimex boards suffer from an improper PLL power supply (too much ripple?).According to the board's schematic the on-board RP2040 provides a "debug UART". I can successfully connect to that virtual COM port using my terminal program. It also seems to send data quite nicely (processor -> host computer). However, when sending large data (like executables) from the computer to the board most received bytes are broken. That's why I am using an external USB-UART bridge connected to the board's PMOD header.
Sometimes the FPGA does not "boot" after bitstream upload (although it actually should according to the documentation) or it behaves in a strange way (weird UART output, LED flashing at some crazy frequency). I need to press the "FPGA_RST1" button and upload the bitstream again. Maybe this is a reset issue of the processor or maybe I just misunderstood the documentation.
To be continued...
Beta Was this translation helpful? Give feedback.
All reactions