24
Cisc Complex Instruction Set Computing By Christopher Wong

Cisc Complex Instruction Set Computing By Christopher Wong

Embed Size (px)

Citation preview

CiscComplex Instruction Set Computing

By Christopher Wong

What is CISC?CISC stands for Complex Instruction Set

Computing

It is a instruction set.

IE. Fetch input from memory and multiply and storing data into memory.

Instruction set is a set of instructions a programmer can give to a machine to perform operations.

CISC existed close the beginning of general computing.

Before instruction sets, programmers need to program many tedious operations for the computer.

IBM designed an instruction set to allow early programmer to easily program a hundred complex instruction rather than thousands of individual instructions.

History CISC?

Risc vs. CiscCalled “reduced”

because of the reduction of work performed by an instructions.

Main objective is speed.

More software oriented since the compiler deals with translations.

Faster since instructions usually take 1 instruction cycle.

Called “complex” because of the complex work performed per instruction.

Main objective is less code.

More hardware oriented.

Slower since instruction can take more than 1 cycle

What is so complex?

A CISC instruction can be thought to contain many different type of instructions bundled into one simple instruction.

A RISC instruction set, instructions that are used to represent complex instructions.

This does not mean the RISC has less instructions. Some RISC instruction sets have more instructions than CISC machines.

Risc vs. CiscInstruction size is

always a set size.Instruction size is

mostly varied in size.

Instruction SizeOne big difference between RISC and CISC is

their instruction data size.

CISC has a varied length. This is because an CISC instruction can contain more than one operation.

RISC instruction size is always a set length. This allows less time spend to decode the instructions.

PipeliningAnother big difference between CISC and

RISC is RISC's pipelining.

RISC's pipelining is made possible because of the set execution time of the instruction sent to the CPU.

In CISC, since execution times are varied, pipelining is very difficult to implement.

Pipelining is not impossible, look at the x86 instruction set.

Risc vs. CiscInstruction size is

always a set size.

Addressing Modes are simple.

Instruction size is mostly varied in size.

Addressing Modes can be complex

Addressing ModesAddressing modes is how the computer gets

the address of the object that want to retrieve.

CISC allows complex addressing modes.

RISC typically only use simple addressing modes such as offset, or direct.

• Complex addressing modes are found using arithmetic or STORE and LOAD.

Risc vs. CiscInstruction size is

always a set size.

Addressing Modes re simple.

Operations are register to register.

Instruction is mostly varied in size

Addressing Modes are complex.

Operations are register to register, but also memory to register and memory to memory.

OperationsOperations in RISC are always register to

register.

Load and Store are used to retrieve and store registers to memory.

CISC operations contain register to register operations, but also contain memory to memory and register to memory.

CISC approach – If you want to add two number from memory together and store the result in memory.

A <- B + C

Fairly straight forward. This is one of the benefits of using CISC.

Operations - Conti

ADD B C A

RISC approach – If you want to do the same, it’s a bit more complicated, but its still very simple.

A <- B + C

Remember that RISC instructions are smaller than CISC so more complex instructions will benefit from RISC.

Operations - Conti

Load RB B

Load RC C

Add RA RB RC

Store A RA

Example of CiscIntel’s x86 architecture is based on the CISC

methodology though some processors implement a RISC like behavior.

Both microprocessor powerhouses AMD and Intel use x86 for all their processor.

On of the popular Intel processors the Pentium CPU all used CISC instructions set.

Why don’t they abandon CISC?

That’s a not a bad idea.

Except:

Why not abandon CISC?Imagine:

You are developing a low-level software that wants to reach the most users possible. Which architecture would that be? Answer: x86

If Intel decides to switch Instruction Sets, what happens?

Your software is incompatible.

Instead...Instead of force all users and developers to

migrate to a whole new instruction set, you can implement features of RISC into your CISC processor.

Example of this is the x86 architecture.

x86One of the most popular instruction set used

today.

This processor is a good example of how CISC is implemented today.

Introduced in 1978 as the Intel 8086, this processor grew in popularity so much so that it replaced nearly all workstations and RISC based computer.

This architecture is used in processor made by AMD, Intel, VIA and more.

x86 - MicroinstructionsX86 instruction set is consider CISC, but

modern processor are implementing RISC type capabilities.

Though not developed by Intel, one of the key features of modern CISC processors like Intels', is the ability to reduce instructions into microinstructions.

This ability to break complex instructions into Microcode is seen as implementing a RISC style architecture. This also allowed pipelining and superscaler.

Pentium 4 was the first pipelined x86 processor.

Pentium – Sample OperationThe processor fetches instructions from

memory in the order of the static program.

Each instruction is translated into one or more fixed length RISC instructions called mirco-operations.

The processor executes the mirco-operation on a superscalar pipeline organization so that operations can be executed out of order.

The processor commits the data to a register set in the order of the original program flow.

Pentium – ContinuedIn essence, the Pentium 4 CPU was actually a

processor with a CISC outer shell and a RISC inner shell.

The CISC outer shell allows the processor to understand complex instruction, while the RISC inner shell allows pipelining.

This shows the blurring between the two types of instruction sets giving you the best of both types.

CISC TodayThe line between RISC and CISC is becoming

increasingly thin.

Modern x86 CPUs are taking CISC instruction and breaking them down into simpler instruction. Similar to what RISC does. This allows developer to keep developing the same way, but still allow to benefit from RISC techniques.

Intel show no signs of abandoning the x86 instruction set, but rather developing it to function similar to RISC.

http://en.wikipedia.org/wiki/Complex_instruction_set_computing

http://en.wikipedia.org/wiki/History_of_general_purpose_CPUs

http://en.wikipedia.org/wiki/X86

http://en.wikipedia.org/wiki/Reduced_instruction_set_computing

Computer Organization and Architecture, Eighth Edition

References