Reduced Instruction Set Computers (RISC) Flashcards
What is an ISA?
The repertoire of instructions that the processor can perform
What are the 2 types of ISA?
- Common commercial ISAs
- Open source ISAs
Give 2 examples of common commercial ISAs and state if they are RISC or CISC
- Intel (CISC)
- ARM (RISC)
Give an example of an open source ISA
RISC-V
What are the 3 main points in RISC philosophy?
- Make the common case fast
- Orthogonal instruction set design
- Simple instruction decode
Explain what ‘make the common case fast’ means
Don’t optimise rare cases at the expense of resources that could be used for the benefit of the common case eg. cache space
Use a sequence of existing, simple instructions instead of adding a new, complex instruction
Explain what orthogonal instruction set design is
This is where all instructions can use all addressing modes
Eg. all arithmetic instructions use the same operands
Registers are general purpose instead of being specialised
How does RISC make instruction decoding simpler?
Instructions are a fixed length eg. 32 bits
What characterises RISC instructions?
Small, highly-optimised set of simple instructions. Use a sequence of existing simple instructions instead of adding new complex ones.
What characterises CISC instructions?
Does RISC need ROM?
No because instructions can be cached
What optimisations can be performed with RISC instructions?
The compiler can be optimised to optimise the order in which the instructions are presented to the processor
What are the two different types of RISC instruction?
Load/store and arithmetic
What is the difference between load/store instructions and arithmetic instructions in RISC?
Arithmetic instructions can be done between registers (multiple registers can be accessed in one clock cycle) with no operand in memory, whereas load/store require a memory access
Give 3 reasons why ISA’s don’t matter
Most of performance and energy use on a processor is due to:
1. Algorithms
2. Application code
3. Compilers
Give a reason why ISA’s do matter
If using proprietary closed-source software, you don’t have access to the code. If your ISA catches bit rot, you can no longer compile this source code
What is RISC-V?
Free and open source ISA developed at UC Berkeley
What does it mean that RISC-V is a modular ISA?
It has a small standard base ISA with multiple standard extensions
What is a register file?
Memory. It is multi-ported, so can access multiple registers in one clock cycle so read/write different locations at the same time. It also provides very low latency access
What is an immediate value?
A constant that is stored in the encoding of an instruction. This value is immediately available from the instruction, without needing register or memory access
Different types of instructions have different ?
Encoding
What is the width of a RISC-V instruction?
32 bits
How many integer registers are there in RISC-V
31 integer registers x1-x31, plus x0 zero register
Which registers are always in a fixed location in the instruction encoding? What do they do?
rs1, rs2 and rd
Values to operate on are retrieved from rs1 and rs2 and the result is stored in rd