RISC vs. CISC Pada amnya, rekabentuk mikro-pemproses menggunakan dua pendekatan iaitu pendekatan RISC dan CISC. RISC Reduced Instruction Set Computer Komputer.

Slides:



Advertisements
Similar presentations
Reduced Instruction Set Computers
Advertisements

CPU Structure and Function
Instruction Set Design
Arsitektur Komputer Pertemuan – 13 Super Scalar
OMSE 510: Computing Foundations 4: The CPU!
Computer Organization and Architecture
RISC Processors – Page 1 of 46CSCI 4717 – Computer Architecture CSCI 4717/5717 Computer Architecture Topic: RISC Processors Reading: Stallings, Chapter.
PART 4: (2/2) Central Processing Unit (CPU) Basics CHAPTER 13: REDUCED INSTRUCTION SET COMPUTERS (RISC) 1.
Computer Organization and Architecture
Computer Organization and Architecture
Isyarat2 Kawalan (Input) Jam (Clock) –Satu arahan-mikro (atau satu set arahan-mikro selari) untuk satu kitaran jam Daftar arahan (Instruction register)
Objektif Kursus °Objektif Kursus : Memberi kefahaman yang jelas kepada pelajar berkenaan senibina dan organisasi sistem komputer moden. Teknologi Bhs.
Chapter 13 Reduced Instruction Set Computers (RISC) CISC – Complex Instruction Set Computer RISC – Reduced Instruction Set Computer HW: 13.6, 13.7 (Due.
Chapter XI Reduced Instruction Set Computing (RISC) CS 147 Li-Chuan Fang.
Struktur CPU CPU mesti: –Mengambil arahan (Fetch instructions) –Mentafsir arahan (Interpret instructions) –Mengambil data (Fetch data) –Memproses data.
Chapter 13 Reduced Instruction Set Computers (RISC)
FSKTM Sistem-Multipemproses Apakah faedah sistem multi-pemproses?....a LAN? Memory Unit CPU 1CPU 2CPU 3IOP 1IOP 2...or a single system with many processors?
FSKTM Kenapa Cache? Penganalisaan bbrp aturcara menunjukkan bahawa memori komputer cenderung merujuk kepada suatu kawasan tertentu. Fenomena ini dinamakan.
Chapter 13 Reduced Instruction Set Computers (RISC) Pipelining.
Major Advances in Computers(1) The family concept —IBM System/ —DEC PDP-8 —Separates architecture from implementation Microporgrammed control unit.
State Machines Timing Computer Bus Computer Performance Instruction Set Architectures RISC / CISC Machines.
RISC. Rational Behind RISC Few of the complex instructions were used –data movement – 45% –ALU ops – 25% –branching – 30% Cheaper memory VLSI technology.
1 Pertemuan 23 Reduced Instruction Set Computer 1 Matakuliah: H0344/Organisasi dan Arsitektur Komputer Tahun: 2005 Versi: 1/1.
Apakah Set Arahan? Koleksi arahan yg lengkap yg difahami oleh CPU Kod Mesin (Machine code) Perduaan (Binary) Selalunya diwakili oleh kod2 penghimpunan.
Talianpaip Talianpaip ialah satu teknik utk meningkatkan prestasi mesin dgn melakukan arahan bertindih utk mengurangkan masa perlaksanaan. Ini merupakan.
Seqeuential Logic State Machines Memory
FSKTM Sistem I/O Control Data-path Memory Processor Input Output Topik Hari ini: I/O Systems Control Data-path Memory Processor Input Output Network.
Chapter 13 Reduced Instruction Set Computers (RISC) CISC – Complex Instruction Set Computer RISC – Reduced Instruction Set Computer.
Reduced Instruction Set Computers (RISC)
Reduced Instruction Set Computers (RISC) Computer Organization and Architecture.
CH12 CPU Structure and Function
Processor Organization and Architecture
Advanced Computer Architectures
Dr Mohamed Menacer College of Computer Science and Engineering Taibah University CE-321: Computer.
RISC Processors – Page 1CSCI 4717 – Computer Architecture CSCI 4717/5717 Computer Architecture Topic: RISC Processors Reading: Stallings, Chapter 13.
COMPUTER ORGANIZATIONS CSNB123 May 2014Systems and Networking1.
RISC and CISC. Dec. 2008/Dec. and RISC versus CISC The world of microprocessors and CPUs can be divided into two parts:
Computer Organization and Architecture Reduced Instruction Set Computers (RISC) Chapter 13.
CH13 Reduced Instruction Set Computers {Make hardware Simpler, but quicker} Key features  Large number of general purpose registers  Use of compiler.
Computers organization & Assembly Language Chapter 0 INTRODUCTION TO COMPUTING Basic Concepts.
Computer architecture Lecture 11: Reduced Instruction Set Computers Piotr Bilski.
RISC Architecture RISC vs CISC Sherwin Chan.
RISC ProcessorsCSCI 4717 – Computer Architecture CSCI 4717/5717 Computer Architecture Topic: RISC Processors Reading: Stallings, Chapter 13.
Chapter 8 CPU and Memory: Design, Implementation, and Enhancement The Architecture of Computer Hardware and Systems Software: An Information Technology.
Ted Pedersen – CS 3011 – Chapter 10 1 A brief history of computer architectures CISC – complex instruction set computing –Intel x86, VAX –Evolved from.
M. Mateen Yaqoob The University of Lahore Spring 2014.
ECEG-3202 Computer Architecture and Organization Chapter 7 Reduced Instruction Set Computers.
Reduced Instruction Set Computers. Major Advances in Computers(1) The family concept —IBM System/ —DEC PDP-8 —Separates architecture from implementation.
COMPUTER ORGANIZATIONS CSNB123 NSMS2013 Ver.1Systems and Networking1.
Topics to be covered Instruction Execution Characteristics
William Stallings Computer Organization and Architecture 8th Edition
Advanced Topic: Alternative Architectures Chapter 9 Objectives
Pernyataan if.. Pernyataan switch..
William Stallings Computer Organization and Architecture 8th Edition
Computer Architecture
Chapter 13 Reduced Instruction Set Computers
Instruction-level Parallelism: Reduced Instruction Set Computers and
Chapter 12 Pipelining and RISC
Lecture 4: Instruction Set Design/Pipelining
Chapter 11 Processor Structure and function
COMPUTER ORGANIZATION AND ARCHITECTURE
Presentation transcript:

RISC vs. CISC Pada amnya, rekabentuk mikro-pemproses menggunakan dua pendekatan iaitu pendekatan RISC dan CISC. RISC Reduced Instruction Set Computer Komputer Set Arahan Terkurang CISC Complex Instruction Set Computer Komputer Set Arahan Kompleks

KemajuanKomputer (1) Konsep famili –IBM System/ –DEC PDP-8 –Separates architecture from implementation Unit kawalan teraturcara-mikro –Ilham drpd Wilkes 1951 –Dihasilkan oleh IBM S/ Memori para (Cache memory) –IBM S/360 model

KemajuanKomputer (2) Solid State RAM Pemproses-mikro –Intel Talianpaip –Memasukkan unsur kesejajaran dalam kitaran ambilan dan perlaksanaan. Pelbagai pemproses

The Next Step - RISC Reduced Instruction Set Computer Ciri-ciri utama –Bil. pendaftar GP yg banyak –atau guna teknologi pengkompilasi untuk mengoptimumkan penggunaan pendaftar –Set arahan yg ringkas/mudah dan terhad. –Menekankan (Tumpuan utama kepada) ciri pengoptimum arahan bertalian-paip

Comparison of processors CISC RISC Superscalar IBM DEC VAX Intel Motorola MIPS IBM Intel 370/168 11/ R4000 RS/ No. of instruction Instruction size (octets) or 8 Addressing modes GP Registers Control memory (k bytes) (microprogramming)

Kenapa ke arah CISC? Kos perisian jauh lbh tinggi drpd kos perkakasan. Peningkatan kekompleksan HLL Jurang Semantik Mendorong kpd: –Set2 arahan yg besar –Lbh mod2 pengalamat –Hardware implementations of HLL statements e.g. CASE (switch) on VAX

Falsafah CISC Kecenderungan utk meringkaskan proses pengkompilsisan (yakni proses pertukaran drpd high level ke low level) dan ini menghslkan peningkatan prestasi komputer keseluruhan.

Tujuan CISC Utk merekabentuk mikro-pemproses yg mana ia boleh melaksanakan penyataan2 yg hempir ke HLL. Utk meminimumkan bil. arahan yg perlu dilakukan utk tugas yg diberi. Bagi membolehkan aturcara2 yg bersaiz kecil dibangunkan.

Hasil drpd rekabentuk CISC Rekabentuk litar menjadi lbh kompleks krn arahan bertambah kompleks. Mesin pengaturcaraan menjadi lbh mudah krn setiap arahan low level blh dilaksanakan dengan HLL yg bersepadanan. (Kebebasan Pengaturcara) Ease compiler writing Meningkat kecekapan perlaksanaan –Complex operations in microcode Support more complex HLLs

Krateria CISC Bil. arahan yg byk (selalunya drpd 100 ke 250 arahan). Terdpt beberapa arahan khas yg kurang kerap digunakan. Berbagai mod2 pengalamat (selalunya drpd 5 ke 20 mod). Berbagai pjg format arahan (memerlukan masa penyahkodan yang berlainan). Pd amnya arahan memanipulasikan operan dlm memori.

Krateria Perlaksanaan. Operasi dilaksanakan Operan digunakan Perlaksanaan berjujukan Penyelidikan telah dijalankan berdasarkan aturcara yang ditulis dalam HLL Dynamic studies are measured during the execution of the program

Operasi Umpukkan (Assignments) –Movement of data Penyataan bersyarat (IF, LOOP) –Sequence control Procedure call-return is very time consuming Sesetengah arahan HLL mengetuai kebanyakan kod2 operasi mesin

Operan Mengutamakan local scalar variables Pengoptimuman sepatutnya tertumpu kpd pencapaian local variables Pascal CPurata Integer constant Scalar variable Array/structure

Procedure Calls Penggunaan masa yg lbh B’gtg kpd bil. parameter dipasskan B’gtg kpd ‘level of nesting’ Most programs do not do a lot of calls followed by lots of returns Most variables are local (c.f. locality of reference)

Implikasi Best support is given by optimising most used and most time consuming features Bil. daftar yg besar –Operand referencing Careful design of pipelines –Branch prediction etc. Mempermudahkan (reduced) set arahan

Large Register File Software solution –Memerlukan compiler utk memperuntuk daftar –Peruntukkan berdasarkan pembolehubah yg kerap diguna dalam suatu julat masa –Memerlukan penganalisa aturcara yg sofisikated Hardware solution –Lbh daftar –Lbh pembolehubah dlm satu daftar

Pendaftar utk pembolehubah lokal Menyimpan pembolehubah skalar lokal dlm pendaftar. Mengurangkan capaian memori Every procedure (function) call changes locality Parameters must be passed Results must be returned Variables from calling programs must be restored

Register Windows Hy bbrp parameters Julat terhad bg call Guna pelbagai sets of registers yg kecil Panggil switch ke set of registers yg berlainan Kembalikan switch ke set of registers yg digunakan sblmnya.

Register Windows cont. Three areas within a register set –Parameter registers –Local registers –Temporary registers –Temporary registers from one set overlap parameter registers from the next –This allows parameter passing without moving data

Overlapping Register Windows

Circular Buffer diagram

Operation of Circular Buffer Apabila call dibuat, penunding window semasa akan bergerak memperlihatkan window register semasa yg aktif. Jk semua window digunakan, sampukan dijanakan dan oldest window (the one furthest back in the call nesting) disimpan dlm memori A saved window pointer indicates where the next saved windows should restore to

Global Variables Diperuntukkna oleh compiler ke memory –Inefficient for frequently accessed variables Ada bbrp set of registers utk global variables

Registers v Cache Large Register FileCache All local scalarsRecently used local scalars Individual variablesBlocks of memory Compiler assigned global variablesRecently used global variables Save/restore based on procedure Save/restore based on nesting caching algorithm Register addressingMemory addressing

Referencing a Scalar - Window Based Register File

Referencing a Scalar - Cache

Compiler Based Register Optimization Assume small number of registers (16-32) Optimizing use is up to compiler HLL programs have no explicit references to registers –usually - think about C - register int Assign symbolic or virtual register to each candidate variable Map (unlimited) symbolic registers to real registers Symbolic registers that do not overlap can share real registers If you run out of real registers some variables use memory

Graph Coloring Given a graph of nodes and edges Assign a color to each node Adjacent nodes have different colors Use minimum number of colors Nodes are symbolic registers Two registers that are live in the same program fragment are joined by an edge Try to color the graph with n colors, where n is the number of real registers Nodes that can not be colored are placed in memory

Graph Coloring Approach

Kenapa CISC (1)? Compiler simplification? –Dipertikaikan –Complex machine instructions harder to exploit –Optimization more difficult Smaller programs? –Program ambil sedikit ruang memori ttp… –Memori murah –May not occupy less bits, just look shorter in symbolic form More instructions require longer op-codes Register references require fewer bits

Why CISC (2)? Faster programs? –Bias towards use of simpler instructions –More complex control unit –Microprogram control store larger –thus simple instructions take longer to execute It is far from clear that CISC is the appropriate solution

Falsafah RISC Ia membabitkan kecenderungan utk mengurangkan masa perlaksanaan dgn m’p’mudah’n ISA komputer.

Matlamat RISC Mengurangkan kekompleksan litar decoding dan controlling supaya arahan blh dilaksanakan dgn cepat/pantas (very basic instructions). Lbh memfokuskan kpd peralihan data antara register ke register, drpd register ke memory, krn ia sungguh perlahan).

Hasil drpd RISC R/btk litar menjadi very simple kerana arahan2nya very simple. Capaian ke memoriy adlh minimum krn r/btk difokuskan kpd peralihan data ant register ke register. Ini meningkatkan prestasi. Stp arahan secara puratanya beroperasi dlm single clock cycle. Mesin pengaturcaraan bg r/btk ini menjadi susah krn programmers perlu mengumpul bersama arahan2 kecil yg byk utk menyelesaikan satu tugas. (Programmer's nightmare)

Krateristik RISC Bilangan arahan terhad. Satu arahan per satu kitaran clock. Mod pengalamat yg ringkas (mainly register to register data transfer). Format arahan yg ringkas (helps eases decoding). Penggunaan pipelining utk meningkatkan prestasi.

Kontroversi ant. RISC dan CISC Apakah yang membezakan RISC drpd CISC? Bgmn prestasi diukur? (MIPS or transactions per second?) CISC approach was targeted for broad range of applications. RISC was rather focused. Can RISC be considered better? RISC programs are 10% to 20% larger than their CISC counterparts. Would they run slower?

RISC v CISC Not clear cut Many designs borrow from both philosophies e.g. PowerPC and Pentium II

RISC Pipelining Most instructions are register to register Two phases of execution –I: Instruction fetch –E: Execute ALU operation with register input and output For load and store –I: Instruction fetch –E: Execute Calculate memory address –D: Memory Register to memory or memory to register operation