5 ms·
Great flamebait ;) what makes riscv suitable for teaching is that the ISA is trivial to map to hardware. This is because it is so regular. Students with zero e
by bjourne 2y ago
Great flamebait ;) what makes riscv suitable for teaching is that the ISA is trivial to map to hardware. This is because it is so regular. Students with zero experience can design simple riscv cpus in their first asm course. More experienced students can design cpus with pipelining, branch prediction, ooo execution, etc. Old ISAs from the 1980s are way more difficult.
- adrian_b 2y agoRISC-V has been designed with the exact goal for being an ISA easy to implement in hardware, so that students will be able to do this. For this purpose, RISC-V is excellent. The RISC-V ISA has not been designed as an efficient method for encoding computer programs and even less for being easy to program in assembly language. When programming in assembly language, a complex ISA is bad, because one cannot hold in mind all its peculiarities, but a too simple ISA is even worse, because every simple operation must be implemented by a complex sequence of instructions that is easy to forget and to get wrong. I wonder if any of those who claim that the RISC-V ISA is simple can remember without searching the documentation how to implement the checks for integer overflow after each arithmetic operation. The didactic examples of using RISC-V usually do not check for any errors, which is not acceptable in any critical application. I find funny that sometimes the same people who claim that the unsafe RISC-V ISA is good also claim that C and C++ are bad, because with default compilation options they are unsafe in comparison with e.g. Rust.
- pcwalton 2y ago> I wonder if any of those who claim that the RISC-V ISA is simple can remember without searching the documentation how to implement the checks for integer overflow after each arithmetic operation. I mean, I can't give you the Hacker's Delight magic numbers for expressing integer division by a constant via multiplication on AArch64 or x86-64 off the top of my head either, but that's what we have compilers for. The fact that you sometimes have to look up how to do simple things is just part of programming.
- AnimalMuppet 2y agoWhy is designing a simple CPU a relevant goal for an asm course? It's a goal for a hardware course.
- snvzz 2y agoUniversities usually do both, and it makes some academical sense for it to be the same.