Live data from Hacker News

RISC-V: They Should Have Known Better

dmitry.gr

231–240 of 467 posts

Re: RISC-V: They Should Have Known Better

#231
post #202

Earlier quoted context omitted.

lol the government of brazil is in there

Why is that funny?

it’s funny because it’s unexpected. one of those members is not like the others. the rest are tech companies.

it does make me wonder what prompted them to join. it would suggest to me there are forward looking people in Brazil’s government. I am impressed.

Re: RISC-V: They Should Have Known Better

#232

I think I get it. I've tried microblaze-v for a while now. And just look at their interrupt handler. https://github.com/Xilinx/embeddedsw/blob/master/lib/bsp/sta... . With the FPU enabled at compile time, that's > 128 memory ops per interrupt. That's insane, especially without an NVIC and chaining and all that. My latency was astronomical, and my maximum interrupt frequency was pitiful. Ended up doing the work (sw an…

Yeah, this is a bug. They should only be saving the FP state if it's dirty.

Also this is one of the reasons I think Zfinx is a better option for embedded (i.e., the standard FP instructions operate on x registers instead of f registers): 31 registers is plenty to hold a mixture of integer and floating-point values, and you avoid the worst-case context save penalty.

Re: RISC-V: They Should Have Known Better

#234

Earlier quoted context omitted.

Luke is too modest. Something in the region of 5 million chips containing his hobby CPU have shipped since launch on August 8, 2024.

Could you share a link or more details? What is this hobby CPU project?

Luke Wren works at Raspberry Pi and designed the Hazard3 CPU core that is in the RP2350 chip.

Re: RISC-V: They Should Have Known Better

#235

Earlier quoted context omitted.

HP wrote a JIT to migrate old applications to their new hardware. So did Apple, twice. I don't know if IBM were the first but they've done it a few times as well for their mainframe hardware. In HP's case, they tried running their JIT to translate from architecture B to architecture B and ended up with better performance than running it directly.

HP or HP née Compaq née Digital Equipment Corporation?

HP proper. It was a PA-RISC they were targeting.

https://cseweb.ucsd.edu/classes/sp00/cse231/dynamopldi.pdf

Re: RISC-V: They Should Have Known Better

#236

Earlier quoted context omitted.

Luke is too modest. Something in the region of 5 million chips containing his hobby CPU have shipped since launch on August 8, 2024.

Could you share a link or more details? What is this hobby CPU project?

I think the GP is talking about the Hazard3 [1] core. This is one of the CPU cores besides the ARM M33 instantiated on the RP2350 µC [2]. See this article from Luke Wren (Wren6991) back when the RP2350 came out [3].

[1] https://github.com/Wren6991/Hazard3

[2] https://www.raspberrypi.com/products/rp2350/

[3] https://www.raspberrypi.com/news/risc-v-on-raspberry-pi-pico...

Re: RISC-V: They Should Have Known Better

#237
post #218

Earlier quoted context omitted.

> it still is a much better starting point than coming up with your own bespoke ISA 5 years ago I would have agreed with this but now I'm not so sure. We live in an era where you can tell a robot "Here's some C code. Design a 64-bit ISA, write the Verilog to implement it in an FPGA, write a C compiler for it, and use it to compile the C code I showed you earlier." And now your ISA and your compiler are part of your m…

If that's really all it takes, then it is not much of a moat.

In the set of all possible working implementations, there are one or more that are novel enough to become a moat legally or otherwise. If everyone has the same power (number of tokens) then capability (experience and understanding) becomes the differentiator to “find” that moat first.

Re: RISC-V: They Should Have Known Better

#238

Earlier quoted context omitted.

RISC-V is in many aspects just legally-distinct-MIPS, from the base instruction set all the way up to how certain extensions introduce kludges that are very reminiscent of later MIPS additions. While I do somewhat agree on the fact it was a huge missed opportunity to improve upon MIPS's technical flaws in order to realistically compete against the likes of ARMv8, we still have to keep in mind that the primary driving…

> it still is a much better starting point than coming up with your own bespoke ISA 5 years ago I would have agreed with this but now I'm not so sure. We live in an era where you can tell a robot "Here's some C code. Design a 64-bit ISA, write the Verilog to implement it in an FPGA, write a C compiler for it, and use it to compile the C code I showed you earlier." And now your ISA and your compiler are part of your m…

Designing a good 64-bit ISA, much better than RISC-V, is easy.

There are thousands of people who could design such an ISA in a couple of weeks, without any AI assistance.

The hard part, which has always been the moat of RISC-V, is writing all the required support software for a new ISA, i.e. all the utilities from binutils (assembler, static linker, ELF/DWARF utilities), compiler backends at least for gcc and llvm, debugger (at least a port for gdb server), dynamic linker and standard C library, possibly some parts of the standard libraries for other programming languages.

Previously this could have taken years and it is the only reason that has always justified the choice of RISC-V for minimum cost, despite how bad the ISA is.

If today the porting of all these software support applications to a new ISA could be accelerated with AI assistance from a couple of years to a couple of months, that would certainly enable the design and use of custom ISAs, and RISC-V would lose its appeal.

Re: RISC-V: They Should Have Known Better

#239

Earlier quoted context omitted.

Could you share a link or more details? What is this hobby CPU project?

I think the GP is talking about the Hazard3 [1] core. This is one of the CPU cores besides the ARM M33 instantiated on the RP2350 µC [2]. See this article from Luke Wren (Wren6991) back when the RP2350 came out [3]. [1] https://github.com/Wren6991/Hazard3 [2] https://www.raspberrypi.com/products/rp2350/ [3] https://www.raspberrypi.com/news/risc-v-on-raspberry-pi-pico...

Thank you!

Re: RISC-V: They Should Have Known Better

#240
post #55

Earlier quoted context omitted.

> "RISC-V is already dominant in the MCU space[...]" Where are you getting the idea that RISC-V is dominant? As someone who works in this space, that doesn't jive with my experience or the sources I've seen.[1] 32-bit microcontrollers only recently achieved a majority market share for gosh sakes! RISC-V is claiming that they have achieved 25% market share across selected segments, but they're still behind ARM (and x8…

It's used widely in Chinese stuff (which is basically everything) so in terms of volume it's probably already dominant. In terms of dollar volume ARM is still the leader, especially for higher-end (application level MCUs) stuff. RISC-V MCUs with MMUs or MPUs are scarce at the moment.

> RISC-V MCUs with MMUs or MPUs

MPUs are more common. The Physical Memory Protection option is basic and allows ranges of memory to be set unavailable in user mode. A few well-defined ranges do let you lock a user process down securely but it's not a real MMU. Low-end microcontrollers don't have enough RAM to warrant a real MMU.

The RISC-V core in the Raspberry Pi RP2350 has PMP as do the ESP32 cores.

Post reply on HN