
A RISC-V CPU for $8 - heywire
https://hackaday.com/2019/02/14/new-part-day-a-risc-v-cpu-for-eight-dollars/
======
ac29
There's a port of MicroPython to these chips, which is nice:
[https://github.com/sipeed/MaixPy](https://github.com/sipeed/MaixPy)

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

------
glhaynes
From the RISC-V Privileged ISA Specification
[[https://riscv.org/specifications/privileged-
isa/](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.

~~~
FullyFunctional
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).

~~~
gmueckl
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).

~~~
pjmlp
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.

~~~
tremon
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...](https://softwareengineering.stackexchange.com/questions/279334/why-
was-the-itanium-processor-difficult-to-write-a-compiler-for/279395#279395)

~~~
pjmlp
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.

------
FullyFunctional
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).

~~~
desdiv
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](https://github.com/kendryte/kendryte-freertos-sdk)

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

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

------
mrmondo
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...](https://www.aliexpress.com/item/LEORY-
Sipeed-M1-Dock-Development-Board-2-4-inch-320-240-LCD-Screen-OV2640-Camera-
Kit/32968590089.html)

~~~
luma
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.

~~~
theli0nheart
> _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.

~~~
chx
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](https://item.jd.com/36832086035.html)
and via superbuy [https://www.superbuy.com/en/page/buy?nTag=Home-
search&from=s...](https://www.superbuy.com/en/page/buy?nTag=Home-
search&from=search-input&url=https%3A%2F%2Fitem.jd.com%2F36832086035.html) add
a cheap old 170W laptop charger from Lenovo with the right plug converter
[https://www.ebay.com/itm/282597814816](https://www.ebay.com/itm/282597814816)
and presto, you have a super high wattage desktop USB charging station.

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

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

------
microcolonel
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.

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

[https://www.seeedstudio.com/Sipeed-MAIX-I-module-w-o-
WiFi-1s...](https://www.seeedstudio.com/Sipeed-MAIX-I-module-w-o-WiFi-1st-
RISC-V-64-AI-Module-K210-insid-p-3210.html)

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...](https://www.seeedstudio.com/Sipeed-MAix-BiT-for-
RISC-V-AI-IoT-p-2872.html)

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

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

~~~
agumonkey
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 :)

~~~
yjftsjthsd-h
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.

~~~
justinclift
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. ;)

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

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

~~~
agumonkey
ELeven Exabytes and Constant TRashing Of Nodes

------
Koshkin
The runner-up: [https://www.analoglamb.com/product/dual-core-
risc-v-64bit-k2...](https://www.analoglamb.com/product/dual-core-
risc-v-64bit-k210-ai-board-kendryte-kd233/)

~~~
monocasa
Same chip, different board.

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

~~~
wyldfire
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.

------
potatofarmer45
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).

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

~~~
mereel
RISC-V is an open ISA created by these guys:
[https://riscv.org/](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.

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

~~~
spacenick88
That's the idea yes

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

~~~
steve19
I think AVR had already been supplanted by ARM and ESP

------
childintime
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?

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

~~~
childintime
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)!

