RISC-V based single board computers are getting there
bret.dk
bret.dk
A tangent, but bear with me: after finishing the really good book The End of the World is Just Beginning, I think it makes a lot of sense to continue building cutting edge tech that requires international supply chains, BUT, also having locally manufactured tech good enough to power locally sourced computers, run tractors, etc. International supply chains have enriched many areas of the planet but to assume that they will last seems very risky. Always have a Plan B.
EDIT: call this Plan B Tech
I just wish it was possible so that we always have the means to produce 100% freedom-respecting general purpose computer hardware that's viable for daily use. That way we're not forced to accept the status quo when corporations start bundling suspicious stuff like IME into their processors.
We already have the means to produce freedom respecting software ourselves but that gets us nowhere if the chip makers start requiring cryptographic signatures before executing software. What good is free software if we can't run it?
The international supply chains of today's world was grown organically, driven by the market where inferior company and their products gets replaced by better (sometime just slightly) ones.
However, I do agree that a Plan B is required in many fields, but I guess you need huge amount of government subsidies to keep them running.
But more than one country can do this, which ensures supply chain diversity. And if one of them falters, the others may be more expensive, but they exist.
I would say corruption played an important part, especially in Eastern europe. MS products are expensive for poor countries. Coca cola without "exclusive deals" would not have the same market share (Hello wrigley, hello lindt, hello intel). The shitty bananas in Europe have nothing to do with organic growing of the market.
An open source patent/trade-agreement unencumbered architecture is of great interest to many countries for precisely the reason that they can build it locally yet harvest innovation from across the pond (without paying a foreign company).
I doubt it will come to fruition though; in ten years our world be more globalised than it is today. Trade wars, the pandemic and even the Ukraine war are short bumps on a big fundamental trend that is here to stay.
We'd lose the Internet and cellphones, have to go back to mechanical telephone exchanges.
I think we would miss CNC a lot, it's how the majority of production work gets done now in many industries, the manual machines are in the corner for one-offs.
The computer controlled machines also tend to be making parts or doing QC or measurement to support the non computerised ones. So sure your injection moulder or die cutter might not need too many chips but wait until the molds and tooling wear out.
Although who can send your factory orders anyway...
Payments, payroll, inventory, invoicing. Small words but huge implications.
We'd lose basically all capacity to print (billboards, t-shirts, books, office memos etc) , which seems bad. Like we had less digital ways to do all that stuff but they went away. It's not easy to go back.
Medical imaging gone except for maybe the x-ray.
Behind the scenes all kinds of process control would disappear which would require massive rework. We'd have to retool most industrial processes to get computers out of the control loops. We'd lose the electric grid until people figured out how to decomputerise it. Probably trains, traffic lights, airlines, cars, shipping would be impacted in a variety of fundamental ways.
The postal service would need to be re-architected (current reliance on parcel sorters and scanners).
We'd have to move back to analog tv, radio and media production workflows would change dramatically.
It's an interesting exercise to try and figure out what industries would hurt the most if chips disappeared tomorrow, I'm pretty sure it would be a catastrophe but it's not easy to follow it all through.
Aviation would just cease to function, nearly every commercial airliner is heavily dependent on computer control, to say nothing of things like the reservation systems that are also very complex (pricing flights is a very complex use case for algorithms)
Yeah, maybe there would be a huge spike in aviation risk, so instead of one flight in ten million crashing, one flight in a hundred thousand would crash, but that's still not enough for aviation to become a dominant cause of death for weekly business air commuters. People would freak out when they watched the news but only in countries that hand over the reins of society to nervous nellies would it be a real obstacle to aviation.
This was widely done with tube computers in the 1950s. The first commercial computer, Univac, was introduced in 1951.
Medical imaging gone except for maybe the x-ray.
The first commercial CT scanner in the 1970s used a Data General Nova minicomputer, which used small-scale integrated circuit logic chips, but did not include a microprocessor.
Behind the scenes all kinds of process control would disappear ...
The early PDP-8 minicomputers introduced in 1965 used discrete transitors, no integrated circuits. They were used in industrial control applications.
IMO they have way more character but also it would be harder to slap up giant billboards for products and services I’m not interested in.
Is it possible to live without computers? Yes, but you don't want to.
Not as much as you think. Modern cars aren't a whole lot more efficient than and are just about as clean as they were 30 years ago. Most of the electronics in modern cars is for relatively useless stuff like lane keeping assist and that thing that makes the indicators blink in a cool pattern.
You can have cars just as clean as modern ones with 1980s-level microcontrollers in the ECUs. You don't even really need catalytic converters, either, because the closed-loop fuelling systems that use a lambda sensor to measure how complete combustion is.
We could rid cities of pollution right now, completely, by converting all the internal combustion engine vehicles to run on propane instead of petrol or diesel. This doesn't make finance companies or car companies any money, so it won't happen.
There is some confusion in this question and many of the reponses here between any electronics (computation and control using tubes dates from WWII at least), transistors (which became widely available in the mid-1950s, all-transistor computers reached the market in 1959), small scale integrated circuits that contained (for example) several logic gates or a few flip-flops (which reached the market in the mid-late 1960s) which were used to build computers but also many simpler electronic control devices, and finally microprocessors which finally reached the market about 1975.
Any electronics that reached the market before the mid or late 1970s did not use microprocessors. For example, the first commercial CT scanner used a Data General Nova minicomputer, which used small-scale integrated circuit logic gates, but did not use a microprocessor. The original Pong arcade game used around 60 small-scale integrated circuit logic gates, but no microprocessor.
If we didn't have integrated circuits, but were stuck with 1959 discrete transistors, or we didn't have microprocessors, but were stuck with 1974 small-scale integrated circuits, we could still have a pretty hi-tech world. There would be more emphasis on optimized design of special-purpose devices - that original Pong game is an example.
It's impossible to really quantify this kind of thing, probably. And the causes were numerous (it's also an era of relative peace, for example). Still. I've always suspected much, maybe most of it, is due to to a mix of telecommunications, computer automation, and computer-based knowledge-amplification.
[1] https://ourworldindata.org/grapher/exports/GDP-per-capita-in...
https://ourworldindata.org/grapher/gdp-per-capita-in-the-uk-...
The good news is that there are a lot of faster options right around the corner. The Pine folks is working on releasing Star64 (quad SiFive FU740 1.5GHz) [1] and I know of at least two other RISC-V SBCs in the pipeline. I'm not quite ready to declare "2022 is the year of the RISC-V desktop" yet though.
[1] https://www.hackster.io/news/pine64-formally-unveils-the-sta...
Note, the FU740 is in-order dual-issue with a comfortable L2 cache.
But the speed is all but irrelevant, the issue with these alternative boards is always in software support. No point in using them even if they're twice as fast if I can't apt get anything and have to compile shit from source wasting 10 times as much time. Is there even an arch tag for riscv yet like armhf and arm64? I'd assume there is, but I can't find it and the support is likely to be abysmal this early on.
The only thing that I hit in the (old) Fedora 33/RISC-V is Firefox's lacking support for WASM, but that could be working in the latest version.
If you want to try it for yourself under QEMU, I'd recommend following the instruction here: https://wiki.ubuntu.com/RISC-V
Ok, am I going completely mad? Feels like the first RISC-V a person could actually buy released shortly before the pandemic...
Maybe not mad, but certainly not very good at searching.
CORRECTION: 2010 was the _founding_ of the RISC-V project. I don't have the date of the 1.0 release, but nobody would ship hardware based on a 1.0. Release 2.2 (user)/1.11 (priv) wasn't released until 2018! Light of this, hardware is actually coming out pretty quickly.
Hardware is expensive and takes a long time. In comparison, Arm was founded in 1990. When was the first Linux-capable Arm-based dev board available for purchase?
I'm probably as unhappy with the delays as anyone, but the momentum has not slowed and better options _will_ become available for sale.
The RISC-V ISA design was started in 2010. The ARM ISA design was started in 1983.
I think the first Linux-capable ARM-based dev board was available for purchase in 01989: the Acorn/BBC A3000 had an ARM2; the outdated https://www.arm.linux.org.uk/machines/riscpc/ says, "The support for these machines is now beginning to become increasingly difficult, however there is still support for them in the Linux kernel."
This is misleading in two ways:
1. Linux didn't yet run on it, since it hadn't been written yet; the effort to port Linux to ARM started in 01994: https://www.arm.linux.org.uk/docs/history.php
2. Advanced RISC Machines, Ltd., was spun out of Acorn in 01990, but the Acorn RISC Machine project started in 01983 and the ARM1 was first fabbed successfully in 01985. So the A3000 was shipped six years after the design effort began and four years after the first working ARM hardware.
https://riscv.org/exchanges/boards/ claims, "Nezha is a AIoT development board customized by AWOL based on Allwinner’s D1 chip. It is the world’s first mass-produced development board that supports 64bit RISC-V instruction set and Linux system." I find this hard to believe because the D1 just came out a year or two ago and I think the SiFive "HiFive Unleashed" shipped in 02018, and the "SiFive Freedom U540" was announced in 02017 https://linuxgizmos.com/sifive-launches-first-risc-v-sbc-tha... after SiFive launched in 02016 https://www.wsj.com/articles/backers-of-open-source-chips-la.... Seems like they had Linux-capable chips sampling later in 02016: http://web.archive.org/web/20160915000420/http://hackerboard...
Remember that 8 and 9 haven't been valid as octal digits since the ANSI standard.
SiFive made something like 500 HiFive Unleashed boards and probably 2000-3000 HiFive Unmatched. They all used effectively prototype chips, made on MPW / Shuttle run.
When the D1 came out I heard the initial production batch was 2 million chips. As with the SoCs that go into Raspberry Pis, the SBCs are a side-line.
Currently we already finished porting Chrome (thanks to openSUSE!) & Firefox, and Libre Office is on the todo list
ADD: OpenSUSE! how could I forget. Truly we are spoiled for choice today. I remember not that long ago it was
* Buildroot
and nothing more.As soon as upstreams accept our PRs, all distros with RISC-V port can benifit from them, which IMO sounds like a better porting style than keeping a huge patch in downstream Arch-specific repo :-D
BTW we also have an CI/CD available for upstream opensource developers to monitor their builds: https://ci.rvperf.org
What is "ldc"?
I'll keep an eye on https://archriscv.felixc.at/ and try out the current rootfs.
ldc refers to the LLVM-based D Compiler: https://github.com/ldc-developers/ldc
I think you can start from here: https://github.com/felixonmars/archriscv-packages/wiki/Setup...
P.S. Besides, it's perfectly silent, since a passive aluminum cooling block with a rib structure cools it enough.
https://www.imaginationtech.com/product/img-bxe-2-32/
Anything between VideoCore 6 and Jetson Nano would make Risc-V interesting!
I think this is going to be the real make-or-break thing about RISC-V: early tests have shown super impressive SIMD/vector benchmarks compared to ARM/x86, but whether or not that will make it into production is another question entirely. I've got high hopes for RISC-V, but it's acceleration/HPC workload performance is going to determine whether it topples ARM or becomes the next Itanium.
Going back to the original question (can RISC-V "become another Itanium"?), as long as there are people using/support/evolving it. Unlike Itanium, RISC-V has the support very many companies already and the membership list of RISC-V International just keeps growing.
The only thing that could threaten it would be a better alternative appeared or if x86 or Arm suddenly got the same unrestricted license. The former is not impossible, but it would be huge undertaking and by definition we would be in a better place. The latter seems essentially impossible.
As there's no technical reason why a RISC-V implementation couldn't have roughly comparably performance to an Arm core (iso-effort and technology) it's "simply" a matter of sufficient investment before we'll have the X1 etc equivalents. There are very many companies working on high performance implementations. One of the high profile ones is Rivos, but there are _many_ others.
I suspect a lot of the push for upstreaming (and the original Tegra GPU drivers being GPL) is from their automotive/industrial customers who want continuity guarantees.
What does this mean, can OpenGL not access the hardware without the userspace stuff?
The hardware that was sold could still work perfectly fine instead of having to be trashed if only the existing drivers were recompiled, to run on a recent distribution.
They've always had nasty drivers and no documentation, but this is apparently changing, with some new mesa driver funded by the company itself announced recently.
https://www.pine64.org/rockpro64/
It has four lanes of PCI express so you can connect a big NVMe SSD or whatever. In my testing it seems to run OK on only passive cooling.
I agree that it would be a mistake to buy a wildcat board which needs a special patched Linux from the vendor. Mainline support, or no deal.
https://linux-sunxi.org/Linux_mainlining_effort
And also, have a look at SBC's supported by Armbian.
From the rest of the other boards it is just one kernel release (if you're lucky, 3 releases) and they have moved on to the latest SBC and dropped support and releases. The Raspberry Pi Foundation still continues to support older boards.
It just seems that with the many Raspberry Pi users, the documentation and the ecosystem built around it seems to be its success rather than the technical specs.
[1] https://homebrewserver.club/low-tech-website-howto.html#serv...
Incidentally, I’ve been trying to repurpose a Pi Zero W I blew out the USB bus on. A bunch of people in my local group expressed interest, but each I contacted in turn said “give it to the next guy”
They report their suppliers have been delivering their parts orders on time and RPi is shipping the full volume of units they always intended for 2022. They are just getting bought up at a much higher rate than expected. They also say some of the issues in buying single units through online consumer retail channels is because RPi is prioritizing filling advance orders from volume integrators.
I have no idea the accuracy of what they're saying but fulfilling advance commitments from volume integrators first makes sense as those are long-term customers who are counting on the orders to ship their own products. Shorting those orders would be fairly disastrous as it flag RPi as an unreliable supplier reducing future design wins.
If there was a RiscV chip that met a particular standard (x voltage range, y clock speed, same supporting circuitry and software), then we'd have multiple chip vendors creating the same part, and hopefully it would turn into a jelly bean chip.
Maybe there will be a gold standard of RISC-V SoC like there was the Intel 8086, and bunch of clones could show up. That was close to happening with ATmega32U, but ultimately the clones disappeared.
I know the openness of the RISC-V platform is ideal to hardcore FOSS fans, but they're far outnumbered by those who will be satisfied with the cheap, fast, and plentiful ARM chips currently on the market, and the cheaper and faster ones sure to come.
But IMO RISC-V like many Berkeley products, is a pointless waste of resources to make a political point. There’s no compelling reason to recompile all our code to help out fabless design houses out of a license fee. And nobody save a privileged well educated and funded few are in need of a free ISA.
On the other hand, I would say that the price of a number of these D1-based RISC-V boards are now within the range of a Pi Zero plus lunch at McDonalds, so if you only want one of them the price difference is basically irrelevant.
A year ago a Pi 3 equivalent RISC-V board (the HiFive Unmatched) cost $665, which was a big drop from 2008's HiFive Unleashed plus MicroSemi expansion board for $2998 total. Since December there's been the VisionFive for about $180 (although with only 2 cores not 4). In a few months there will be the newly-announced Pine64 Star64 with an expected price of $60 with 4 GB RAM or $80 with 8 GB RAM (they've said "about the same price and performance as the Quartz64")
That's pretty rapid price drops.
RISC-V SBCs with considerably better performance than a Pi 4 (similar to the RK3588 boards that just came out a couple of months ago) will be demonstrated working in the next couple of months and probably shipping early next year. They will, again, probably be quite expensive at first, but existing is the hard part. Price is then just a matter of mass production economics.
It does lack a GPU though, instead it has some kind of AI processing unit that I have no idea how to use...
In addition, memory bandwidth is still at least an order of magnitude higher.
You could make it work with Optane except oops that just got discontinued.
I think you significantly overestimate how much they can reduce latency for SSDs. Keep in mind, even a 80286 from 1982 had a memory latency in the 200ns range[1].
[1]: https://cacm.acm.org/magazines/2004/10/6401-latency-lags-ban... (view PDF, table 1)
Just put a huge swap file on it.
https://wiki.archlinux.org/title/Improving_performance#zram_...
HomeAssistant running SQLite on on a small cheap MicroSD card, kill it a couple of months.
Each memory cell have a lifespan of ≈ 1000 write cycles, if I remember correctly.
Maybe such computer should use some sort of treadmill allocation.
[1]: https://mangopi.cc/_media/mq-pro-sch-v12.pdf (page 3 top left)
Dhrystone 2: 253.2 on the Mango Pi MQ Pro, 202 on the Raspberry Pi Zero. I don't know what this number is; presumably it's not Dhrystone MIPS (VAX MIPS), because that should be closer to 1000 for both chips, and it can't possibly be Dhrystones per second, because a VAX MIPS is 1757 Dhrystones per second, so they ought to be about 1.8 million Dhrystones per second. Reading https://github.com/kdlucas/byte-unixbench/blob/master/UnixBe... leaves me no wiser.
File Copy 1024: 124.4 on the MQ Pro, 86 on the Raspberry Pi Zero. The UnixBench README says this is measured in the number of characters that can be written, read, and copied in 10 seconds; if this were correct it would mean the MQ Pro were copying 12.4 bytes per second and the Raspberry Pi Zero W was copying 8.6 bytes per second. It seems inescapable that Bret's results are incorrect by several orders of magnitude here.
C copy backwards: 1197.4 MB/s (not MiB/s as I previously read incorrectly) on the MQ Pro, 157.2 on the Zero W. Something went wrong here.
Standard memcpy: 1200.9 MB/s on the MQ Pro, 424.8 on the Zero W.
Standard memset: 2650.6 MB/s on the MQ Pro, 1699.9 on the Zero W. This seems surprisingly slow; you'd think an 8x-unrolled loop of SD instructions on a 1GHz RISC-V would memset about 5 gigabytes per second, if it got one instruction per clock, which it normally ought to. The XuanTie C906 core in the AllWinner D1 C906 is 64-bit, which is potentially an advantage for this; the analogous code for ARM6 can only write 32 bits per instruction. (The ARM has an STM instruction that stores multiple registers, but it doesn't actually run faster.) I'm not sure what happened to the extra factor of 2 in performance. Similar remarks apply to the memcpy results above.
Amazon Basics 64GB MicroSD card: MQ Pro reads sequentially at 11.48 MB/s, writes sequentially at 10.77 MB/s; Zero W reads sequentially at 21.36 MB/s, writes sequentially at 19.6 MB/s. (I'm ignoring the random reads and writes because he doesn't specify the read and write size, yet he gives the results in MB/s instead of IOPS.) Note that these are six orders of magnitude faster than the 12.4 and 8.6 bytes per second given earlier.
Unfortunately Weber doesn't link to the benchmark code or document his compilation and execution environment. Presumably the memset and memcpy results are largely measuring the performance of the libc functions, for example, so reproducing them would require knowing if he's using glibc, musl, or a C library he wrote himself.
Mostly I feel like these benchmarking results are not well enough specified to be useful, which is a shame. I'd like to be able to use this kind of benchmark to predict the performance of a system within a factor of 5 or so, but these results are too irreproducible for that.
https://hoult.org/d1_memcpy.txt
I got about the same speed (1100 MB/s) for huge in-RAM copies. The in-cache speed peaked at 3771 MB/s for an 8 KB copy with custom code (shown on that page) using the D1's 128 bit vector registers, 2058 MB/s using the standard glibc function.
150 to 400 MB/s on the Pi Zero is very believable. The D1 is pretty strong RAM performance. The HiFive Unmatched was about 180 MB/s when I tested it. You need top-end DRAM controller IP and also a prefetch engine to get the good read speeds, and it's no surprise if an ARM11 doesn't have that. SiFive also doesn't have it on their self-produced chips. Hopefully Horse Creek has the good Intel IP for peripherals and RAM.
I have no idea what's going on with the Dhrystone. SiFive's in-order single-issue RISC-V cores get about 1.6 DMIPS/MHz on 32 bit cores, 1.7 on 64 bit cores. I haven't measured but I'd expect the C906 to also be around 1.7 i.e. 1700 VAX MIPS at 1 GHz.
1 GB/s or even 4 GB/s is still pretty anemic for single-computer laptops, but an order of magnitude improvement over Unmatched is great news.