News for hackers. Stuff that matters.
Re:RISC-V is succeeding by einpoklum on Tuesday March 01, 2022 @10:56AM (#30515668)
Their business model was to be sold to NVIDIA, but that didn't work out.

Anyway, that's all well good, but - does anyone end up making decent RISC-V processors that could replace a desktop CPU, or a RPi CPU, or something weaker but not in a small niche? Or is this still a vision for the future?

Re:RISC-V is succeeding by snvzz on Tuesday March 01, 2022 @11:01AM (#30515743)
>does anyone end up making decent RISC-V processors that could replace a desktop CPU

As of November, a large number of extensions got ratified, including the vector extension, cryptography acceleration, hypervisor support and other important features.

RISC-V is finally not missing any important feature ARM or amd64 have, and it does it with an order of magnitude lower number of instructions (equivalent but simpler, i.e. better) and with significantly higher code density.

However, test chips with the first designs implementing all of that will take time, even assuming they were tapped out right then, after confirming no last minute changes.

High performance cores depend on these extensions, so we'll begin to see them soon. We know multiple such efforts exist.

Tenstorrent has one such project, led by Jim Keller.

>Their (ARM) business model was to be sold to NVIDIA, but that didn't work out.

They intend to go public now. I recommend against buying those shares, as I do not expect ARM to turn around.

Re:RISC-V is succeeding by thetallstick on Thursday March 03, 2022 @04:32PM (#30547302)
> with significantly higher code density.

This is not correct and is a known weakness of RISC-V at the moment. The ARM toolchains are really good and have decades of improvements in them. This is a big issue for those who need to buy ROM in volume.

Better tools are coming online though. For example:

https://blog.segger.com/code-size-closing-the-gap-between-ri...

"One of the issues faced by RISC-V developers is that the code density of the RISC-V instruction set for deeply embedded processors does not match that of Cortex-M with existing tools."

Re:RISC-V is succeeding by saagarjha on Tuesday March 01, 2022 @04:29PM (#30520269)
> RISC-V is finally not missing any important feature ARM or amd64 have, and it does it with an order of magnitude lower number of instructions (equivalent but simpler, i.e. better) and with significantly higher code density.

This has historically been a problem with RISC-V and it’s not really something you’ve backed up as being improved.

Re:RISC-V is succeeding by inkyoto on Tuesday March 01, 2022 @11:50PM (#30523873)
> […] an order of magnitude lower number of instructions (equivalent but simpler, i.e. better) […]

I am not sure how to parse the «simpler, i.e. better» part; simplicity vs betterness is orthogonal at best and is contradictory at worst.

Very few people write meticulously handcrafted, highly optimised code for any ISA today, and the compiler writers actually prefer a more complex ISA as it becomes easier for them to transalate high level programming abstractions into an efficient concrete hardware implementation and run it through an optimising pass. Simplicity of the ISA does not immediately translate into faster or more optimised code.

Moreover, creating a highly efficient optimiser is no easy feat as it depends on a large variety of factors and the in-depth knowledge of a specific CPU incarnation: the knowledge of each instruction's timing, instruction interdependencies (i.e. the most optimal instruction sequence that does not stall the pipeline or maximises the ALU/whatever utilisation etc etc), L1 I and D cache line sizes, the knowledge of a particular CPU model / generation… – and that is just a beginning. There is a good reason why Intel, AMD, IBM, ARM et al publish hefty optimisation guidelines / documents for each generation of their CPU's with the compiler writers in mind: the same sequence of instructions issued for the CPU model 123 might be less (or more) efficient than in the next CPU model 456 and vice versa; moreover (e.g. specifically for Intel vs AMD), a sequence of instructions optimised for a particular Intel generation might underperform for an equivalent AMD model or vice versa. Same is likely to be true for different RISC-V core designs from different RISC-V vendors. This is the reason why -mcpu=XXX and -mtune=YYY exist in GCC and clang/LLVM: efficient low-level code optimisation is a tricky business and depends on a large number of compounding factors.

It remains to be seen how the optimisation will be tackled in the RISC-V case with its potpourri of optional ISA extensions and also with the instruction fusion. Given that a random concrete RISC-V implementation can be a combination of the base ISA + a random permutation of any RISC-V extensions (in the worst case scenario), emitting the code that will run equally efficient across N different RISC-V core designs appears to be problematic. Instruction fusion can pose another challenge as a fused macro-instruction may or may not run as efficiently on a RISC-V instance that does not fuse them. There is no guarantee that the compiler generated / optimised code will be equally highly performant across different implementations even for the same set of ISA extensions.

Re:RISC-V is succeeding by snvzz on Monday March 07, 2022 @02:13AM (#30585015)
>and the compiler writers actually prefer a more complex ISA as it becomes easier for them to transalate high level programming abstractions into an efficient concrete hardware implementation and run it through an optimising pass.

Itanium aka the Itanic demonstrated this is not the case.

Re:RISC-V is succeeding by posterboy on Tuesday March 01, 2022 @02:16PM (#30518672)
What remedie do you recommend against buying those shares, though?
Re:RISC-V is succeeding by PaulHoule on Tuesday March 01, 2022 @11:35AM (#30516305)
My take is that RISC-V is not that great of an architecture and might never compete at the high end. (e.g displace ARM, Intel, POWER, etc.)

On the other hand there is a vast market for low-end CPUs that have specializations to be disk controllers and things like that. If the ISA and all the IP required to make specialized devices is free and particularly if there is a culture in which it is easy to learn how to do that then RISC-V will have a special place.

My next spatial computing project is going to be RP 2040 based mostly because I have the parts in stock (other projects are blocked because of supply chain issues) but I am really an AVR8 fanatic and the only path forward I see to higher performance AVR8 systems is a soft core running on an FPGA where very hard tasks (vision? comms?) get offloaded to the FPGA and that can be a very appealing architecture where somebody might prefer RISC-V particularly if the tooling and accelerator integration are there.)

Re:RISC-V is succeeding by zozbot234 on Tuesday March 01, 2022 @11:44AM (#30516386)
> might never compete at the high end. (e.g displace ARM, Intel, POWER, etc.)

It might also be successful, even in that segment. The RISC-V ISA was specifically designed to scale up (e.g. to OOO and vector processors) while still being very simple, especially at the low-end - a basic RV32E is really comparable in complexity with many real-world 8- and 16-bit chips.

Re:RISC-V is succeeding by jabl on Wednesday March 02, 2022 @02:24AM (#30524733)
The pretty minimal RV32EC core Ibex is estimated 15k gates: https://github.com/lowRISC/ibex

But, the similarly minimal Arm Cortex M0 is, drumroll, 12k gates.

Not saying this means Arm is better than RISC-V, such a small difference can probably be explained by some microarchitectural feature or lack of it. Just that you can scale down Arm as well.

But yes, I can see tiny chips like these putting a squeeze on 8 and 16 bit microcontrollers.

Re:RISC-V is succeeding by snvzz on Tuesday March 01, 2022 @12:10PM (#30516741)
>My take is that RISC-V is not that great of an architecture

That's not the impression I got, when I studied the specification.

Do you care to elaborate?

Re:RISC-V is succeeding by PaulHoule on Tuesday March 01, 2022 @12:26PM (#30517006)
Re:RISC-V is succeeding by snvzz on Tuesday March 01, 2022 @12:33PM (#30517103)
From your statement, I thought you had looked into it yourself.

I remember reading that ex-ARM employee's take back then, when it was discussed here[0]. It was based in a pre-standard version of the ISA which was already old at that point in time, and also ignored the rationale behind many of the decisions it criticized.

By objective metrics (simplicity of instruction set, features available, code density, absence of µarch assumptions), I find RISC-V to be the best general purpose ISA available at the present time.

[0]: https://news.ycombinator.com/item?id=24958423

Re:RISC-V is succeeding by mhh__ on Tuesday March 01, 2022 @12:48PM (#30517331)
These objective metrics are not even close to being tested at the moment, whereas aarch64 has made noticeably different decisions guided by real life. They might be wrong but I can't see confidently say riscv is actually better other than simplicity.

If the macro fusions don't work for example that's a pretty dramatic blow against RISC-V compared to aarch64. Similarly code density is a tradeoff because riscv's simplicity means more instructions in the first place i.e. requires actual battle testing first.

Re:RISC-V is succeeding by hajile on Tuesday March 01, 2022 @03:39PM (#30519684)
Jim Keller is overseeing a very large RISC-V core that should be around the same performance level as X1 or Zen 3. I guess we'll see what the ISA can do pretty soon.

He said they were talking about open-sourcing the CPU block. If they did (the CPU isn't their core business), we could see lots of RISC-V competition popping up. The age of CPUs being commodity items seems to be approaching.

https://youtu.be/KOHQQyAKY14?t=494

Re:RISC-V is succeeding by mhh__ on Wednesday March 02, 2022 @12:26AM (#30524079)
That is definitely a phat core but I wouldn't expect it to be exactly trading blows with Zen3 or alder lake given (that depends on one's definition of "around the same" I suppose) since the backend seems quite narrow. That might be all they need for AI however, going to watch the video tomorrow. It has big caches by the looks of things but the throughput is more like Zen2 depending on what they can clock it at.

Either way I don't think anyone is seriously arguing you can't make a high-performance RISC-V process, but the thing is that scaling from (say) fast at memory and basic integer operations all the way up to all the sometimes wacky shit people want from their desktop machines will probably not be easy. It took Apple decades to do it with an ISA they helped design themselves.

Re:RISC-V is succeeding by hajile on Wednesday March 02, 2022 @04:04PM (#30533128)
https://images.anandtech.com/doci/15813/A78-X1-crop-23.png

They didn’t mention how many branch units they have, but the ALU count is identical to X1.

They have half the SIMD units, but each unit is twice the width which increases instruction density on high performance workloads.

Re:RISC-V is succeeding by ksec on Wednesday March 02, 2022 @01:43AM (#30524474)
They are planning to open the Small CPU core, the packet processor and the vector processing unit. NOT the actual high performance RISC-V core.

I also think the high performance here is a relative term to their small core.

Re:RISC-V is succeeding by jabl on Tuesday March 01, 2022 @01:29PM (#30517955)
The bitmanip extension that is scheduled to be part of the RVA22 profile will contain add with shift instructions (d= a + b<<c), which should obviate the need for one of the more common issues that otherwise would need fusion.
Re:RISC-V is succeeding by imtringued on Wednesday March 02, 2022 @07:02AM (#30526377)
I thought that at first but the truth is that x86 and ARM are stuck in a certain mindset, their instruction sets are so complicated it is impossible to mix compressed and uncompressed instructions. Once you consider compression then RISC-V is on average slightly denser than x86. Compression will be everywhere by default.

The only really janky part is the fusion of more than 3 instructions. Now that is insane. However, it is like energy storage for renewables. Once you have an electric grid that can store days worth of energy that's actually extremely amazing. The old way of doing things will be viewed as something cavemen or barbarians did. If macro op fusion scales beyond 3 instructions then RISC V will easily beat other architectures because 2 is the limit for every other architecture.

Re:RISC-V is succeeding by snvzz on Tuesday March 08, 2022 @02:45PM (#30605576)
>Once you consider compression then RISC-V is on average slightly denser than x86.

A note for those not following: RISC-V as in RV64GC. x86 as in 32bit x86.

64bit x86 aka x86-64 aka amd64 is dramatically worse in code density.

Re:RISC-V is succeeding by socialdemocrat on Tuesday March 01, 2022 @09:38PM (#30522992)
High end today requires specialized chips. E.g. if you want massive parallel processing you would want small cores, because you can make more of those. RISC-V gives that kind of flexibility of designing minimalist cores which can then be repeated a thousand times on a silicon die. The same thing that are beneficial for cheap specialized hardware is also often beneficial for high-end stuff, where you really need parallelism to push performance.

Whether you are designing a server chip or machine learning powerhouse it is all about having lots of cores. To get more cores you need smaller cores and RISC-V has demonstrated they can make small cores of half the size of an ARM core with similar performance.

RISC-V simplicity really starts paying off once you go very small.

Re:RISC-V is succeeding by hajile on Tuesday March 01, 2022 @03:36PM (#30519649)
Jim Keller's team is creating a 6-wide issue RISC-V CPU. It should have similar IPC as ARM X1 or AMD Zen 3.

https://youtu.be/KOHQQyAKY14?t=494

Re:RISC-V is succeeding by Taniwha on Tuesday March 01, 2022 @05:06PM (#30520702)
here's an 8-issue design:

https://moonbaseotago.github.io/

Re:RISC-V is succeeding by vbezhenar on Tuesday March 01, 2022 @11:03AM (#30515793)
There are rumours of Apple being interested with RISC-V. May be MacBook 2030 will feature it.
Re:RISC-V is succeeding by snvzz on Tuesday March 01, 2022 @11:08AM (#30515882)
Apple posted job advertisements looking for RISC-V technical roles.

What they plan to do with them is unknown, but Apple has the cash flow to try a lot of things.

I would expect them to quickly adopt it for embedded applications, and experiment with making their own high performance design, including porting MacOS and Rosetta Stone. They can afford to do this much, regardless of whether they end up moving their main CPUs to RISC-V or not.

Re:RISC-V is succeeding by m463 on Tuesday March 01, 2022 @12:31PM (#30517079)
I would imagine apple actually ships hundreds of devices with processors - each dongle and peripheral has at least one.
Re:RISC-V is succeeding by unfocussed_mike on Tuesday March 01, 2022 @11:21AM (#30516083)
Yep. There's surely a bunch of uses of RISC-V that have little or nothing to do with the main CPU, even in a conventional machine.

Trust modules, device controllers, smart adapter cables etc.

Re:RISC-V is succeeding by jhickok on Tuesday March 01, 2022 @11:36AM (#30516311)
For what it's worth, Apple always has people on hand monitoring innovations in technology and testing their stack on new hardware, most of which never sees the light of day.
Re:RISC-V is succeeding by Macha on Tuesday March 01, 2022 @12:13PM (#30516796)
See OS X on Intel being a thing inside Apple for years and years before they decided it should see the light of day.
Re:RISC-V is succeeding by throwawayboise on Tuesday March 01, 2022 @12:49PM (#30517340)
NEXTSTEP was multi-architecture even before Apple owned it.
Re:RISC-V is succeeding by Melatonic on Tuesday March 01, 2022 @07:24PM (#30521955)
Probably for future research if they intend to try to smear campaign it :-)
Re:RISC-V is succeeding by mhh__ on Tuesday March 01, 2022 @12:50PM (#30517357)
Apple had a big part in aarch64 being what it is today so I am quite skeptical they'd just jump ship.

I might be making this up (I can't remember the company) but I'm pretty sure at least one chip designer has moved from risc-v to arm. It's not clearcut.

Re:RISC-V is succeeding by rjsw on Tuesday March 01, 2022 @12:17PM (#30516868)
Making a RPi equivalent would require a GPU with Linux support, I don't see any sign that RISC-V chip vendors are able to do this.

Building a desktop system with a PCIe graphics card would be easier.

Re:RISC-V is succeeding by ColonelPhantom on Tuesday March 01, 2022 @09:00PM (#30522747)
There actually exists at least one GPL-licensed GPU core (GPLGPU), but it's based on a 90s PC 3D accelerator that's really just not that good.

I believe the team behind LibreSOC is also working on a 3D processor, but I don't know how far along they are.

However, if a vendor instead ships a decent framebuffer and high-performance vector unit, I think LLVMpipe would not be a problem for most RPi-equivalent use cases, either light desktop use or server use (especially the latter!)

Re:RISC-V is succeeding by Narishma on Tuesday March 01, 2022 @12:26PM (#30516993)
Isn't Imgtec doing that?
Re:RISC-V is succeeding by rjsw on Tuesday March 01, 2022 @12:32PM (#30517093)
Where can I get the source code for PowerVR kernel drm code from?
Re:RISC-V is succeeding by snvzz on Tuesday March 08, 2022 @02:47PM (#30605615)
Re:RISC-V is succeeding by Narishma on Tuesday March 01, 2022 @01:58PM (#30518408)
Nowhere because it's not available yet. They only made a few announcements.
Re:RISC-V is succeeding by snvzz on Tuesday March 08, 2022 @02:47PM (#30605621)
This has since changed. They've released a DRM/DRI driver.