CodeX

Everything connected with Tech & Code. Follow to join our 1M+ monthly readers

Follow publication

Addressing Criticism of RISC-V Microprocessors

Is RISC-V just a rehash of 1980s RISC ideas? Requires too many instructions to do simple stuff?

Erik Engheim
CodeX
Published in
16 min readMar 20, 2022

RISC-V is an instruction-set architecture (ISA) for microprocessors which people seem to either love or hate. In particular there seem to bit of rivalry between the ARM and RISC-V camp developing.

It is perhaps not without reason. RISC-V and ARM represent quite radically different philosophies about how a RISC chip should be designed. RISC-V is taking a very long term view with a strong emphasis on simplicity and not painting yourself into a corner due to choices which have short term benefit, but may cause long term problems. RISC-V really embrace the philosophy of RISC, in terms of keeping things really simple with not only a minimal instruction-set but also one dominated by simple instructions.

ARM is more of a ruthlessly pragmatic design choice. Choices are made based on what makes sense today and in the near future in terms of what we are currently capable of doing in hardware. ARM design does not shy away from adding fairly complex instructions if those are believed to improve overall performance.

Hence ARM has numerous instructions which each do quite a lot of work. ARM has instructions for complex addressing modes as well as conditional execution instructions (32-bit ARM only). These instructions are executed if a condition is true, allowing us to avoid branches.

There are merits to both approaches. When criticizing one design it is useful to get the facts straight. For RISC-V there are a lot of misconceptions which I want to set straight. I will try to cover some of the more popular ones I have encountered.

Myth 1: RISC-V Instruction-Set Bloats Programs

RISC-V instruction typically do a lot less than ARM instructions. ARM has an instruction LDR for loading data from memory into a register. It is designed to be able to handle typical C/C++ code like this:

// C/C++ code
int a = xs[i];

We want to pull data at index i out from an array xs. We can translate this into ARM code where register x1 holds the start address of array xs and register x2 holds…

Create an account to read the full story.

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Or, continue in mobile web

Already have an account? Sign in

CodeX
CodeX

Published in CodeX

Everything connected with Tech & Code. Follow to join our 1M+ monthly readers

Erik Engheim
Erik Engheim

Written by Erik Engheim

Geek dad, living in Oslo, Norway with passion for UX, Julia programming, science, teaching, reading and writing.

Responses (8)

Write a response