Beruflich Dokumente
Kultur Dokumente
CMP 444
Copmuter Interfacing
Spring 2004
Presented to:
Dr. Ahmed Darwish
Prepared by:
Amr M. Medhat Mostafa Fathy Sameh M. Serag For Contact: SpeechLab@YahooGroups.com
CMP 444
Spring 2004
TABLE OF CONTENTS
1. INTRODUCTION....................................................................................................3 1.1. Brief history of the CPU ...................................................................................3 1.2. CISC ...................................................................................................................3 1.3. RISC ...................................................................................................................3 2. RISC FEATURES....................................................................................................4 2.1. Small Instruction Set ........................................................................................4 2.2. Register-to-Register Operations (Load/Store Architecture) ........................4 2.3 Single Instruction per Cycle..............................................................................4 2.4. Large Number of Registers:.............................................................................4 2.5. Hardwired Design (No Microcode) .................................................................4 2.6. Fixed instruction format (size).........................................................................4 2.7. Harvard Architecture (Code and Data Buses)...............................................4 3. OVERLAPPED REGISTER WINDOWS.............................................................5 4. RISC AND THE MARKET....................................................................................6 5. RISC VS. CISC AND THE FUTURE....................................................................7 5.1. Post-RISC Architecture....................................................................................8 5.2. EPIC ...................................................................................................................8 6. REVIEW QUESTIONS...........................................................................................9 7. REFERENCES.......................................................................................................10
CMP 444
Spring 2004
1.2. CISC
Before the emergence of the first microprocessor till the early 80s, the design of all the CPUs was following one Philosophy. This philosophy was to put as many instructions as possible to the instruction set of the microprocessors to cover every possible situation in which a programmer might need some instruction. This was specifically since the IBM 360 system, created in 1964, which was probably the first modern processor system that initiated the idea of computer architecture in computer science and adopted micro-coded control. Micro-coded control facilitated the use of complex instruction sets and provided flexibility, thus appeared so-called Complex Instruction Set Computer (CISC) [2]. The idea behind this philosophy is to minimize the number of instructions needed to perform a given task, thus, reduce the "semantic gap" between the machine language of the processor and the high-level languages in which people were programming. Having a single instruction that could describe quite a complex sequence of operations was reasonable for some reasons [2]: the compiler technology at that time was in its infancy, same as advanced programming language, people always used assembly language at that time at that era, hardware was extremely expensive, thus fewer memory occupy was strongly preferred
However, with more and more complex instructions sets, decoding and execution of such instructions were complicated and time-consuming; also, the expensive overhead brought by them slowed down the execution of those more frequently used simple instructions [2].
1.3. RISC
The question that rose up and was the scope of studies of many researches was "Do we need such a huge instruction set?" The answer is that most of these instructions were neither used by the assembly programmers or by high-level language compilers [1]. Studies showed that only 20% of a computer's instructions do 80% of the work [2]. This answer led to another philosophy of designing CPUs; this philosophy tends to reduce the number of instructions of the machine's instruction set to only the basic
CMP 444
Spring 2004
common used instructions. Thus these CPUs were called RISC (reduced instruction set computer) [1]. By the time, the declining cost of memory devices and improved compiler technology, were the most important factors that have transformed RISC into a success in the marketplace in addition to its design simplicity of course [2]. So what are the gains? RISC achieved a lot of gains as reducing the instruction set didn't only simplify the design and reduce the cost but also made more transistors available to enhance the power of the CPU. It also made hardwired control possible instead of micro-coded control used in CISC. Let us discuss all of these and more other RISC features in some detail.
CMP 444
Spring 2004
buses:1- a set of data buses for carrying data(operands) in and out of the CPU, 2- a set of address buses for accessing data operands, 3- a set of buses to carry the opcodes, and 4- a set of address buses to access the opcodes [3].
Figure [1]
CMP 444
Spring 2004
But although a significant number of microprocessors are based on RISC technology today, RISC never achieved the market penetration that its early proponents hoped for. In part, this limited acceptance was because the performance improvement offered by RISC was offsetted by a very large installed base of x86-compatible CISC
CMP 444
Spring 2004
computers. With large investments in software for CISC computers, corporation decision-makers could not justify switching to RISC in many cases. Nevertheless, RISC takes lead in academic community, research funding and publications.
Registers
Addressing modes
Many No. of addressing modes (Complex) Memory-tomemory access (most of the instructions can operate directly on operands from memory)
Control Unit
Hardwired
Price Popularity
CMP 444
Spring 2004
Now, the usual question to be introduced is which one is better?? Well, the usual answer is none of them. There is no absolute better or absolute worse, as there are lots of benchmarks for performance evaluation and comparison. We only present here a simple performance equation for the execution time of a program depending on the processor executing it [6]: time/program = [ (instructions/program) x (steps/instruction) x (time/step) ] A program on a RISC processor will have much more instructions than a program doing the same task on a CISC processor. But a RISC instruction takes much less time in execution than a CISC instruction. So there is a tradeoff.
5.2. EPIC
The biggest threat for CISC and RISC might not be each other, but a new technology called EPIC. EPIC stands for Explicitly Parallel Instruction Computing. Like the word parallel already says EPIC can do many instruction executions in parallel to one another. EPIC is a created by Intel and is in a way a combination of both CISC and RISC. This will in theory allow the processing of Windows-based as well as UNIX-based applications by the same CPU [2, 7]. So, will the future be for EPIC? Really it's a hard question to answer as RISC didn't meet the expectations and it couldn't kick CISC out of the market. We only say God knows best! Let the days tell us the answer. Now, we cannot say that's all, but we must end our discussion as we cannot keep pace with the evolving technologies we hear and talk about, we can just say that in technology world no one holds the crown forever. Reduced Instruction Set Computer 8
CMP 444
Spring 2004
Complete:
1. RISC processors used Harvard Architecture; this means that there are separate buses for ______ and ______. 2. There were four busses in RISC, two busses carried the _____ of the operands and the opcode, and the other two carried the ____ of the operands and the opcode. 3. The instruction decoding process was easier in RISC because all instructions ______. 4. Due to the small number of instructions in RISC, they are all implemented _____, unlike CISC which used ______. 5. The large number of registers in RISC eliminated the need for _____. 6. RISC instructions are all simple instructions execute in _____ which makes pipelining feasible. 7. All instructions in RISC were executed in one clock cycle, this made _____ feasible. 8. RISC dominated the market of ____ and ____ as its design offers low power consumption. 9. The new architecture that resulted in after migrating RISC and CISC architectures is called ____ 10. The gains achieved after reducing the instruction set are ____, ____ and ____ 11. According to the performance equation given by: time/program = [(instructions/program) x (steps/instruction) x (time/step)] RISC tries to improve its performance by decreasing ____ and____ but the cost is ____, while CISC tries to improve the performance by decreasing ____ but the cost is ____ and ____
CMP 444
Spring 2004
Essay Questions:
1. Explain the Load/Store Architecture. 2. Explain by an example how the Overlapped Register Windows characteristic enabled parameter passing between procedures in RISC. 3. No one can tell which is better CISC or RISC, give a simple performance equation for the execution time of a program depending on the processor executing it. Show how CISC and RISC improve their performance according to this equation. 4. "RISC is just a philosophy not a standard", discuss. 5. Compare between CISC and RISC with respect to: number of instructions, control unit, registers, and addressing modes. 6. Knowing CISC is more popular than RISC; can we say that CISC is better than RISC? If yes, give more evidences, if no, why?
7. REFERENCES
[1] Ahmed Hamdy, Ashraf Abdel Raouf and Yousif Kamal "RISC", A CMP302 lecture handout, spring 2002 [2] Gao Y., Tang S., Ding Z. "Comparison between CISC and RISC" http://userpages.umbc.edu/~zding1/cmsc611/report.doc [3] Mazidi M. and J., " The 80X86 IBM PC and Compatible Computers" Volume II, Second Edition, Prentice Hall. [4] Wikipedia, The free Encyclopedia http://en.wikipedia.org/wiki/Reduced_Instruction_Set_Computer
10
CMP 444
Spring 2004
[5] Chen C., Novick G. and Shimano K. "RISC Architecture" http://cse.stanford.edu/class/sophomore-college/projects- 0/risc/about/index.html [6] Hannibal, " RISC vs. CISC: the Post-RISC Era, a historical approach to the debate" http://www.arstechnica.com/cpu/4q99/risc-cisc/rvc-1.html [7] Gerritsen, A., "CISC vs. RISC" http://www.tomax7.com/aplus/cisc_vs_risc.htm [8] Mano M. and Kime C., "Logic And Computer Design Fundamentals"
11