Computer Architecture Flashcards
(95 cards)
What is a clock?
A clock drives the steps in the processor - everything happens on the clock “edge” as systems are synchronous
What does the Program Counter do?
Contains the address of the instruction to run
Increments after each instruction
What does the Instruction Register do?
Contains the instruction most recently fetched
What does the Memory address register do
Contains the address of a location in memory
What does the Memory buffer register do?
Contains a word of data to be written to memory or the word most recently read
What happens in the fetch part of the fetch-execute cycle?
- PC contains address of next instruction
- Address moved to MAR
- Address placed on address bus
- Control unit request memory read
- Result placed on data bus, copied to MBR, then to IR
- PC incremented by 1
What happens in an indirect fetch cycle?
it fetches the data stored in the memory location, to use the data to fetch/reach the memory location of the data required
Advantages of Von Neumann?
Simple - data and instructions stored in a single memory space
Cost-Effective - Smaller number of components
Disadvantages of Von Neumann
Bottleneck - Shared bus, simultaneous obtaining impossible
Memory Corruption - same memory space, erase
Advantages of Harvard
Faster processing - Two buses
Improved Security - Not stored in same location, no erase
Efficient use of resources
Disadvantages of Harvard
Complexity - intricate design
Higher cost
Less Flexibility
RISC characteristics
- Instructions of fixed length in a single clock cycle
- Pipelines to achieve one-instruction-per-one-clock-cycle
- Simple control logic to increase clock speed
- Operations performed on internal registers (load store instructions access external memory only)
CISC characteristics
- Binary compatibility (old binary code on newer systems)
- Complex control logic
- Use of micro-code
- Variable length instructions to save program memory
- Small internal register sets compared with RISC
- Complex addressing modes, operands can reside in external memory or internal registers
What is pipelining?
Pipelines overlap operations to aim to complete an instruction every clock cycle
What are the different ways of branch prediciton?
- Multiple streams
- Prefetch Branch Target
- Loop buffer
- Branch prediction
- Delayed branching
How does multiple streams work in pipelining?
- Have two pipelines
- Prefetch each branch into a separate, appropriate pipeline
- Waste the branch you didn’t need
Disadvantages of Multiple streams
- Leads to bus & register
- Multiple branches lead to further pipelines being needed
How does Prefetch Branch Target work?
- Target of branch is prefetched in addiction to instructions following branch
- Keep target until branch is executed
How does Loop Buffer work?
- Stores all the instructions of a loop in a buffer in the CPU
- Optimises the process of jumping away from the previous instruction
- Check buffer before fetching from memory
How does Static Branch Prediction work?
- Predicts one side (jump or not jump)
- If no jump, always fetch next instruction
-If jump, fetch target instruction
How would Branch Predicition be improved?
- Predict using the opcode
- Produce Statistics related to the likely hood of jumping
- Can learn
What is a superscalar processor?
A processor that completes more than one instruction per clock cycle
What is In-Order Issue, Completion?
- Issue instructions in the order they occur
- May fetch >1 instruction
Disadvantages of In-order Issue, Completion
- Not very efficient
- Instructions must stall if necessary