4 ms·
RISC-V is meant to be a simple, unsurprising, boring architecture, with any clever stuff (such as macro op fusion) being done at the microarchitecture level. I
by rwmj 7y ago
RISC-V is meant to be a simple, unsurprising, boring architecture, with any clever stuff (such as macro op fusion) being done at the microarchitecture level. It's not a project for researching new architectures.
- beefhash 7y agoI really wish it was just one tiny less bit simple. The RISC-V spec doesn't specify that multiplication instructions (if implemented) need to be constant-time. Which means RISC-V cores will need stupid hacks for cryptography like these: https://bearssl.org/ctmul.html https://bearssl.org/ctmul.html
- rwmj 7y agoIt could be added in the future as a simple extension. (In fact I found at least two proposed crypto extensions with a simple search although neither mentions constant-time ops from a quick scan). There's a considerable penalty for all implementations if every multiply implementation has to be constant time.
- ncmncm 7y agoThat is another problem. The "optional extensions" have all the useful instructions in them, but typically just a couple of the instructions in each extension would provide most of its value. So, I don't get popcount because it's in the bitmanip extension along with 10M transistors' worth of clever stuff I don't need. Similarly, each of the other extension sets. It would be much more useful to define slices through all the defined ones, so you get either the absolute minimum core instructions, or add just the coremost of each extension set, or a more comfortable subset of each, or half of each, spiraling outward as transistor budget grows.
- rwmj 7y ago10 million transistors is a tenth of a square millimeter on current nodes, but that aside you really wouldn't want such a complicated system of "sub-extensions" because it would be a nightmare to write software for. Either the software would only work for very specific sub-extension mixes, or would require layers of ifuncs to deal with all combinations of missing sub-extension features. The current system of fairly granular extensions, a useful base architecture, and profiles defining what extensions are guaranteed for particular application classes (eg "Unix server") is a nice compromise between extensibility and software/distro complexity.
- 0xcde4c3db 7y agoA big part of the RISC-V story is the idea that microarchitecture decisions belong to the implementation and not the ISA specification. Specifying that multiplication must be constant-time would effectively be specifying that area-optimized cores aren't allowed to provide the multiplication instructions.
- anoncake 7y agoCouldn't this be solved by having constant-time and regular multiplication instructions?
- 0xcde4c3db 7y agoSure, but the constant-time instructions would presumably be defined in an extension along with other constant-time or crypto-optimized instructions.
- justincormack 7y agoArm 8.4 has a constant time flag that makes most instructions constant time, without changing the instruction set. You could definitely add this to risc-v. Or just make a constant time implementation.
- ncmncm 7y agoIt is supposed to be the basis for a lot of future work, incorporating what we have learned thus far. But it doesn't, much. It seems not different from anything from the '80s, when we knew less. If it is supposed to be simple, then great! Actually make it simple, instead of copying old complexities.
- rwmj 7y agoWhat "old complexities" are you talking about? It's a very simple and clean architecture.
- ncmncm 7y agoNo: it is just very familiar. It is like architectures we are used to, that we got used to because old designs were like that.
- Symmetry 7y agoIf you're an academic doing research into new techniques for branch prediction or some other topic it can be very useful to have well tested designs as a starting point you can modify to try out your idea which are starting from a very basic place. It isn't architecturally innovative, isn't meant to be, and isn't a good place to start if you're thinking about doing architectural innovation. A lot of people are talking up RISC-V like it'll solve every problem but there are many problems in both academia and the real world where it represents a solution.