the great advantage of risc-v is that you don't need to pay arm a license for every chip, but i think that's like 99¢ or something, which is too small to matter at the price point they're likely targeting
risc-v is better in many ways; the virtual memory architecture is much cleaner, you don't need a mode bit to switch between compressed and uncompressed instructions (which avoids all kinds of minor complications), the compressed instruction set is enormously simpler, conditional branches are usually one instruction instead of two because you don't have condition codes, and if you implement it in the same process as a similar-performance arm it uses less area and less power
it's worse in others; you don't have addressing modes with bit shifts, you don't have base+offset addressing, there's no bitfield extraction instructions, and the compilers aren't as good. all of this means lower coremarks or dmips per mhz in an in-order chip and more verbose disassembly, but a lot of it can be fixed with instruction-set extensions, which are enormously easier in risc-v land
(ldm/stm and conditional execution is maybe a wash; they're pretty convenient for assembly, but they complicate things like exception handling, context switching, debuggers, and memory-mapped I/O)
but it's pretty rare that issues like these are the deciding factor in whether a product is successful. i mean we have compilers and dynamic binary translation so generally switching between instruction sets is not that hard
gigadevice's risc-v clones of popular stm32s, the gd32vf line, seem to have failed despite lower power usage. gigadevice's arm clones of the same chips (gd32f) are enormously successful
99¢ would be a big deal for a microcontroller. I think you might have meant a different amount.
>gigadevice's risc-v clones of popular stm32s, the gd32vf line, seem to have failed despite lower power usage. gigadevice's arm clones of the same chips (gd32f) are enormously successful
As far as I am aware, there is no GD32VF line. There is a few variants of GD32VF103 and that's it. They are still at their first iteration of RISC-V chips, testing the waters.
Instead, I would look at WCH32V, as they have a range of RISC-V based families.
>it's worse in others
RISC-V always led in 64bit code density.
As of the recently ratified bit manipulation and code size extensions, RISC-V does now offer higher density in 32bit too, beating ARM thumb2.
>and the compilers aren't as good
Potentially still the case, yet RISC-V is rapidly building the strongest ecosystem.
i'd say 'a few variants of gdvf103' amounts to a 'gd32vf' line, but they seem to no longer be produced. maybe you're right that they'll dip back in, especially as tensions continue to build over taiwan; i was enthusiastic to see the gd32vf though admittedly i haven't actually done anything with the ones i got
i agree that wch's ch32v line is extremely exciting, especially at the low end, where it reaches a 10¢ price point i've never before seen in 32-bit mcus (probably because arm's licensing fees are too high), and i should have mentioned it
i agree that risc-v has always led in 64-bit code density, and that with some extensions it beats thumb-2, but actually i think it was already kind of tied with thumb-2 on code density
i agree that risc-v compilers will probably eventually be better than arm compilers
but i also think that if your hardware budget includes enough ram and battery to run linux it's unlikely that issues like these will be very significant
this weekend i'm prototyping a jit compiler with the objective of keeping most of my code in a bytecode form that's denser than even thumb-2 or rv32c; i anticipate about 20% better code density and about a 2-4× slowdown, with on the order of 64 clocks per instruction of compilation time. i think this should mostly eliminate the rv64c code density advantage, which i agree is pretty killer. that's not why i'm doing it, of course (i love risc-v)
Yeah, when you have that much ram, code density advantage matters less (although in L1$ it will still matter), and other factors weight more.
When it's designed for realtime, then high assurance and formal verification enter the game. There, I'd argue that the complexity of the ARM ISA runs counter to the goals, and RISC-V does an order of magnitude better.
>this weekend i'm prototyping a jit compiler with the objective of keeping most of my code in a bytecode form that's denser than even thumb-2 or rv32c; i anticipate about 20% better code density and about a 2-4× slowdown, with on the order of 64 clocks per instruction of compilation time. i think this should mostly eliminate the rv64c code density advantage, which i agree is pretty killer. that's not why i'm doing it, of course (i love risc-v)
Seems you're having a fun weekend. I am instead playing with old hardware, and reading some 80s book on serial comms.
lots of realtime systems still don't bother with formal verification, even though it's enormously more accessible today than 20 or 40 years ago
Architecture & software support is one thing, quality implementations is another.
ARM has decades of evolution & optimization behind it. Implemented in billions of devices. From cheap, small, low power to high-performance cores implemented on latest process nodes.
True, RISC-V is picking up speed. But world domination is a big task. ;-) All the places that ARM already has gone, RISC-V has still to go.
As NASA and ESA both selected RISC-V, it'll go quite far, in the literal sense.
But market for products like these tend to have long support cycles.
Even if there's a new kid on the block, there can also be a market for updated version of existing products.
And following from that: entirely possible ST would introduce some RISC-V parts as well.
I absolutely understand this, and that's exactly why it's appalling they're introducing a new line of microcontrollers today using an ISA that's already legacy.
No, they aren't. Otherwise, they would have selected RISC-V ISA, rather than a legacy ISA.
I am sad to see a microcontroller family I favored sabotage itself into irrelevance like this.