💾 Archived View for gemini.circumlunar.space › users › kraileth › neunix › eerie › 2014 › riscv_open… captured on 2023-04-26 at 14:27:01. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2021-12-05)
-=-=-=-=-=-=-
Here I'm republishing an old blog post of mine originally from August 2014. The article has been slightly improved.
There is no question: _Open Source Software_ is a huge success. In the early days of computing it went without saying that software was distributed along with the source code for it. This was before commercialism came up with the idea to close the source and hide it away. But even though there still are many companies who make millions of dollars with their closed software solutions, OSS has a strong stand.
There are various operating systems which are developed according to an open source model and there are open source applications for just about every use you could imagine. Today it's not hard at all to run your computer with just OSS for all of your daily tasks (unless you have very special needs). I do - and I am more happy and at home with it then I ever was in the over-colored world of put-me-under-tutelage operating systems and the software typically running on them.
While - like I just said - OSS has largely succeeded, _Open Source Hardware_ is really just in its very early stages. But what is OSH after all? Unlike software it does not have any "source code" in the common meaning of the word. And for sure hardware can't simply be copied and thus easily duplicated!
The later is completely true of course. And it's also the reason that makes open hardware a thing very different from free software. While anybody can learn to code, write a program and give it away for free without having any actual expenses, this is simply not possible with hardware. You cannot do something once and be done with it (except for maintaining or perhaps improving). Every single piece of hardware takes time to assemble. You cannot create hardware ex nihilo ("from nothing") - you need material and machinery for it.
So while we often come across the term _Free and Open Source Software_, there can't be _Free Hardware_ (unless it's donated - which still means that there's only a limited amount available). So we are left with the next best thing: Open Source. In case of hardware this means that the blueprints for the hardware are available. But what is the benefit of this?
Of course OSH doesn't enable you to have a look at the source, change it and recompile. But while modifying it is a lot more complicated than that, it is at least possible at all! Interested in how some piece of hardware works? If it is some conventional hardware - tough luck (unless you're working as a specialist in analysing hardware from your competitors). If it's OSH however, just get the circuit diagram and the other papers and given that your knowledge in electronics suffices, you won't have too many problems.
Usually hardware vendors try to keep their products as untransparent as possible. The idea is to keep the gap between company A and the competitors as large as possible by making it hard for those to benefit from any results of company A's research. From a purely commercial point of view this is the most natural thing to do. From a technical one however, it is not good practice at all. Any new vendor is damned to repeat much of the research that was already conducted by others.
With OSH, not only the results of the research (the hardware pieces) are made available, but the complete documentation is also published. This means that others can have a look at how that hardware is being built. They can copy the design and concentrate on improving it instead of having to do fundamental research beforehand, maybe only to find a solution to essential problems that have been solved several hundred times before... This means that while individual companies profit a lot from closed sources, this practice is a major waste of resources and time. Just imagine how much better hardware we might already have today if all these wasted resources had been put to good use!
Another important issue is security. We know that e.g. just about all routers available contain backdoors intended mostly for intelligence services. But even if you don't care about this: Keep in mind that if there are holes in your hardware, ordinary criminals could exploit them as well. Do you want this? Is it a pleasant thought that your hardware which you bought for a lot of money, keeps spying on you? Think about it for a moment. The bitter conclusion will be that there is not much you can do.
Some people recommend not to buy electronics from the US anymore. A good idea at first glance. Still let's be realistic: The USA might have the biggest spying apparatus of the world and thanks to Mr. Snowden we are alarmed about it. But that doesn't mean other nations don't do the same. This would be rather unlikely if you ask me. And in the end, currently it's the choice whether your hardware tells everything about you to the Americans or to the Chinese...
This is a very dissatisfactory situation. Open Source Hardware could help here a lot: If you're really a serious target of intelligence, you probably even deserve it. In this case they have the means to intercept your hardware and - to make subtle changes you probably won't ever notice. But it could make today's mass-surveillance much harder or even impossible to continue. Got your new piece of OSH? Thanks to the detailed specifications you could even substitute its firmware with a custom one thwarting the purpose of the one that was installed by whoever person or group.
One of the most important pieces of OSH would surely be a computer's CPU. What matters most in this regard is - next to the actual design - the instruction set architecture (ISA). It is this instruction set which determines a processor's capabilities. Each family of CPUs (i.e. those which have the same or a compatible instruction set) is its own platform. Programs have to be compiled to run on it and won't run on another (unless emulated).
There have been various attempts to create OSH CPUs or at least come somewhere close to it. Since the beginning of the 1990's, the MIPS CPU's ISA is licensable. While this does not mean the diagrams are available to the public, it is at least possible to acquire them if you are willing to pay for it. If you are, you can produce your own CPUs based on their design. SUN attempted to go the same way with its SPARC architecture but was less successful.
In the recent years the ARM platform has gained a lot of attention - thanks to basically following the same strategy and licensing their CPU designs to their customers. This development is a good step in the right direction and certainly commendable: One company specializes in conducting research and designing CPUs and others license and build theirs based on them.
But then there are projects which really qualify as OSH. Yes, they are underdogs compared to the other hardware which is no wonder because they of course lack the financial means which back the others. But we are getting there. Slowly but steadily.
This month Berkeley university released what was originally started just for learning purposes but grew into a very promising project: __RISC-V__. RISC stands for “Reduced instruction set computing” which basically means the decision to build a CPU that uses a simpler instruction set to achieve high performance.
While there's also another OSH project known as _OpenRISC_, it never gained enough traction. They managed to design a 32-bit CPU and the architecture has been implemented in emulators such as Qemu and you can run Linux on it. A 64-bit variant has been in development for quite some time and while the project collected money via donations for years, it has been unsuccessful to actually produce their hardware. So OpenRISC exists merely as a soft-CPU and using FPGAs (Field programmable gate array). OpenRISC is licensed under the (L)GPL.
RISC-V is made available under the proven BSD license. In contrast to the GPL it is a _permissive license_. While I was keeping my fingers crossed for OpenRISC for years, now I am really excited about this news! Especially with such a reputable entity as UC Berkeley behind the project - and the fact that things look like they are really moving forward this time!
One of the most promising efforts is lowRISC: This British endeavor is actually a non-for-profit organisation claiming to work together closely with the university of Cambridge and some people of Raspberry PI fame. A dream come true! The idea is to implement a 64-bit RISC processor via FPGA during the next months and have a test chip ready by the end of 2015. They estimate that about a year later, in the end of 2016, the first chips could be produced. Sounds like a plan, doesn't it?
I will definitely keep an eye on this. And even if the release needs to be postponed, it will surely be worth the wait. Open Source Hardware is coming to us. It will most likely be "expensive" (since it can only be produced in much lower numbers than conventional hardware for the mass market) and quite a bit "weaker" in terms of performance. Nevertheless it will be trailblazing the future for OSH and thus drawbacks like these are very much acceptable.
No RISC no fun!