Week 5 - Processors Flashcards
Identify and briefly explain the buses used to transfer information.
1) Address Bus: Provide memory address to memory.
2) Data Bus: For passage of information and instructions.
3) Control Bus: Pass control signals to decide whether to read/write
Name the seven registers within the processor.
- PC - Program Counter
- MAR - Memory Address Register
- MBR - Memory Buffer Register
- ACC - Accumulator
- IR - Instruction Register
- SP - Stack Pointer
- CCR - Condition Code Register
Describe what the ALU does.
The ALU is responsible for arithmetic (add/subtract), logic (AND, XOR, OR, etc) and compound operations (multiply/divide/shifting)
What is the purpose of the Control Unit?
The control unit coordinates the operation of the processor via control signals and keeps track of the sequence of steps to accomplish a processing operation.
What are opcodes and operands and how are they related?
An opcode is a machine code instruction.
The operand is any data employed by the opcode.
Opcodes and operands go hand-in-hand; However, some opcodes are self-contained and do not need additional data.
Describe what an instruction set is.
An instruction set is a set of opcodes (instruction codes) used to control a processor. Instruction sets vary and are tied to specific processors.
What are the three types of addressing modes used to interpret operands?
1) Immediate: The operand is the data.
2) Direct: The operand is a memory address pointing to the data.
3) Indirect: The operand is a memory address pointing to a memory address which is pointing to the data.
Explain the Stored Program Model (Von Neumann Execution Model)
The Stored Program Model is where instructions are fetched from the memory location addressed by the program counter.
What is a micro-program?
A micro-program is a sequence of small steps to execute an instruction
What is the fetch-execute-cycle and its steps?
The fetch-execute-cycle is a series of steps used to fetch instructions and data to be executed and then repeat.
The steps are:
1) MAR < PC - Setup
2) MBR < M[MAR] - get instruction
3) IR < MBR.opcode
4) MAR < MBR.operand
5) MBR < M[MAR] - get data
6) PC < PC + 1
7) Execute instruction
8 Repeat
What is a general-purpose register and their improvements over an accumulator?
GPR architecture is where the accumulator is replaced with a bank of registers.
This results in:
1) longer instructions
2) Being faster
3) Efficient for compilers
Each register acts as a separate accumulator.
What is a stack-based processor and the stack pointer (SP)?
A stack-based processor is where the memory structure is a stack instead of a register architecture.
To push is to store data and to pop is to retrieve data.
The stack pointer maintains the memory address where data will be accessed.
Give a brief explanation of what a pipelined processor is
A pipelined processor is a processor that supports execution in parallel to increase throughput. Called instruction-level pipelining.
Explain the difference between instruction based I/O and memory mapped I/O
- Instruction Based: Special instructions (IN/OUT) are used to transfer data between I/O devices.
- Memory Mapped: This is a matter of reading/writing data to/from memory reserved for I/O devices.
Briefly describe three ways I/O can be controlled
1) Programmed I/O: Reserves a register for I/O device. CPU continually polls I/O registers.
2) Interrupt-Driven I/O: Special chip (interrupt controller) monitors I/O and interrupts CPU when a device has input data.
3) Direct Memory Access: Offload I/O processing to the co-processor to take care of moving data from I/O to main memory.