RISC-V rv32i or rv32im in VHDL? With a stable Windows toolchain?
I've been trying to find a stable VHDL implementation of rv32im, or failing that rv32i. I also need a stable Windows toolchain for it. So far these two requirements seem mutually exclusive.
For example I found the rv32i potato processor, but I can't find a pre-built Windows toolchain that will work with this, nor have I seen any decent instructions on how to build one. I tried a Windows build of GNU MCU Eclipse RISC-V but while it will compile 32-bit architectures ld refuses to link 32-bit object files.
Does anyone know of any projects that actually fit these requirements? I'm pretty disappointed that the second requirement seems to be harder to meet than the first.
Posted Feb 26, 2019, 7:19 PM UTC
Why does the toolchain have to be for windows? What about none pre-built ones? It shouldn't be hard to build your own.
In the README of that potatoe processor it says:
Did you try that? What happened? The instructions are linux / mac, but that should be surmountable. Try using cygwin, install the packages they mention, then run the build steps. You may have to jump through some hoops but it should work.
As you said, the instructions don't cover building with Windows, a quick look through the GIT issues shows other users are struggling to build for Windows.
This is exactly the situation that puts me off using 90% of open source processors. I don't have Linux, nor do I want to use it, I don't have a Mac, I'm not going to spend hours trying to learn how to build a toolchain in an environment I've never used, just so I can evaluate a processor core.
Before anyone accuses me of being "lazy". The last open source core I picked up included a pre-built Windows GCC toolchain and batch files to compile and link. This allowed me to evaluate the core, identify a critical bug in the ALU and areas for improvement in the peripherals, I communicated these to the original author together with details of how they should be resolved. But if this anti-Windows intransigence is typical of most open-source projects I guess I won't be doing so with anything else.
Not having linux / mac isn't an issue. You can install command line only linux in virtual box. You can use cygwin for 95% of stuff. You can use bash for windows too (although I haven't got this working properly yet, due to not being able to launch native windows apps).
If you want to work with open source stuff you need to get used to building stuff. It can be a pain in the ass, it can take days to get it right, but that's the way of it. Otherwise you can go pay thousands for a CPU core and closed source tool chain.
As a profesional embedded developer, this is the boring shit that just has to be done. Get used to it.
As a professional embedded developer, with a small team of firmware developers working under me, I can say that, no we don't have to do this "boring shit" as part of our day to day work, we have never needed to do so in the past and are in general agreement that we will not do so in the future either.
We also have a staff of 20 software developers, none of them need to use Linux in their daily work (I will try to do a survey on how many of them have ever compiled GCC though).
I don't know what currency you are using, but last time I checked none of the closed source CPU cores provided by the major vendors cost thousands of $. Microblaze was $500 now free, Nios II/e free, Nios II/f $500, Mico32 free. Then there's the ARM SoC offerings, IIRC Intel and Xilinx both offer free Windows toolchains.
I recently used the Nios II/e, it doesn't have an instruction or data cache, so I made my own, it doesn't have a multiplier or divider, so I added my own as custom instructions. I compiled it and its software in the free version of the toolchain and shipped.
The open source core we are currently using (an MSP430 clone) didn't require us to build our own toolchain, we've contributed to its open source distribution and built a collection of custom hardware extensions for it. I guess we won't be contributing to anything else, but don't worry we'll get used to it.
Disclaimer: I know this is not an answer and it won't help short term, but I still have to say: Linux is where it's happening. Ten years ago I wouldn't be so sure, but now the trend is clear to me: as a development platform, Linux is killing Windows (slowly, but surely). Only a minority of the many SW development professionals that I have worked with (from different industries) prefer Windows these days - it's lagging behind, both technically and from a tools perspective, which is clear to see from how MS is embracing Linux and open source on every level not to loose customers (WSL, Azure, Docker, VS Code, SQL Server, GitHub, and the list goes on...).
Now, the FPGA industry seems to be about a decade or two behind the SW industry in terms of tooling and embracing open source, but I'm confident that they will move more towards Linux too in the years to come.
My point: Dismissing Linux altogether is likely to bite you further down the road. I wouldn't be surprised if Windows is not even going to be an option for most developers a decade from now, and then you risk missing out on lots of technology and innovation if you stick with Windows.
And this is not just an opinion, it's a very obvious trend.