DOC PREVIEW
SJSU CS 147 - Alternative Architectures

This preview shows page 1-2-3-4-5-6 out of 18 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 18 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 18 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 18 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 18 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 18 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 18 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 18 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Alternative Architectures (Chapter 9)TopicsSome History About RISCReduced Instruction Set Computer (RISC)Some Typical Characteristics of RISCWhat about CISC?Some Typical Characteristics of CISCHow to quantify the differences between RISC and CISC?RISC vs. CISC (page468 table 9.1)A Simple ExampleTotal Clock Cycle for the ExampleAnother ExampleSlide 13RISC vs. CISCRegister Windows SetsAn ExampleDiagram (page 467 figure 9.1)ReferencesAlternative Architectures(Chapter 9)CS147 section 03Ke-Huan ChouTopics•RISC machines•CISC machines•RISC vs. CISC•Register Windows SetsSome History About RISC•The earliest attempt to make a chip-based RISC CPU was by IBM in 1975: IBM 801•Then UC Berkerley started their RISC project in 1980 : RISC-I•Stanford also had their RISC project started in 1981 : MIPSReduced Instruction Set Computer (RISC)•The original idea for RISC machine is to provide a set of minimal instructions that could do all the essential operations (move data, arithmetic logic unit operations, branching)•Only “load” and “store” instructions are permitted access to external memory, all other instructions are limited to internal registers. •The goal for RISC machine is to make the instructions so simple that they could easily be pipelined.Some Typical Characteristics of RISC•Emphasis on software•It has small instruction set•It uses more instructions in programs•The instructions take less time to decode•It has simple addressing modes•It spends more transistors on memory registers •It has few data types in hardwareWhat about CISC?•Complex Instruction Set Computer, or CISC for short•CISC were motivated by the high cost of memory because it was designed to use less memory and disc storage in each program•Each instruction should to do as much work as possible, which also means that it is designed to minimize the number instructions in each programSome Typical Characteristics of CISC•Emphasis on hardware; •It has large instruction set•It has less instruction in a program•The instructions are more complex•It takes longer to decode the instructions•It has complex data types in hardwareHow to quantify the differences between RISC and CISC?• We can use the following equation to calculate the computer performance and compare the results between RISC and CISCProgram execution time is directly proportional to clock cycle time, number of cycles for each instruction, and the number of instructions in the programRISC vs. CISC (page468 table 9.1)- Single register set, typically 6 to 16 registers total- One or two register operands allowed per instruction (add R1, R2)- Parameter passing through inefficient off-chip memory- has Multiple-cycle instructions- Microprogrammed control- Less pipelined- Many complex instructions- Variable length instructions- Complexity in microcode- Many instructions can access memory- Many addressing modes- Multiple register sets, often consisting of more than 256 registers- Three register operands allowed per instruction (add R1, R2, R3)- Parameter passing through efficient on-chip register windows- has Single-cycle instructions (except for load and store)- Hardwired control- Highly pipelined- Simple instructions that are few in number- Fixed length instructions- Complexity in compiler- Only load and store instructions can access memory- Few addressing modesA Simple Example5 X 10 = ?RISC wayCISC waymov ax, 0mov bx, 10mov cx, 5Begin: add ax, bxloop Beginmov ax, 10mov bx, 5mul bx, ax10+10+10+10+10 = 50 10 X 5 = 50Total Clock Cycle for the ExampleRISC:Total clock cycles = (3 mov X 1 clock cycle) + (5 add X 1 clock cycle) + (5 loop X 1 clock cycle) = 13 clock cyclesCISC:Total clock cycles = (2 mov X 1 clock cycle) + (1 mul X 30 clock cycle) = 32 clock cyclesAnother ExampleSuppose we want to multiply 2 numbers that stored in the main memory: 2 : 4 and 4 : 3(Row) : (Column) Main MemoryRegistersExecution unitRISC way CISC wayMUL 2:4, 4:3That’s it. The instruction will load the two numbers in those two areas in main memory and put them in separate registers, and it will do multiplication of those two numbers and store the result in the registerLOAD A, 2:4LOAD B, 4:3PROD A, BSTORE 2:4, A First, Load the number stored in 2:4 put it in register A. Then load the number stored in 4:3 and put it in register B. Get the product of A and B. Store the result back to 2:4The Instructions Might Look Like This:RISC vs. CISC•From the first example, we can see that in RISC machine, the total clock cycle is shorter than the total clock cycle in CISC machine•Even though there are more instructions in RISC than in CISC, each RISC instructions only requires one clock cycle to execute, and CISC instructions require more clock cycles because they are more complex.•From the second example, we can see that in RISC machine, only Load and Store instructions can access to the main memory.•Because the instruction in CISC is really short, it only need a little bit of RAM to store the instructionsRegister Windows Sets•A way to use the registers efficiently•A typical RISC architectures has 16 register sets (or windows), and there are 32 registers in each set•The CPU is restricted to operate only one window at any time, which means that there are only 32 registers available •The registers set can be divided into:- Global registers: common to all windows.- Local registers: local to the current window- Input registers: overlaps with the preceding window’s output registers- Output registers: overlaps with the next window’s input registers.- Current window pointer (CWP): points to the register window set to be used at any given timeAn Example•When Procedure One calls Procedure Two, any parameters that need to be passes are put into the output register in Procedure One•When Procedure Two starts executing, the output register in Procedure One becomes the input register in Procedure TwoProcedure One is calling Procedure TwoDiagram (page 467 figure 9.1)overlapProcedure OneProcedure TwoCWP = 8CWP = 24References•http://en.wikipedia.org/wiki/CDC_6600, Wikipedia 10/19/09•http://en.wikipedia.org/wiki/Reduced_instruction_set_computer, Wikipedia 10/19/09•http://en.wikipedia.org/wiki/Complex_instruction_set_computer, Wikipedia 10/19/09•http://www.museumwaalsdorp.nl/computer/en/comp781bE.html, museumwaalsdorp•http://cse.stanford.edu/class/sophomore-college/projects-00/risc/risccisc/index.html, by Crystal


View Full Document

SJSU CS 147 - Alternative Architectures

Documents in this Course
Cache

Cache

24 pages

Memory

Memory

54 pages

Memory

Memory

70 pages

Lecture 1

Lecture 1

53 pages

Cisc

Cisc

18 pages

Quiz 1

Quiz 1

4 pages

LECTURE 2

LECTURE 2

66 pages

RISC

RISC

40 pages

LECTURE 2

LECTURE 2

66 pages

Lecture 2

Lecture 2

67 pages

Lecture1

Lecture1

53 pages

Chapter 5

Chapter 5

14 pages

Memory

Memory

27 pages

Counters

Counters

62 pages

Load more
Download Alternative Architectures
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Alternative Architectures and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Alternative Architectures 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?