Well documented risc-v core that can be used on lattice FPGA's

439 views
Skip to first unread message

Steinþór Hafsteinsson

unread,
Aug 5, 2021, 5:32:19 AM8/5/21
to FPGAwars: explorando el lado libre
I just came across this core on Hackaday.com and even if I don't know much about FPGA and softcores in general, this looks like a very flexible design with a lot of optional features. There is however one thing that makes i unsuitable for Icestudio an that is because it's in VHDL. But I decided to share a link anyway maybe someone finds a use for it.

Steinþór Hafsteinsson

unread,
Aug 5, 2021, 9:55:07 AM8/5/21
to Christian Stone, fpga-wars-explora...@googlegroups.com
Hello Christian

I have not been using my FPGA's much lately. Since RPI Pico dropped I have mostly been messing around with that and some other MCU's, mostly RP2040 based. The PIO on the Pico is showing itself to be an unbelievably flexible tool for a feature that has only 9 assembly functions, And even if it uses state machines, I would guess they are primitive in comparison to FPGA finite state machines. 

I did find some of the non Lattice boards interesting that are mentioned as example boards with setups. The Terasic DE0 Nano is not very expensive and the Arty A7 35 is not at a bad price either. I am interested in getting a learning board from the big non-free makers just to see what's possible with those and fool around with their dev environments. I don't really care how big these environments are and they have to be extremely slow to be annoying on my rig with 24 cores @4ghz and 64GB memory with my 3tb SSD RAID0 stripe.storage setup. But I still need to read  a lot more before I make a decision on this. Suggestions for boards up to $200 would be welcome from you and others.

_____________________

Með bestu kveðju / Best regards 

Steinþór G. Hafsteinsson / Steinthor ...
Sími: 893-7656


On Thu, Aug 5, 2021 at 12:41 PM Christian Stone <fcv...@gmail.com> wrote:
Hi Steinþór,

NEORV32 is a very interesting CPU. There is great momentum behind it, since it was recently mentioned in hackaday, adafruit, hackernews, etc.
See https://seladb.github.io/StarTrack-js/#/preload?r=stnolting,neorv32. It's supported and ready to use on very low cost boards (such as Fomu, TinyFPGA or UPduino) and also on higher performance Digilent/Xilinx or Altera boards. The author is very friendly and responsive. Documentation is lovely.

Unfortunately, there seems to be a personal conflict. Unai is a co-maintainer and Juanma is a contributor. They are some of the users banned from FPGAwars (both GitHub and the forum) by Juan, in an attempt to remove any content or reference related to them (including deleting dozens of helpful messages in this group).

When user qpeters proposed to have NEORV32 available in Icestudio (https://github.com/FPGAwars/icestudio/issues/516) some weeks ago, as soon as Juan got up and saw it, he closed the issue and banned the user. Just a few hours after the issue was created, with no interaction/communication. Surprisingly, three days later some reason motivated him to go back and add a message and label. As you can see, the public excuse is that there is no Icestudio version of the project.

On the one hand, that is obvious. None of the other CPUs was written in Icestudio, but Juan himself adapted them from the HDL sources of the original authors. Therefore, closing the issue and marking it as invalid is a blunt statement. He will not do it, and he doesn't want other users to be aware of it.

On the other hand, while your comment about VHDL is partially correct, Juan and Carlos will not admit that VHDL cannot be used on Icestudio. They will try to claim that it is an enhancement for future versions (https://github.com/FPGAwars/icestudio/issues/382) but try to implicitly move users to Verilog (https://github.com/FPGAwars/icestudio/issues/467). In fact, since GHDL allows converting VHDL to Verilog, and because GHDL and Yosys support mixed language synthesis, there is no reason not to support VHDL in Icestudio. Unfortunately, they are unlikely to try it themselvs nor let others contribute. The modus operandi for closing https://github.com/FPGAwars/icestudio/issues/382 (banning the user who opened it, removing messages, and hours/days later providing a poor excuse) is similar to how he proceeded with https://github.com/FPGAwars/icestudio/issues/516. By the way, the Linux-capable microwatt (https://github.com/antonblanchard/microwatt) mentioned is also a very interesting soft-core based on the OpenPOWER architecture.

Anyway, if you want to use/test NEORV32 or microwatt on your open source FPGA development boards, I recommend to ask in the repo (maybe open a discussion?). Yesterday a user asked about Alhambra II and ULX3S: https://github.com/stnolting/neorv32/issues/135. In the Fomu workshop you'll find VexRiscv examples (which was also mentioned in this group). Any of those can be currently used in Icestudio with some minimal pre-processing of the sources.

Regards


Steinþór Hafsteinsson

unread,
Aug 5, 2021, 12:14:50 PM8/5/21
to Christian Stone, fpga-wars-explora...@googlegroups.com
Thanks, I'll check them out and go more closely over your answer at a better time.. But you are right I should try to take a board that the new open toolchain may support.
I'm limiting my budget on this in the near 200$ range. Some of the boards are marketed as learning boards and come with tons of switches buttons leds and 7 segment leds. The others come with either a lot of pin headers or pmods. On some levels the boards with switches and all that seem to be interesting to learn to work with them, but they would be of limited use after that. I'll take a good look over the next few days and post some questions when they come up.

Thanks for taking the time to give me such a detailed answer.

_____________________

Með bestu kveðju / Best regards 

Steinþór G. Hafsteinsson / Steinthor ...
Sími: 893-7656

On Thu, Aug 5, 2021 at 3:57 PM Christian Stone <fcv...@gmail.com> wrote:
Hi Steinþór,

I've seen much activity around RP2040. Lots of makers and hobbyists seem to be so excited about it. However, I must say I don't really understand what's so different about it compared to Arduino or other uC boards. It's the Raspberry Pi user base which had not used Arduino before now jumping into uC?

I recommend the Arty A7 board or some of the variants with a Zynq SoC instead of an FPGA. Those are in the $100-$250 range, depending on the features you want on the board. As we discussed in previous dialogues, mostly which peripherals/ports you want. My motivation for recommending the Arty A7 is that's one of the targets of projects SymbiFlow (https://symbiflow.github.io/), Verilog-to-Routing (https://verilogtorouting.org/), nextpnr-xilinx (https://github.com/gatecat/nextpnr-xilinx), etc. Therefore, you can use Yosys and open source tooling, similarly to the ICE40 and ECP5 families.
There is an interesting list of boards in https://hdl.github.io/awesome/boards/. Apart from reference PCI boards from Xilinx (far above $1000), note the following:

- Arty A7-35T
- Arty S7-50
- Litefury
- Mercury A7-35T
- Mercury A7-100T
- Nexys 4
- Nexys 4 DDR
- PicoEVB (super fancy for having an internal FPGA on laptops)
- ZedBoard

The PYNQ platform is also very interesting. It's not completely open source, but it provides a Python/Jupyter based environment for using accelerators on FPGA. See http://www.pynq.io/board.html:

- PYNQ-Z1
- PYNQ-Z2
- Ultra96V2

Trenz Electronic's site is also worth a visit: https://shop.trenz-electronic.de/en/Products/Trenz-Electronic/. Apart from distributing Digilent/Xilinx's boards in Europe, they have some hobbyist/maker designs:

- https://shop.trenz-electronic.de/en/Products/Trenz-Electronic/TE07XX-Artix-7/
- https://shop.trenz-electronic.de/en/Products/Trenz-Electronic/Open-Hardware/

The ArduZynq boards are really nice (60-100€). It's and Arduino Shield compatible form factor (same as the Alhambra) including a a Linux capable (single or dual core) 667MHz ARM Cortex-A9, 512 MB of DDR3L and the Programmable Region (what we call FPGA). Since it's Linux capable, it is technically possible to synthesize the designs in that ARM core and have it reconfigure the FPGA on the fly. That is, execute Yosys, nextpnr, etc. on the same device where the FPGA is physically located, instead of requiring a desktop/laptop for generating the bitstream. It might be possible to execute Icestudio ""on the FPGA"" :D (some of those boards do have HDMI output, and you can plug keyboard and mice). Of course, for your use case you want to do it on your workstation :P

Apart from the 7 Series (Artix, Kintex, Virtex) and Zynq, there is also de UltraScale+ and MPSoC series of Xilinx devices. However, from a practical point of view, those do not offer any benefit. They are expensive because they are high-performance (quad-core of more recent ARM cores, smaller fabrication technology, etc.). However, from a didactic point of view, the architecture and the features are the same you will find on a Zynq.

Overall, it's up to how much you want to increase the complexity. If you just want a more modern and larger FPGA from one of the main vendors, Artix is perfect. If you want to step into modern SoCs, Zynq is my suggestion. From a price point of view, they are in the same range, and the FPGA fabric in the Zynq is exactly the same as the one in the Artix.

Best regards

PS: Unfortunately, SymbiFlow is another "forbidden" word in FPGAwars. Although this information was provided several times, issues are closed and messages are deleted. Fortunately, the SymbiFlow community is welcoming, so you can ask in their chat rooms.

2021/08/05, Steinþór:

Steinþór Hafsteinsson

unread,
Aug 5, 2021, 12:18:23 PM8/5/21
to Christian Stone, fpga-wars-explora...@googlegroups.com
Re: RP2040

The game changing feature of the RP2040 is what they refer to as PIO. It allows you to create various different interfaces. The raspberry.org site has very detailed manuals if you have interest in checking it out.

_____________________

Með bestu kveðju / Best regards 

Steinþór G. Hafsteinsson / Steinthor ...
Sími: 893-7656

Steinþór Hafsteinsson

unread,
Aug 5, 2021, 12:38:30 PM8/5/21
to Christian Stone, fpga-wars-explora...@googlegroups.com


_____________________

Með bestu kveðju / Best regards 

Steinþór G. Hafsteinsson / Steinthor ...
Sími: 893-7656

Alexander Lang

unread,
Aug 5, 2021, 2:20:36 PM8/5/21
to Christian Stone, Steinþór Hafsteinsson, fpga-wars-explora...@googlegroups.com
Hello all, hope you don't mind me chiming in...

I concur with the recommendation for the arty series if Xilinx dev boards. I used one recently and found it to work very well. The vivado toolset is very well featured but takes time to use. 

The only caveat I would say with using proprietary programming tools is that after a year a paid licence is required and not all of the supplied code and soft cores etc are free. The amount available depends on the licence.

I know that project icestorm (yosys, nextpnr etc) are slowly being ported to allow the use of xilinx parts. 

It is a very fast moving time for open source fpga development.

I am desperately trying to curb my quiet fpga dev board buying habit. I currently own:

Three xilinx based dev boards - one spartan 3 series, two spartan 6 series...

One alhambra 2 - very good for icestudio!

One ULX3S - ECP5 series also very good.

I'm still also trying to get comfortable with using them. At the moment I just don't have enough time 😒 

Good luck and hope this was of interest.

Alex

On Thu, 5 Aug 2021, 17:49 Christian Stone, <fcv...@gmail.com> wrote:
Steinþór, you are welcome. It's always a pleasure to help others ;-)
I agree with your concerns about having fixed peripherals or "generic" pin headers.
Let us know whenever you have a better look.
By the way, thanks for the reference and clarification about the PIO feature in the RP2040. Maybe that can be proposed to the NEORV32 author! https://github.com/stnolting/neorv32/discussions/9
See you
Reply all
Reply to author
Forward
0 new messages