6 ms·
Design of the RISC-V Instruction Set Architecture [pdf]
- rwmj 11y agoThe best part of this paper is the thorough analysis of why existing ISAs suck (chapter 2).
- wmu 11y agoIt's interesting why the ISAs suck or getting rotten over time (for example x86). I mean, designing an ISA is not a job for interns, it have to be developed by experienced engineers. So, are all these guys have no idea what they're doing? Or, maybe some non-visible factors force certain decisions?
- jabl 11y agoLike is said in the abstract, the designers of risc-v have the advantage of 3 decades of hindsight. So they could avoid stuff that was considered good back in the day but history showed was more a disadvantage, like delay slots ot register windows. The cynic in me likes to think that existing proprietary isa's keep adding new instructions partly to keep customers on the upgrade treadmill. If you design an open ISA from a clean slate, you can make a nice orthogonal one from the get go.
- _chris_ 11y ago8086 was put together in just a few weeks, once it was clear Intel needed a "stop-gap" ISA, as their other design (432) was taking too many years to put together. And it shows. The operations they blew 1-byte instructions on is astounding (e.g., ASCII Adjust after Addition...)
- ndesaulniers 11y agoThis should be a good read. I aspired to do stuff like this in my undergrad: https://github.com/nickdesaulniers/Omicron/blob/master/ProjectReport.pdf https://github.com/nickdesaulniers/Omicron/blob/master/Proje... People like the author, Andrew Waterman, and others like Bunnie Huang who work towards making more of computing open are inspiring. I feel like the last piece of the puzzle is open FPGAs. I'm quite sure FPGAs are critical to the open hardware movement. I should quit Google and solve this...
- ndesaulniers 11y agoAlso, some choice quotes I've pulled while reading chpt2 ("Why Develop a New Instruction Set?"): * MIPS: ...MIPS remains a trademark of Imagination Technologies; MIPS compatibility cannot be claimed without their permission. * SPARC: SPARC Intl. continues to grant licenses for v8 and v9...for $99...[but] continued development of Oracle SPARC is proprietary. * Alpha: The Alpha also highlights an important risk of using commercial ISAs: they can die. * ARMv7: Between ARM[v7] and THUMB, there are over 600 instructions...NEON adds hundreds more. * ARMv8: The compact THUMB instruction set has not been brought along to the 64-bit address space...as we show in cpht5, it cannot compete in code size with a variable length ISA. * 80x86: Intel [has done all these great things]...the design quality of the ISA is not one of them.
- nickpsecurity 11y agoGood list. Let me add to it. SPARC: Don't forget the only production-ready, GPL'd CPU from Gaisler & its proprietary improvements. Also, Fujitsu and Russia have SPARC processors. Not just Oracle. Fujitsu's are badass. http://www.gaisler.com/index.php/products/processors/leon3 http://www.gaisler.com/index.php/products/processors/leon3 http://www.gaisler.com/index.php/products/processors/leon4?task=view&id=338 http://www.gaisler.com/index.php/products/processors/leon4?t... Alpha: Yes, it died. However, my digging found that Intel and Samsung spun it off into a dedicated company licensing Alpha to anyone interested. Only found one vendor that bought it for machines. Nobody major wanted it to exist enough to buy a license. So, the market killed it. ARM: Similar issues to MIPS in that ARM will sue your ass any chance they get. There's a reason the clone went with ARMv2 and said it was not for profit. ;) Intel did a great one in the past. Still available but crippled. Look here: https://en.wikipedia.org/wiki/Intel_i960 https://en.wikipedia.org/wiki/Intel_i960 POWER and PPC stayed head to head with Intel for years with many PPC cores and boards in embedded. Even in FPGA's. They also accelerated decimal ops nice for business apps. https://en.wikipedia.org/wiki/PowerPC https://en.wikipedia.org/wiki/PowerPC Dreamcast had a Super-H. Those are still around with their own cost-benefit analysis: https://en.wikipedia.org/wiki/SuperH https://en.wikipedia.org/wiki/SuperH
- 11y ago
- bluetomcat 11y agoI have often wondered, do we really need any general-purpose registers to be visible in the ISA? Aren't they an implementation detail, just like caching? IMHO, a memory-to-memory architecture would make for a much simpler ISA and allow much easier code generation (no register allocation needed).
- panic 11y agoOne problem would be instruction size. On a system with (e.g.) 32 registers, each register can be addressed with 5 bits, while a memory address is 32-64 bits.
- bluetomcat 11y agoThere could be a scheme for encoding large immediates in a compact way, just like ARM does. Besides, I don't think that instruction size or instruction cache pressure is the bottleneck nowadays.
- cesarb 11y agoThe RISC-V designers implemented a compressed instruction extension (the most common instructions can be represented in half the size), and found a performance gain. So yes, instruction size matters. From the 1.9 draft of the RISC-V compressed instructions specification: "Waterman shows that RVC fetches 25%-30% fewer instruction bits, which reduces instruction cache misses by 20%-25%, or roughly the same performance impact as doubling the instruction cache size." Larger caches are slower, so just doubling the cache size doesn't necessarily recover the performance lost by larger instructions.
- userbinator 11y agoimplemented a compressed instruction extension (the most common instructions can be represented in half the size), and found a performance gain. ...which makes me wonder why they didn't just make that the standard. x86 is dense and that's partly where its performance comes from.
- deleted 11y ago[deleted]
- jkeler 11y agoIt defines extensions but no way to detect them. Am I missing something?
- ianopolous 11y agoMaybe try executing one and catch the exception.
- cesarb 11y agoTake a look at the mcpuid register (one of the CSR registers) in the draft of the privileged architecture specification.
- clarry 11y agoLovely paper. How about the silicon? By now we've seen quite few more-or-less open microarchitecture designs (with various ISAs), and it sure must be nice to dream up a new, lean ISA on paper, even simulate it in software.. but I would like to run Doom on it. And Quack. And not just in a simulation. What are the chances that I can actually get to play with this design as I can with an AVR microcontroller on a breadboard or some ARM chip in one of these cheap evaluation boards? In, say, the following 5 or 10 years? Is it just a dream? Will it be like the CPUs in the Lemote computers? Way underpowered, even compared to a high end smartphone chip, and power hungry enough to require a noisy fan?
- ac29 11y agolowRISC [0] is designing a RISC-V chip and intending to finish tape out this year. [0] http://www.lowrisc.org/ http://www.lowrisc.org/
- zhemao 11y agoHaha, so Andrew's thesis is on here, too. If you like this, you might also be interested in the tech report we published just recently on RocketChip, our open-source RISC-V SoC generator. https://www.eecs.berkeley.edu/Pubs/TechRpts/2016/EECS-2016-17.html https://www.eecs.berkeley.edu/Pubs/TechRpts/2016/EECS-2016-1... I'm a grad student at the UC Berkeley architecture lab and worked with Andrew before he graduated. I'll also be interning at his new company, SiFive, over the summer. Happy to answer any questions you might have on RISC-V or RocketChip.