Processor and Computer Achitecture
Processor and Computer Achitecture
architecture
Learning objectives
• By the end of this chapter you should be able to:
• show understanding of the differences between RISC and CISC
processors
• show understanding of the importance/use of pipelining and
registers in RISC processors
• show understanding of interrupt handling on CISC and RISC
processors
• show awareness of the four basic computer architectures: SISD,
SIMD, MISD, MIMD
• show awareness of the characteristics of massively parallel
computers
The control unit
• The control unit ensure that each machine instruction is handled correctly when a
program is being executed.
• There are two ways that a control unit can be designed to allow it to perform its
function.
Method 1
• One method is for the control unit to be constructed as a logic circuit.
• This is called the hardwired solution .
• The machine-code instructions are handled directly by hardware.
Method 2
• The alternative is for the control unit to use microprogramming.
• In this approach, the control unit contains a ROM component in which is stored the
microinstructions or microcode for microprogramming.
• This is often referred to as firmware.
• The choice of which method is used is largely dependent on the type of processor
CISC
• Complex instruction set computing (CISC ) is a processor design,
where single instructions can execute several low-level operations
(such as a load from memory, an arithmetic operation, and a memory
store) or are capable of multi-step operations or addressing modes
within single instructions
• The design philosophy is to carry out a given task with as few lines of
assembly code as possible.
• Processor hardware must therefore be capable of handling more
complex assembly code instructions.
• CISC architecture is based on single complex instructions which need
to be converted by the processor into a number of sub-instructions to
carry out the required operation
CISC and RISC processors
RISC?
RISC, or Reduced Instruction Set Computer. is a type of microprocessor
architecture that utilizes a small, highly-optimized set of instructions,
rather than a more specialized set of instructions often found in other
types of architectures.
The RISC design philosophy is built on the use of less complex
instructions, which is done by breaking up the assembly
code instructions into a number of simpler single-cycle instructions.
RISC
• The following are characteristic of RISC processors:
• one cycle execution time: RISC processors have a CPI (clock per
instruction) of one cycle. This is due to the optimization of each
instruction on the CPU and a technique called pipelining
• pipelining: a technique that allows for simultaneous execution of
parts, or stages, of instructions to more efficiently process
instructions;
• large number of registers: the RISC design philosophy generally
incorporates a larger number of registers to prevent in large amounts
of interactions with memory
CISC and RISC processors
Multiplying Two Numbers in Memory
• Diagram representing the storage scheme for a generic
computer.
• The main memory is divided into locations numbered from
(row) 1: (column) 1 to (row) 6: (column) 4.
• The execution unit is responsible for carrying out all
computations.
• The execution unit can only operate on data that has been
loaded into one of the six registers (A, B, C, D, E, or F).
• Let's say we want to find the product of two numbers - one
stored in location 2:3 and another stored in location 5:2 - and
then store the product back in the location 2:3.
CISC and RISC processors
The CISC Approach
• The primary goal of CISC architecture is to complete a task in as
few lines of assembly as possible
• This is achieved by building processor hardware that is capable
of understanding and executing a series of operations.
• A CISC processor would come prepared with a specific
instruction (we'll call it "MULT").
• When executed, this instruction loads the two values into
separate registers, multiplies the operands in the execution
unit, and then stores the product in the appropriate register.
• Thus, the entire task of multiplying two numbers can be
completed with one instruction:
MULT 2:3, 5:2
CISC and RISC processors
The CISC Approach
Advantage:-
• Compiler has to do very little work to translate a high-level language
statement into assembly
• Length of the code is relatively short
• Very little RAM is required to store instructions
• The emphasis is put on building complex instructions directly into the
hardware.
The RISC Approach
• RISC processors only use simple instructions that can be
executed within one clock cycle.
• Thus, the "MULT" command described above could be
divided into three separate commands:
1. "LOAD," which moves data from the memory bank to a
register,
2. "PROD," which finds the product of two operands
located within the registers, and
3. "STORE," which moves data from a register to the
memory banks.
• programmer would need to code four lines of assembly:
LOAD A, 2:3
LOAD B, 5:2
PROD A, B
STORE 2:3, A
The RISC Approach
• At first, this may seem like a much less efficient way of completing the
operation.
• Because there are more lines of code, more RAM is needed to store
the assembly level instructions.
• The compiler must also perform more work to convert a high-level
language statement into code of this form.
The RISC Approach
1. Each instruction requires only one clock cycle to execute, the entire
program will execute in approximately the same amount of time as
the multi-cycle “MULT” command.
2. These RISC “reduced instructions” require less transistors of
hardware space than the complex instructions, leaving more room
for general purpose registers. Because all of the instructions
execute in a uniform amount of time (i.e. one clock)
3. Pipelining is possible.
Comparison of RISC with CISC
Pipelining
• The forces for RISC processors was it enable efficient pipelining.
• Pipelining is a form of parallelism applied specifically to instruction execution.
• Pipelining allows several instructions to be processed simultaneously without
having to wait for previous instructions to be completed.
• The underlying principle of pipelining is that the fetch -decode-execute cycle