Live data from Hacker News

RISC-V: They Should Have Known Better

dmitry.gr

401–410 of 467 posts

Re: RISC-V: They Should Have Known Better

#401
post #237

Earlier quoted context omitted.

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.

If everyone has equal ability to build a moat, it's not a moat.

If every one has a hammer and a saw and identical wood planks, everyone can build a frame that holds up 100 years?

Think it through. This is the HN comment section after all.

Re: RISC-V: They Should Have Known Better

#402

Yet it's royalty-free and good enough for Espressif (maker of ESP32) to move exclusively to the RISC V open-source instruction set architecture [1]. "Good enough ISA plus zero licensing cost" beats "perfect ISA plus royalties" in the embedded space. Also, let's not forget that the reason the world is built on the von Neumann architecture is that it was made available for free. [1] - https://www.eenewseurope.com/en/es…

yeah thats kind of the conclusion if you read the article entirely...

Re: RISC-V: They Should Have Known Better

#404

Earlier quoted context omitted.

It is the easy part. Four weeks is plenty of time. That's why it's so bizarre that the RISC-V design is so awful . The hard part is the software support side (though, as comments elsewhere in the thread point out, AI is pretty helpful there) and then those lovely pieces like specifying the precise behavior of interrupts. If it had a snowball's chance in hell of going in to any kind of production anywhere, I'd have no…

How many people are working on this in your couple years example? Is that just one guy or a team of 20 or something else? Whats the average salary for the team *n this scenario?

I said "me" and "four weeks" because laying out an ISA is a pretty straightforward job for one person in one month.

The deliverable would be a (theoretically) complete specification PDF like RISC-V's.

I have little doubt that I or Adrian could do it, or plenty of others. It might not reach the quality of something like AArch64 with that level of resources, but it's not hard to beat RISC-V.

Re: RISC-V: They Should Have Known Better

#405

Earlier quoted context omitted.

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.

Not a bug, just not optimized. Because I think there's a csr to read it the fpu is dirty but... That requires csr extension. It would also increase jitter, which in some cases is more important. At best it should be still there as an option, but also optionally improved

> That requires csr extension.

Interrupts require the CSR extension. In practice all RISC-V CPUs support Zicsr.

Re: RISC-V: They Should Have Known Better

#406
post #398
post #319

Earlier quoted context omitted.

How about EPIC-esque packet-based instructions? 64-bit instructions with 4 bits indicating instruction formats (60-bit, two 40+20-bit variants, 30+30-bit, 20+20+20-bit, three 30+15+15-bit variants, and 15+15+15+15-bit). Have each larger instruction type be a strict superset of the smaller instructions, but with larger immediates, more registers, and maybe additional instruction formats (eg, for SIMD). Something like…

So a VLIW, interesting but usually compressed instructions are at most two-registers..

Not traditional VLIW per-se as packets wouldn't imply parallelism (though that's theoretically possible) and instruction count would vary.

2-register to 3-register also just involves different wiring and costs nothing. I think you'd see 15-bit stick with 2-register. 20-bit would more interesting. You could choose to spend 3 bits on a third register or you could widen 2-register instructions to access the 32 core registers (or something between where you do 3-register, but only on 16 registers). 20-bit also reduces some of the need for very large 15-bit immediates (especially jump which is upward of 10% of the total space on 32-bit designs) which could allow more 15-bit instructions further improving effective density.

Easy access to 40/60-bit instructions mean stuff like vsetvli could simply go away and very useful instructions like FMA4 (instead of FMA3) could be added. Vector masking is another big one. They don't have enough bytes for a full vector mask set resulting in some hacks.

The big question is about jumping and predicting inside packets. You can add 2 bits for what externally looks like 16-bit addressing (where the 2 bits indicate packet position to jump to) or have faster jumps that always hit the beginning of the packet (at the expense of code density due to nops). There might even be a hybrid approach where short jumps can jump within a packed, but long jumps must jump to packet boundaries (which makes sense as most compilers make functions align on cache line boundaries anyway). There is a point for eliminating 20-bit (and all that compression goodness) for 45+15-bit pairs instead) as branches inside packets are immediately calculable.

Re: RISC-V: They Should Have Known Better

#407
post #376

Earlier quoted context omitted.

It is the easy part. Four weeks is plenty of time. That's why it's so bizarre that the RISC-V design is so awful . The hard part is the software support side (though, as comments elsewhere in the thread point out, AI is pretty helpful there) and then those lovely pieces like specifying the precise behavior of interrupts. If it had a snowball's chance in hell of going in to any kind of production anywhere, I'd have no…

> That's why it's so bizarre that the RISC-V design is so awful. Not bizarre. The design is a direct result of the biases of its initial designers, and its original intended use-case. And TBH, if you assess it by its original design criteria, it's actually pretty good. It's just by the time RISC-V had escaped containment and was starting to become a general purpose open ISA, it was a little too late to start from the…

Very true... but I can't help but note that basically every person I've ever met with significant experience with multiple architectures at this level, and not connected in some way to RISC-V, utterly hates the thing.

That feels like a "don't release yet" flag to me!

But I hear you.

Re: RISC-V: They Should Have Known Better

#408

Earlier quoted context omitted.

I do wonder, which of the two of us actually worked for years in Apple’s kernel team? :)

Not me for sure. I have no idea about you. Of household name companies I've only worked at Mozilla and Samsung R&D. And SiFive if you count people in threads such as this. I could of course be wrong but I think the publicly known history sets the pattern pretty reliably for the speculation.

FWIW, since OP was, well, the OP:

https://dmitry.gr/?r=01.Myself&proj=06.Work

Re: RISC-V: They Should Have Known Better

#409
post #370

Earlier quoted context omitted.

it still is a much better starting point than coming up with your own bespoke ISA, building a toolchain around it and convincing potential customers that your proprietary architecture is worth the effort to deal There are lots of somewhat successful yet little-known Chinese companies with their own proprietary architectures and the toolchains to match, so I don't think it's that clear-cut. (That said, most if not all…

China is different - the state probably has impact on cpu/mcu vendor selection.

All states regulate, subsidize, or otherwise exert influence on companies acting in their territories. China is not unique or different in that regard. They have been forced to try somewhat harder, but that was really due to the actions of the US trying to restrict their access to free trade. Chine restrictions on buying western tech didn't come until far after NATO countries had placed similar restrictions on Chinese tech.

Re: RISC-V: They Should Have Known Better

#410
post #395

Earlier quoted context omitted.

And USB-C is known as a compatibility mess.

Is it though? Is it really? Outside the HN rant circles which want to return back to times where you needed an adapter for every single laptop model or be shit out of luck for connecting your mouse or projector?

yes, hope this answers the loaded question :)
Post reply on HN