Computer Architecture Flashcards
What is an instruction set?
The interface between the hardware and the software
List four different types of ISAs
- Accumulator based ISAs
- General purpose register ISAs
- Reduced instruction set computers
- Stack based ISAs
Describe the architecture of a reduced instruction set computer
It has a small number of instructions which all have a common format and all of these instructions apart from LOAD and STORE operate on the registers. LOAD and STORE transfer information to and from memory.
How many clock ticks does an instruction take to execute in a RISC?
Typically 1 clock cycle
WHat is the opposite to a RISC computer?
A Complex Instruction Set Computer
What is the principle behind a stack based ISA?
Instructions are stored in a stack and only the first element in the stack can be manipulated using push or pop
What is MIPS 1 ISA?
An influential instruction set
What are the three categories of instructions in a MIPS 1 ISA?
Arithmetic and logic instructions, data transfer instructions, and control transfer instructions
What type of form is a MIPS 1 ISA?
A RISC form ISA
What does MIPS32 mean?
There are 32 registers each of which has 32 bits
What is 1 downsides to MIPS1 ISA?
There is no floating point capability
How are instructions stored in MIPS1 ISA?
6 bits for the operation class
5 bits for the first source register
5 bits for the second source register
5 bits for the destination register
5 bits for a shift operation
6 bits for the functions in class
What is the default ‘mode’ of the PC?
Sequential execution
Describe the concept behind a multi stage fill adder with ripple carry
We can connect multiple adders together to allow the carry from the original adder to flow to the next one but this is too slow
What is a carry-select adder?
Carry select adders split multi stage ripple carry adders into two so that the addition of lower value and upper value bits are executed simultaneously
What are status flags?
Contained in a flags register
What are status flags for the ALU?
- Zero flag checks whether all of the outputs are 0
- The negative flag checks the value of the MSB to determine if a number if negative
- The overflow flag checks for overflow by using negative flags
What are the two types of volatile memory?
Static and dynamic
Difference cost and efficiency of static and dynamic memory
Dynamic memory is slower and cheaper
Static memory is faster but more expensive
Uses of static memory
Registers and cache, fast but small so not too expensive
What does the address decoder do?
Maps a linear address provided by the processor to a specific location on a specific memory chip
Difference between big endian and little endian
Big endian stores the MSB in the lowest memory address
Little endian stores the MSB in the highest memory address
What type of logic does static memory use as opposed to dynamic
Static memory uses sequential logic where as dynamic memory uses combinatorial logic (Boolean)
What is sequential logic?
The outputs from sequential logic are based on the inputs and outputs meaning that you have a feedback loop
Give an example of sequential logic
Flip-flops
Describe an S-R flip-slop
The flip flop has distinct SET and RESET inputs and consists of several NAND gates. But it is limited to only SET and RESET inputs
What is the master-slave flip-flop?
It consists of two D-type flip-flops the first being the master and the second being the slave. The output of the slave can only be read if the output enable is high which ensures that data is read being it is overwritten
Describe how a master-slave flip-flop works
The master side acts like a latch and pulses high allowing the data signal to be stored in the master side and the slave side is untouched. When the signal returns to low the data in the master flip-flop is transferred to the slave where it is then controlled by the output enable
How can we split data busses up?
Internal and external
What is the correct way to reference the MBR?
MDR - memory data register
What are the two ways of executing the fetch-decode-execute cycle?
Using FSMs or microcode
What does a FSM do?
A FSM consists of hard wired sequential logic which are high performance but expensive and hard to evolve
What is microcode?
A sequence of microinstructions that are contained in micro-memory, it is much more flexible than a FSM as it is not hard-wired but it is slightly lower performance
What is pipelining?
Pipelining is a way to speed up the execution of the fetch-decode-execute cycle by exploiting inherent parallelism and running multiple instructions at the same time as they will not all need to use the same sub-component of the processor at the same time
What are the three types of pipeline hazards?
- Control hazards when a control-transfer instructions changes the flow of execution from being sequential
- Data hazards when instruciton n depends on the result from n-1 so it needs to be executed first
- Structural hazards when two parts of the pipeline needs to use the same hardware
How do we fix a pipeline stall?
When a pipeline hazard occurs the pipeline stalls so we must flush it which costs us a lot of time
What are the two main problems with connecting I/O devices?
- The speed gap challenge where the two processors are running at different orders of magnitude faster or slower
- The diversity challenge because peripheral devices are extermely diverse and they all have different ways of performing different instructions
How do we solve the speed-gap problem?
The device driver acts like a middle man. The device driver is a software plug in
How do we soolve the diversity problem?
Devcie drivers abstract the diversity of the peripherals by grouping devices that are essentially the same
FUnctions of a device driver
Registering the device with the OS and initialising it
Initiating data transfers to and from the device
Monitoring status events from the device
Managing device/suystem shutdown
What is the traditional two fold classification of device type
Character devices which send and receive one byte at a time
Block devices which send and receive multi-byte blocks at a time
How does a hard disk store information?
The information is stored in tracks which are then split into sectors, these sectors are stacked to form cylinders and cylinders are then grouped into heads
What does an isolated I/O do?
Provide physical pins for the connection of the I/O device and dedicated instructions for doing I/O operations, better for simple devices as you can achieve diversity
What does a memory-mapped I/O do?
It has a device that sits within the CPU/s linear memory address space