Hacker News new | past | comments | ask | show | jobs | submit login
A RISC-V CPU for $8 (hackaday.com)
230 points by heywire on Feb 14, 2019 | hide | past | favorite | 62 comments

There's a port of MicroPython to these chips, which is nice: https://github.com/sipeed/MaixPy

It's also attracting a lot of attention in the MicroPython community; seems like this port will improve rapidly.

very nice

From the RISC-V Privileged ISA Specification [https://riscv.org/specifications/privileged-isa/]:

We briefly note that the entire privileged-level design described in this document could be replaced with an entirely different privileged-level design without changing the user-level ISA, and possibly without even changing the ABI. In particular, this privileged specification was designed to run existing popular operating systems, and so embodies the conventional level-based protection model. Alternate privileged specifications could embody other more flexible protection-domain models.

Do many/most other architectures have this attribute? The idea of replacing only one "side" of an architecture has never crossed my mind before and seems pretty cool.

To my knowledge, no other _widely deployed_ ISA has had this level of flexibility and foresight. In fact it's usually the opposite; the ISA is usually tightly coupled to the processor implementation that introduced it and the survival (= market success) of the immediate product is all that matters. However if it's successful, the successor(s) are now locked into support all the legacy of its predecessors.

I can only think of two other examples that successfully planned for the future: the IBM 360 (extremely CISC, but still alive today) and the DEC Alpha (beautiful design, but now mostly dead).

The Alpha disappeared because DEC went under and HP buried the CPU in favor of the Itanium, which is now also dead (mostly because of its technical shortcomings).

Itaninum is dead thanks to cross licensing between Intel and AMD.

If the choice had been Itanium or bust, it would have turned out much different outcome.

Not really, the Itanium VLIW architecture bet heavily on instruction-level parallellism as opposed to thread-level parallellism. In theory, the Itanium could issue and retire 3 instructions per cycle thereby making it competitive with x86 even on modest clock speeds.

The main problem was that not many programs could sustain 3 parallel instructions in their critical path, which meant that the compiler would often generate NOPs to fill the empty instruction slots. IIRC the Itanium typically achieved around 40% of its theoretical performance on conventional workloads. The term "NOP density" was coined specifically to research this problem.

There is another interesting observation in [1] that I haven't realized before: even if the compiler were to succesfully generate 3 instructions per cycle, the processor then had to possibly fetch 3 memory locations in that instruction cycle. If two of those were already in cache, the instruction would still stall on the third memory fetch. Contrast this with the implicit parallellism of hyperthreading, where the processor can continue executing a different thread when the current thread encounters a memory stall.

[1] https://softwareengineering.stackexchange.com/questions/2793...

If Intel decided they would only produce Itaniums, without an AMD around to come up with the idea to create AMD64, we wouldn't have any option than to live with those shortcommings and eventually get improved designs.

This has come up so many times. It has far too little memory for Linux, but ignoring that, the MMU is broken and can't support virtual memory (not that they claim to support supervisor mode anywhere).

Kendryte K210 is designed for FreeRTOS[0] and other embedded OSes.

Complaining that it doesn't support Linux is like complaining that a Honda Civic can't compete in Formula One.

[0] https://github.com/kendryte/kendryte-freertos-sdk

There are various slimmed down versions of Linux. The kernel itself can be squeezed down into rather small footprint.

It's the lack of full MMU that's the actual reason, it keeps the chip firmly in the microcontroller domain.

in 1995 the Linux (Slackware) was flying on 25MHz 386SX with 4M RAM :)

...in part because the 80386 supported virtual memory.

+1 for nostalgia!

I'd be happy if it ran FreeRTOS. 8MB sounds like a whole lot of memory to me ... currently working with less than 512K on the esp32.

I have a LOLIN32 with 4MB RAM, it is a dream.

Are you sure that's RAM and not flash?

Not sure about GP, but the ESP32 supports psram up to 4mb, and newer chip versions come with an integrated 8mb psram.

It is not designed as a general purpose microchip. It is designed as a microcontroller type microchip.

Memory is expansive, because Si chip area is expansive. The chip is designed for cheap special purpose applications. For that it fulfills the function.

Btw. you can run Linux on it, you just need to do something and can't simply put the latest and greatest Ubuntu distribution on it.

Here’s the Aliexpress link to buy the package with wifi, LCD and camera, it’s about 40% more expensive than "taobao.com" if you’re not a Chinese citizen with ID but still cheap as: https://www.aliexpress.com/item/LEORY-Sipeed-M1-Dock-Develop...

Careful - that's just the dev board without the M1 MCU itself. Taobao is pretty easy to access through the use of reshippers, I've used superbuy.com with much success but there are loads of options out there to pick up deals from Taobao and have them sent out of mainland China.

> I've used superbuy.com with much success but there are loads of options out there to pick up deals from Taobao and have them sent out of mainland China.

Please do tell more! I just made a Superbuy account but can't for the life of me figure out how to use it.

I'm somewhat fluent in Mandarin (my reading's a little rusty), so if that opens up additional options I'd love to know of them.

I had zero problems with Superbuy, copy the taobao or jd.com url to the top search bar and from there it should be trivial. Now, I do not have the taobao URL to show you but here's an interesting device (takes wide range DC via 5.5mm x 2.5mm plug and spits up two USB C and one USB A connection) https://item.jd.com/36832086035.html and via superbuy https://www.superbuy.com/en/page/buy?nTag=Home-search&from=s... add a cheap old 170W laptop charger from Lenovo with the right plug converter https://www.ebay.com/itm/282597814816 and presto, you have a super high wattage desktop USB charging station.

This is really good to know - thanks for the tip!

Thanks! This was super helpful.

Oh so it is - also available here: https://www.yoycart.com/Product/578484113485/

Off-topic: I'm so freaking excited for RISC-V.

Sold out already. :- )

I want to see what Espressif, SiPeed, or some other vendor manages to do with RISC-V. I'm currently prototyping an A2DP vendor codec extension for Opus using an ESP32 board, and it is pretty painless. Bluetooth is the high value bit in my opinion.

The module without WiFi is in Stock (and is the $8 model, the WiFi is $9).


There's also a dev board, which is probably much more useful than these bare modules. Unfortunately also out of stock: https://www.seeedstudio.com/Sipeed-MAix-BiT-for-RISC-V-AI-Io...

Ah I’ve had really good experiences with SeeedStudio too, ordered plenty of things over the years - dangerous site for me to visit when I have money ;,)

13$ for a rpi zero w like thing.. not bad

I think "esp32 like thing" is probably a closer comparison.

That thing clocks a 400MHz out of the box and has coprocessors .. I'd also guess that risc-v isa is more performant than esp32's one (super wild guess). Let's say it sits in the middle :)

The distinction to me is software; if it runs Linux or such, it's a computer. If I have to provide "firmware" then it is a microcontroller.

There are Fedora and FreeBSD builds for RISC-V. This particular item seems to have only 8MB though, so not really in (most people's) "computer" realm. ;)

RISC-V has a base ISA and many extensions, several of which are virtually required to run a "real" OS with features such as virtual memory. Every build of Linux I've seen for RISC-V is for an RVGC processor with an additional privileged mode.

Theoretically it should be possible to run "Linux" on a glorified microcontroller like the OP with μClinux, but I haven't seen that used for "real" work. It certainly couldn't be used as a general purpose OS.

Oh man I was so happy when I migrated from a PC 386SX with 2MB to a Pentium 75 with 8MB!

A joke about a memory-hungry program use to be that EMACS stands for Eight Megabytes And Constantly Swapping.

ELeven Exabytes and Constant TRashing Of Nodes

I went similarly from a 286 with 1MB to a Pentium 166 with 16MB.

That distinction is getting blurrier and blurrier every day with the ability to flash firmware to some MCUs such that they run Linux. :)

In my opinion the line to draw is support for a privileged mode/protection rings/memory protection. Anything without that can run μClinux at best, which isn't much better than an RTOS. Without process isolation an operating system isn't very "general purpose."

Yeah, Espressif joined the RISC-V foundation, so it will be interesting to see if there is an ESP32 with RISC-V instead of Xtensa sometime soon.

Maybe an RV64GC[V maybe] ESP64, with a bit more RAM. :- )

I view wifi on these devices as an anti-feature. Too often, they rely on MVP web services with limited security, and require a full TCP/IP stack, alongside CA-based PKI (meaning, an inherently limited lifespan).

Not against a limited lifespan, but I really do like the model of a bridge device that communicates over wire or bluetooth, especially for consumer IOT - bt-based standards prevent vendor lock-in, for example.

What a joke of a "release" why are all such products almost immediately out of stock. Do they make 20 units? They don't even bother to say on their website when if ever they'll have more units available.

Imagine if you worked months to develop a product based on this chip and after all this work you can't use it because it is out of stock with no further info. This is why it'll make no sense to use such chips until they can be bought at digikey, mouser etc in serious quantities.

Same chip, different board.

Anyone know what "neural network processor" means, with regard to this chip?

Sometimes it's a DSP or FPGA with blocks/instructions designed to implement common matrix transformations.

In this particular case a vendor on that site claims:

> 3. There are 5.9MB SRAM can be used for convolutional neural network acceleration, so, it is possible to run small model like tiny-yolo v2,MobileNet, as you see in face detection routine video.

It's a not very well documented "Neural Network Processor (KPU)"


This is super exciting. I hope the demand for these stimulates the copycat manufacturers into making even more RISC-V chips at lower and lower prices with better availability and options (aka, Arduino style).

What is the big difference between ARM RISC chips and RISC-V?

RISC-V is an open ISA created by these guys: https://riscv.org/. ARM RISC chips are ARM IP and not open. There's a lot more to unpack there, but that's the gist of it.

Will we see general purpose risc v's? I mean, as a substitute for ARM for example

That's the idea yes

Is there any chance this will supplant AVR for hobbyist uses?

I think AVR had already been supplanted by ARM and ESP

As a dark pattern, the chip seems purpose-built for spying. It is interesting as we're witnessing the birth of a new category of embedded chips. 1. I wonder if a chip with these features will be standard in a couple of years, and somewhat shake up the embedded world. 2. ARM was said to be bet heavily on AI, but this chip seems to be ahead. Correct?

I'm not sure I follow... What specifically about this chip makes it purpose-built for spying?

It is a chip that puts face-recognition (and sound-recognition) in a webcam almost for free, and it lowers the price of this capability dramatically. This lends itself to tracking people in public and commercial places, on a scale not yet seen. Maybe it even is the initial market? Regardless it represents an interesting new kind of device (which ARM was aiming for)!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact