ISA Design Flashcards
What is a register?
A small, high-speed hardware storage device found in a processor with a fixed size and functionality to fetch and store.
What is a general-purpose register?
These are used as a temporary storage mechanism; a processor usually has a small number of them and they are usually the size of an integer.
What is the instruction pointer?
Gives the address of the next function to execute
What does orthogonal mean?
Each instruction in an ISA performs a unique task without overlapping with other instructions (ARM is, x86 isn’t)
What is an operand?
Things the CPU can apply operations to
In an operation, where can arguments come from and where can results be stored to?
This movement can occur between:
- Register-memory, where at least one argument comes from memory; this is more expressive and easier than trying to organise register allocation
- Register-register, where all operations work between registers and only data transfer operations access memory; this separation of memory access and arithmetic functions makes design simpler
How many operands can an instruction take?
3: add x to y and store in z; both inputs and output are supplied, more memory access required
2: add x to y, changing y; result replaces one input
1: add x to accumulator; all operations modify an “accumulator”
0: replace the two top numbers of the stack by their sum
How many bits should a single address refer to?
- Word addressed, one address for each word; with extra info to refer to specific byte within word
- Byte addressed, one address for each byte; lowest address in the word stands for the word
What is endianness?
When byte addressing is used and a number is stored in 4 bytes, endianness refers to whether the start of the number is stored in the first or last byte
Big-endian = stored left-to-right, as a human would read, DE=0, AD=1, BE=2, EF=3 Little-endian = stored right-to-left, as a computer would read binary, EF=0, BE=1, AD=2, DE=3
What is an addressing mode?
This refers to how an ISA allows instructions to access memory
What is meant by the addressing mode “immediate mode”?
Where a required value is specified in the instruction itself, used for constants (i.e $42)
What is meant by the addressing mode “direct mode”?
Where a required value is at a fixed address specified in the instruction, used for global variables
What is meant by the addressing mode “indirect mode”?
Where a required value is at a fixed address in a register, powerful but can’t perform indexing
What is meant by the addressing mode “index mode”?
Where a required value is at a fixed address plus index obtained from register
What are the advantages and disadvantages of orthogonality?
An advantage is that it simplifies code development, however chips may need to be bigger and more complex