RISC Flashcards
What are the three key elements to be aware of in RISC machines.
- A limited and simple instruction set.
- A large number of general-purpose registers.
- An emphasis on optimising the instruction pipeline
What effect did High Level Languages have on processing?
They created a semantic gap.
Define semantic gap in terms of computer architecture.
The difference beteween the operations provided in high level langagues and those provided in computer architecture.
What issues arise from a semantic gap?
Excecution fuck ups
excessive program size
compiler complexity
What was the driving force for CISC machines?
Close the semantic gap.
What sort of features did CISC machines have in an attempt to close the semantic gap between high level langauges and the CPU architecture that would have to deal with them?
Large number of instructions
Dozens of addressing modes
High level language statements implemented in hardware
Define operations performed in relation to RISC/CISC development.
The functions to be performed by the CPU and its interaction with memory
Define operands used in relation to RISC/CISC
The types of operands use and their memory organisation for storing them and addressing modes for accessing them.
Define execution sequencing in relation to RISC/CISC
The control and pipeline organisation
What are the key things of note from studies of HLL programs?
Assignment statements predominate.
Conditional statements are frequent.
If assignment statements are high in HLL, what does this suggest?
Data movement is very important
What does a large quantity of conditional statements help to understand?
That sequence control of the instruction set is important
What do we understand about variables from Patterson study?
Variables are often local and scalar and optimisation on storing and accessing variables is compelling.
What three things did the Patterson study reveal about procedure calls?
That they are very time consuming.
The number of parameters and variables a procedure deals affects speed.
Depth of nesting also affects speed.
What is a large number of registers in RISC supposed to support?
operand referencing
What is the point of careful attention to design of instruction pipelines?
Given the high number of conditional branch calls, a straightforward pipeline will often have a lot of prefetched and then cleared instructions. Things could be better.
What two ways could you attempt to optimise the use of registers?
Hardware and software
How could software improve register use?
Sophisticated analysis of which variables are going to be used most and so keep stuff there.
How could hardware be used to improve register use?
Simple: profundity of registers = more operands in main memory
What happens every time a programe makes a call?
Local variables must be moved from registers to main memory
Registers can be reused
Parameters need to be passed
Register windows do what?
Create register ‘banks’ assigned to different procedure.
Temporary registers overlap to allow for parameter passing.
What do register windows not address?
The need to store global variables.
How are global registers often stored and what ways have been suggested to improve efficency.
Allocated by the compiler from main memory to a register.
This is inefficent. Instead, consider set of registers that are ‘global’ and available to all procedures.
A program written in a high-level langauge has [x x] references to [x]
explicit references
register
The object of the compiler is to keep the [x] for as many computations as possible in [y] rather than [z], and to [c] [d] operations
operands register main memory minimise load and store
A compiler assigned a [x] register
symbolic
If a [c] register does not [y], a [x] register can share the same register
symbolic
overlap
procedure
Given a graph of nodes and edges, assign colours to nodes such that [c] nodes have different [y]. The [x] of the graph are [c] registers. If two [v] registers are [i] during a problem, an [b] connects them to depict [o].
adjacent colours nodes symbolic symbolic live edge interference
What are the common associations with CISC?
That programs are small and that they are fast
Why are small programs good?
Program takes up less memory. But memory is cheap now. Memory should improve amount of instructions needed but this isn’t likely with CISC with high level of instructions.
What about CISC and they greater level of instructions was deemed good for HLL?
Motivation is complex HLL operation == quick execution.
But primitive instructions appear to help.
What about CISC and they greater level of instructions was deemed good for HLL?
Motivation is complex HLL operation == quick execution.
But primitive instructions appear to help.
List the characteristics of the RISC architecture.
- One machine instruction per cycle.
- most operations should be register-to-register.
- only load and store should access memory
- simple addressing modes
- simple instruction formats
define machine cycle:
the time it takes to fetch operations, perform an ALU, store the result.
how are most registers addressed in RISC?
simple addressing.
what are the key characteristics of simple instruction format?
Instruction length is fixed
Field locations, especially opcode, are fixed.
What are the benefits of the simple instruction format?
- opcode decoding and register operand accessing can occur at the same time.
- Control unit is simpler
- Instruction fetching is optimised
- Single instruction will not cross page boundaries
What are the two phases of the instruction cycle?
I: Instruction Fetch
E: Execute. ALU operation (register input and output)
What are the three phases for load and storing?
I: Instruction Fetch.
E. Execute (calculate memory address)
D: Memory (register to register / memory to register)
How does one optimise the pipeline?
Code reorgansation.
A delayed branch makes use use of a branch that [p x] take effect until [v] the following [i]
does not
after
instruction
A delayed branch is good for [c]
unconditional branch instructions