Keluarga Infokom

Keluarga Infokom

CISC vs RISC

CISC vs RISC
By Armin Gerritsen
- Which one is better? -
RISC vs CISC is a topic quite popular on the Net. Everytime Intel (CISC) or Apple (RISC) introduces a new CPU, the topic pops up again. But what are CISC and RISC exactly, and is one of them really better?
This article tries to explain in simple terms what RISC and CISC are and what the future might bring for the both of them. This article is by no means intended as an article pro-RISC or pro-CISC. You draw your own conclusions …
CISC
Pronounced sisk, and stands for Complex Instruction Set Computer. Most PC's use CPU based on this architecture. For instance Intel and AMD CPU's are based on CISC architectures.
Typically CISC chips have a large amount of different and complex instructions. The philosophy behind it is that hardware is always faster than software, therefore one should make a powerful instructionset, which provides programmers with assembly instructions to do a lot with short programs.
In common CISC chips are relatively slow (compared to RISC chips) per instruction, but use little (less than RISC) instructions.
RISC
Pronounced risk, and stands for Reduced Instruction Set Computer. RISC chips evolved around the mid-1980 as a reaction at CISC chips. The philosophy behind it is that almost no one uses complex assembly language instructions as used by CISC, and people mostly use compilers which never use complex instructions. Apple for instance uses RISC chips.
Therefore fewer, simpler and faster instructions would be better, than the large, complex and slower CISC instructions. However, more instructions are needed to accomplish a task.
An other advantage of RISC is that - in theory - because of the more simple instructions, RISC chips require fewer transistors, which makes them easier to design and cheaper to produce.
Finally, it's easier to write powerful optimised compilers, since fewer instructions exist.

RISC vs CISC
There is still considerable controversy among experts about which architecture is better. Some say that RISC is cheaper and faster and therefor the architecture of the future.
Others note that by making the hardware simpler, RISC puts a greater burden on the software. Software needs to become more complex. Software developers need to write more lines for the same tasks.
Therefore they argue that RISC is not the architecture of the future, since conventional CISC chips are becoming faster and cheaper anyway.
RISC has now existed more than 10 years and hasn't been able to kick CISC out of the market. If we forget about the embedded market and mainly look at the market for PC's, workstations and servers I guess a least 75% of the processors are based on the CISC architecture. Most of them the x86 standard (Intel, AMD, etc.), but even in the mainframe territory CISC is dominant via the IBM/390 chip. Looks like CISC is here to stay …
Is RISC than really not better? The answer isn't quite that simple. RISC and CISC architectures are becoming more and more alike. Many of today's RISC chips support just as many instructions as yesterday's CISC chips. The PowerPC 601, for example, supports more instructions than the Pentium. Yet the 601 is considered a RISC chip, while the Pentium is definitely CISC. Further more today's CISC chips use many techniques formerly associated with RISC chips.
So simply said: RISC and CISC are growing to each other.
x86
An important factor is also that the x86 standard, as used by for instance Intel and AMD, is based on CISC architecture. X86 is thé standard for home based PC's. Windows 95 and 98 won't run at any other platform. Therefore companies like AMD an Intel will not abandoning the x86 market just overnight even if RISC was more powerful.
Changing their chips in such a way that on the outside they stay compatible with the CISC x86 standard, but use a RISC architecture inside is difficult and gives all kinds of overhead which could undo all the possible gains. Nevertheless Intel and AMD are doing this more or less with their current CPU's. Most acceleration mechanisms available to RISC CPUs are now available to the x86 CPU's as well.
Since in the x86 the competition is killing, prices are low, even lower than for most RISC CPU's. Although RISC prices are dropping also a, for instance, SUN UltraSPARC is still more expensive than an equal performing PII workstation is.
Equal that is in terms of integer performance. In the floating point-area RISC still holds the crown. However CISC's 7th generation x86 chips like the K7 will catch up with that.
The one exception to this might be the Alpha EV-6. Those machines are overall about twice as fast as the fastest x86 CPU available. However this Alpha chip costs about €20000, not something you're willing to pay for a home PC.
Maybe interesting to mention is that it's no coincidence that AMD's K7 is developed in co-operation with Alpha and is for al large part based on the same Alpha EV-6 technology.
EPIC
The biggest threat for CISC and RISC might not be eachother, 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.
It will not be until 2000 before we can see an EPIC chip. Intel is working on it under code-name Merced. Microsoft is already developing their Win64 standard for it. Like the name says, Merced will be a 64-bit chip.
If Intel's EPIC architecture is successful, it might be the biggest thread for RISC. All of the big CPU manufactures but Sun and Motorola are now selling x86-based products, and some are just waiting for Merced to come out (HP, SGI). Because of the x86 market it is not likely that CISC will die soon, but RISC may.
So the future might bring EPIC processors and more CISC processors, while the RISC processors are becoming extinct.
Conclusion
The difference between RISC and CISC chips is getting smaller and smaller. What counts is how fast a chip can execute the instructions it is given and how well it runs existing software. Today, both RISC and CISC manufacturers are doing everything to get an edge on the competition.
The future might not bring victory to one of them, but makes both extinct. EPIC might make first RISC obsolete and later CISC too.
Written by A.A.Gerritsen
for the CPU Site
March '99

Cara sederhana untuk melihat kelebihan dan kelemahan dari arsitektur RISC (Reduced Instruction Set Computers) adalah dengan langsung membandingkannya dengan arsitektur pendahulunya yaitu CISC (Complex Instruction Set Computers).
Perkalian Dua Bilangan dalam Memori
Pada bagian kiri terlihat sebuah struktur memori (yang disederhanakan) suatu komputer secara umum. Memori tersebut terbagi menjadi beberapa lokasi yang diberi nomor 1 (baris): 1 (kolom) hingga 6:4. Unit eksekusi bertanggung-jawab untuk semua operasi komputasi. Namun, unit eksekusi hanya beroperasi untuk data-data yang sudah disimpan ke dalam salah satu dari 6 register (A, B, C, D, E atau F). Misalnya, kita akan melakukan perkalian (product) dua angka, satu disimpan di lokasi 2:3 sedangkan lainnya di lokasi 5:2, kemudian hasil perkalian tersebut dikembalikan lagi ke lokasi 2:3.
Pendekatan CISC
Tujuan utama dari arsitektur CISC adalah melaksanakan suatu perintah cukup dengan beberapa baris bahasa mesin sedikit mungkin. Hal ini bisa tercapai dengan cara membuat perangkat keras prosesor mampu memahami dan menjalankan beberapa rangkaian operasi. Untuk tujuan contoh kita kali ini, sebuah prosesor CISC sudah dilengkapi dengan sebuah instruksi khusus, yang kita beri nama MULT. Saat dijalankan, instruksi akan membaca dua nilai dan menyimpannya ke 2 register yag berbeda, melakukan perkalian operan di unit eksekusi dan kemudian mengambalikan lagi hasilnya ke register yang benar. Jadi instruksi-nya cukup satu saja…
MULT 2:3, 5:2
MULT dalam hal ini lebih dikenal sebagai “complex instruction”, atau instruksi yang kompleks. Bekerja secara langsung melalui memori komputer dan tidak memerlukan instruksi lain seperti fungsi baca maupun menyimpan.
Satu kelebihan dari sistem ini adalah kompailer hanya menerjemahkan instruksi-instruksi bahasa tingkat-tinggi ke dalam sebuah bahasa mesin. Karena panjang kode instruksi relatif pendek, hanya sedikit saja dari RAM yang digunakan untuk menyimpan instruksi-instruksi tersebut.
Pendekatan RISC
Prosesor RISC hanya menggunakan instruksi-instruksi sederhana yang bisa dieksekusi dalam satu siklus. Dengan demikian, instruksi ‘MULT’ sebagaimana dijelaskan sebelumnya dibagi menjadi tiga instruksi yang berbeda, yaitu “LOAD”, yang digunakan untuk memindahkan data dari memori ke dalam register, “PROD”, yang digunakan untuk melakukan operasi produk (perkalian) dua operan yang berada di dalam register (bukan yang ada di memori) dan “STORE”, yang digunakan untuk memindahkan data dari register kembali ke memori. Berikut ini adalah urutan instruksi yang harus dieksekusi agar yang terjadi sama dengan instruksi “MULT” pada prosesor RISC (dalam 4 baris bahasa mesin):
LOAD A, 2:3
LOAD B, 5:2
PROD A, B
STORE 2:3, A

Awalnya memang kelihatan gak efisien iya khan? Hal ini dikarenakan semakin banyak baris instruksi, semakin banyak lokasi RAM yang dibutuhkan untuk menyimpan instruksi-instruksi tersebut. Kompailer juga harus melakukan konversi dari bahasa tingkat tinggi ke bentuk kode instruksi 4 baris tersebut.
CISC RISC
Penekanan pada
perangkat keras
Penekanan pada
perangkat lunak
Termasuk instruksi
kompleks multi-clock
Single-clock, hanya
sejumlah kecil instruksi
Memori-ke-memori:
“LOAD” dan “STORE”
saling bekerjasama
Register ke register:
“LOAD” dan “STORE”
adalah instruksi2 terpisah
Ukuran kode kecil,
kecepatan rendah
Ukuran kode besar,
kecepatan (relatif) tinggi
Transistor digunakan untuk
menyimpan instruksi2
kompleks
Transistor banyak dipakai
untuk register memori
Bagaimanapun juga, strategi pada RISC memberikan beberapa kelebihan. Karena masing-masing instruksi hanya membuthukan satu siklus detak untuk eksekusi, maka seluruh program (yang sudah dijelaskan sebelumnya) dapat dikerjakan setara dengan kecepatan dari eksekusi instruksi “MULT”. Secara perangkat keras, prosesor RISC tidak terlalu banyak membutuhkan transistor dibandingkan dengan CISC, sehingga menyisakan ruangan untuk register-register serbaguna (general purpose registers). Selain itu, karena semua instruksi dikerjakan dalam waktu yang sama (yaitu satu detak), maka dimungkinkan untuk melakukan pipelining.
Memisahkan instruksi “LOAD” dan “STORE” sesungguhnya mengurangi kerja yang harus dilakukan oleh prosesor. Pada CISC, setelah instruksi “MULT” dieksekusi, prosesor akan secara otomatis menghapus isi register, jika ada operan yang dibutuhkan lagi untuk operasi berikutnya, maka prosesor harus menyimpan-ulang data tersebut dari memori ke register. Sedangkan pada RISC, operan tetap berada dalam register hingga ada data lain yang disimpan ke dalam register yang bersangkutan.
Persamaan Unjuk-kerja (Performance)
Persamaan berikut biasa digunakan sebagai ukuran unjuk-kerja suatu komputer:
Pendekatan CISC bertujuan untuk meminimalkan jumlah instruksi per program, dengan cara mengorbankan kecepatan eksekusi sekian silus/detik. Sedangkan RISC bertolak belakang, tujuannya mengurangi jumlah siklus/detik setiap instruksi dibayar dengan bertambahnya jumlah instruksi per program.
Penghadang jalan (Roadblocks) RISC
Walaupun pemrosesan berbasis RISC memiliki beberapa kelebihan, dibutuhkan waktu kurang lebih 10 tahunan mendapatkan kedudukan di dunia komersil. Hal ini dikarenakan kurangnya dukungan perangkat lunak.
Walaupun Apple’s Power Macintosh menggunakan chip berbasis RISC dan Windows NT adalah kompatibel RISC, Windows 3.1 dan Windows 95 dirancang berdasarkan prosesor CISC. Banyak perusahaan segan untuk masuk ke dalam dunia teknologi RISC. Tanpa adanya ketertarikan komersil, pengembang prosesor RISC tidak akan mampu memproduksi chip RISC dalam jumlah besar sedemikian hingga harganya bisa kompetitif.
Kemerosotan juga disebabkan munculnya Intel, walaupun chip-chip CISC mereka semakin susah digunakan dan sulit dikembangkan, Intel memiliki sumberdaya untuk menjajagi dan melakukan berbagai macam pengembangan dan produksi prosesor-prosesor yang ampuh. Walaupun prosesor RISC lebih unggul dibanding Intel dalam beberapa area, perbedaan tersebut kurang kuat untuk mempengaruhi pembeli agar merubah teknologi yang digunakan.
Keunggulan RISC
Saat ini, hanya Intel x86 satu-satunya chip yang bertahan menggunakan arsitektur CISC. Hal ini terkait dengan adanya kemajuan teknologi komputer pada sektor lain. Harga RAM turun secara dramatis. Pada tahun 1977, DRAM ukuran 1MB berharga %5,000, sedangkan pada tahun 1994 harganya menjadi sekitar $6. Teknologi kompailer juga semakin canggih, dengan demikian RISC yang menggunakan RAM dan perkembangan perangkat lunak menjadi semakin banyak ditemukan.
RISC
The concept was developed by John Cocke of IBM Research during 1974. His argument was based upon the notion that a computer uses only 20% of the instructions, making the other 80% superfluous to requirement. A processor based upon this concept would use few instructions, which would require fewer transistors, and make them cheaper to manufacture. By reducing the number of transistors and instructions to only those most frequently used, the computer would get more done in a shorter amount of time. The term 'RISC' (short for Reduced Instruction Set Computer) was later coined by David Patterson, a teacher at the University of California in Berkeley.
The RISC concept was used to simplify the design of the IBM PC/XT, and was later used in  the IBM RISC System/6000 and Sun Microsystems' SPARC  microprocessors. The latter CPU led to the founding of MIPS Technologies, who developed the M.I.P.S. RISC microprocessor (Microprocessor without Interlocked Pipe Stages). Many of the MIPS architects also played an instrumental role in the creation of the Motorola 68000, as used in the first Amigas (MIPS Technologies were later bought by Silicon Graphics).. The MIPS processor has continued development, remaining a popular choice in embedded and low-end market. At one time, it was suspected the Amiga MCC would use this CPU to reduce the cost of manufacture. However, the consumer desktop market is limited, only the PowerPC processor remains popular in the choice of RISC alternatives. This is mainly due to Apple's continuous use of the series for its PowerMac range.
CISC
CISC (Complex Instruction Set Computer) is a retroactive definition that was introduced to distinguish the design from RISC microprocessors. In contrast to RISC, CISC chips have a large amount of different and complex instruction. The argument for its continued use indicates that the chip designers should make life easier for the programmer by reducing the amount of instructions required to program the CPU. Due to the high cost of memory and storage CISC microprocessors were considered superior due to the requirements for small, fast code. In an age of dwindling memory hard disk prices, code size has become a non-issue (MS Windows, hello?). However, CISC-based systems still cover the vast majority of the consumer desktop market. The majority of these systems are based upon the x86 architecture or a variant. The Amiga, Atari, and pre-1994 Macintosh systems also use a CISC microprocessor.
RISC Vs. CISC
The argument over which concept is better has been repeated over the past few years. Macintosh owners have elevated the argument to a pseudo religious level in support of their RISC-based God (the PowerPC sits next to the Steve Jobs statue on every Mac altar). Both positions have been blurred by the argument that we have entered a Post-RISC stage.
RISC: For and Against
RISC supporters argue that it the way of the future, producing faster and cheaper processors - an Apple Mac G3 offers a significant performance advantage over its Intel equivalent. Instructions are executed over 4x faster providing a significant performance boost! However, RISC chips require more lines of code to produce the same results and are increasingly complex. This will increase the size of the application and the amount of overhead required. RISC developers have also failed to remain in competition with CISC alternatives. The Macintosh market has been damaged by several problems that have affected the availability of 500MHz+ PowerPC chips. In contrast, the PC compatible market has stormed ahead and has broken the 1GHz barrier. Despite the speed advantages of the RISC processor, it cannot compete with a CISC CPU that boasts twice the number of clock cycles.
CISC: For and Against
As discussed above, CISC microprocessors are more expensive to make than their RISC cousins. However, the average Macintosh is more expensive than the WIntel PC. This is caused by one factor that the RISC manufacturers have no influence over - market factors. In particular, the WIntel market has become the definition of personal computing, creating a demand from people who have not used a computer previous. The x86 market has been opened by the development of several competing processors, from the likes of AMD, Cyrix, and Intel. This has continually reduced the price of a CPU of many months. In contrast, the PowerPC Macintosh market is dictated by Apple. This reduces the cost of x86 - based microprocessors, while the PowerPC market remains stagnant.
Post-RISC
As the world enters the 21st century the CISC Vs. RISC arguments have been swept aside by the recognition that neither terms are accurate in their description. The definition of 'Reduced' and 'Complex' instructions has begun to blur, RISC chips have increased in their complexity (compare the PPC 601 to the G4 as an example) and CISC chips have become more efficient. The result are processors that are defined as RISC or CISC only by their ancestry.  The PowerPC 601, for example, supports more instructions than the Pentium. Yet the Pentium is a CISC chip, while the 601 is considered to be RISC. CISC chips have also gained techniques associated with RISC processors. Intel describe the Pentium II as a CRISC processor, while AMD use a RISC architecture but remain compatible with the dominant x86 CISC processors. Thus it is no longer important which camp the processor comes from, the emphasis has once-again been placed upon the operating system and the speed that it can execute instructions.
EPIC
In the aftermath of the CISC-RISC conflict, a new enemy has appeared to threaten the peace. EPIC (Explicitly Parallel Instruction Computing) was developed by Intel for the server market, thought it will undoubtedly appear in desktops over the next few years. The first EPIC processor will be the 64-bit Merced, due for release sometime during 2001 (or 2002, 2003, etc.). The market may be divided between combined CISC-RISC systems in the low-end and EPIC in the high-end.
Famous RISC microprocessors
801
To prove that his RISC concept was sound, John Cocke created the 801 prototype microprocessor (1975). It was never marketed but plays a pivotal role in computer history, becoming the first RISC microprocessor.
RISC 1 and 2
The first "proper" RISC chips were created  at Berkeley University in 1985.
ARM
One of the most well known RISC developers is Cambridge based Advanced Research Machines (originally Acorn Research Machines). Their ARM and StrongARM chips power the old Acorn Archimedes and the Apple Newton handwriting recognition systems. Since the unbundling of ARM from Acorn, Intel have invested a considerable amount of money in the company and have utilized the technology in their processor design. One of the main advantages for the ARM is the price- it costs less than £10.
If Samsung had bought the Amiga in 1994, they would possibly have used the chip to power the low-end Amigas.
Sudah sering kita mendengar debat yang cukup menarik antara komputer personal IBM dan kompatibelnya yang berlabel Intel Inside dengan komputer Apple yang berlabel PowerPC.  Perbedaan utama antara kedua komputer itu ada pada tipe prosesor yang digunakannya. Prosesor PowerPC dari Motorola yang menjadi otak utama komputer Apple Macintosh dipercaya sebagai prosesor RISC, sedangkan Pentium buatan Intel diyakini sebagai prosesor CISC. Kenyataannya komputer personal yang berbasis Intel Pentium saat ini adalah komputer personal yang paling banyak populasinya. Tetapi tidak bisa pungkiri juga bahwa komputer yang berbasis RISC seperti Macintosh, SUN adalah komputer yang handal dengan sistem pipelining, superscalar, operasi floating point dan sebagainya.
Apakah memang RISC lebih lebih baik dari CISC atau sebaliknya. Tetapi tahukah kita dimana sebenarnya letak perbedaan itu. Apakah prosesor dengan instruksi yang lebih sedikit akan lebih baik dari prosesor yang instruksinya kompleks dan lengkap. Apakah memang perbedaan prosesor itu hanya dari banyak atau tidaknya instruksi saja. Bukankah jumlah instruksi tidak berhubungan dengan ke-handal-an suatu prosesor. Pertanyaan-pertanyaan ini yang hendak dijawab melalui tulisan berikut. Namun supaya lebih dekat dengan elektronika praktis,  ElectronicLab akan lebih fokus pada mikrokontroler low-cost yang berbasis RISC dan CISC. Sebagai contoh dari mikrokontroler CISC adalah 68HC11 buatan Motorola dan  80C51 dari Intel. Kita juga mengenal keluarga PIC12/16CXX dari Microchip dan COP8 buatan National Semiconductor sebagai mikrokontroler yang berbasis RISC.
CISC adalah singkatan dari Complex Intruction Set Computer dimana prosesor tersebut memiliki set instruksi yang kompleks dan lengkap. Sedangkan RISC adalah singkatan dari Reduced Instruction Set Computer yang artinya prosesor tersebut memiliki set instruksi program yang lebih sedikit. Karena perbedaan keduanya ada pada kata set instruksi yang kompleks atau sederhana (reduced), maka mari kita bahas sedikit tentang intruksi itu sendiri.
Sistem mikrokontroler selalu terdiri dari perangkat keras (hardware) dan perangkat lunak (software). Perangkat lunak ini merupakan deretan perintah atau instruksi yang dijalankan oleh prosesor secara sekuensial. Instruksi itu sendiri sebenarnya adalah bit-bit logik 1 atau 0 (biner) yang ada di memori program. Angka-angka biner ini jika lebarnya 8 bit disebut byte dan jika 16 bit disebut word. Deretan logik biner inilah yang dibaca oleh prosesor sebagai perintah atau instruksi. Supaya lebih singkat, angka biner itu biasanya direpresentasikan dengan bilangan hexa (HEX). Tetapi bagi manusia, menulis program dengan angka biner atau hexa sungguh merepotkan. Sehingga dibuatlah bahasa assembler yang direpresentasikan dengan penyingkatan kata-kata yang cukup dimengerti oleh manusia.
Bahasa assembler ini biasanya diambil dari bahasa Inggris dan presentasinya itu disebut dengan Mnemonic. Masing-masing pabrik  mikroprosesor melengkapi chip buatannya dengan set instruksi yang akan dipakai untuk membuat program.
Biner Hexa Mnemonic
10110110   B6      LDAA ...
10010111   97      STAA ...
01001010   4A      DECA ...
10001010   8A     ORAA ...
00100110   26      BNE ...
00000001   01      NOP...
01111110   7E      JMP ...

Sebagian set instruksi 68HC11
Pada awalnya, instruksi yang tersedia amat sederhana dan sedikit. Kemudian desainer mikroprosesor berlomba-lomba untuk melengkapi set instruksi itu selengkap-lengkapnya. Jumlah instruksi itu berkembang seiring dengan perkembangan desain mikroprosesor yang semakin lengkap dengan mode pengalamatan yang bermacam-macam. Mikroprosesor lalu memiliki banyak instruksi manipulasi bit dan seterusnya dilengkapi dengan instruksi-instruksi aritmatik seperti  penjumlahan, pengurangan, perkalian dan pembagian. Seperti contohnya 68HC11 banyak sekali memiliki set instruksi untuk percabangan seperti BNE, BLO, BLS, BMI, BRCLR, BRSET dan sebagainya.
Perancang mikroprosesor juga memperkaya  ragam instruksi tersebut dengan membuat satu instruksi tunggal untuk program yang biasanya dijalankan dengan beberapa intruksi. Misalnya pada 80C51 untuk contoh program berikut ini.
LABEL    ...
...
DEC    R0
MOV  A,R0
JNZ     LABEL

Program 'decrement' 80C51
Program ini adalah program pengulangan yang mengurangi isi register R0 sampai register R0 menjadi kosong (nol). Intel menambah set instruksinya dengan membuat satu instruksi khusus untuk keperluan seperti ini :
LABEL    ....
DJNZ   R0,LABEL
Instruksi 'decrement jump not zero'  80C51
Kedua contoh program ini hasilnya tidak berbeda. Namun demikian, instruksi kompleks seperti DJNZ mempermudah pembuat program. Set instruksi yang lengkap diharapkan akan semakin membuat pengguna mikroprosesor leluasa menulis  program dalam bahasa assembler yang mendekati bahasa pemrograman level tinggi. Intel 80C51 yang  dikembangkan dari basis prosesor 8048 dirilis pada tahun 1976 memiliki  tidak kurang dari 111 instruksi. Tidak ketinggalan, 68HC11 dari Motorola yang populer di tahun 1984 dilengkapi dengan 145 instruksi. Karena banyak dan kompleksnya instruksi yang dimiliki 68HC11 dan 80C51, kedua contoh mikrokontroler ini disebut sebagai prosesor CISC.
Debat CISC versus RISC dimulai ketika pada tahun 1974 IBM mengembangkan prosesor 801 RISC. Argumen yang dipakai waktu itu adalah mengapa diperlukan instruksi yang kompleks. Sebab pada prinsipnya, instruksi yang kompleks bisa dikerjakan oleh instruksi-instruksi yang lebih sederhana dan kecil. Ketika itu penggunaan bahasa tingkat tinggi seperti Fortran dan kompiler lain (compiler/interpreter) mulai berkembang. Apalagi saat ini compiler seperti C/C++ sudah lazim digunakan. Sehingga sebenarnya tidaklah diperlukan instruksi yang kompleks di tingkat prosesor. Kompiler yang akan bekerja men-terjemahkan program  dari bahasa tingkat tinggi menjadi bahasa mesin.
Untuk melihat bagaimana perbedaan instruksi RISC dan CISC, mari kita lihat bagaimana keduanya melakukan perkalian misalnya c = a x b.  Mikrokontroler 68HC11 melakukannya dengan program sebagai berikut :
LDAA #$5
LDAB #$10
MUL

Program 5x10 dengan 68HC11
Cukup tiga baris saja dan setelah ini accumulator D pada 68HC11 akan berisi hasil perkalian dari accumulator A dan B, yakni 5 x 10 = 50. Program yang sama dengan PIC16CXX, adalah seperti berikut ini.
MOVLW 0x10
MOVWF Reg1
MOVLW 0x05
MOVWF Reg2
CLRW
LOOP  ADDWF  Reg1,0
CFSZ      Reg2,1
GOTO     LOOP


Program 5x10 dengan PIC16CXX

Prosesor PIC16CXX yang RISC ini, tidak memiliki instruksi perkalian yang khusus. Tetapi perkalian 5x10 itu sama saja dengan penjumlahan nilai 10 sebanyak 5 kali. Kelihatannya membuat program assembly dengan prosesor RISC menjadi lebih kompleks dibandingkan dengan prosesor CISC. Tetapi perlu diingat, untuk membuat instruksi yang kompleks seperti instruksi MUL dan instruksi lain yang rumit pada prosesor CISC, diperlukan hardware yang kompleks juga. Dibutuhkan ribuan gerbang logik (logic gates) transistor untuk membuat prosesor yang demikian. Instruksi yang kompleks juga membutuhkan jumlah siklus mesin (machine cycle) yang lebih panjang untuk dapat menyelesaikan eksekusinya. Instruksi perkalian MUL pada 68HC11 memerlukan 10 siklus mesin dan instruksi pembagiannya memerlukan 41 siklus mesin.
Pendukung RISC berkesimpulan, bahwa prosesor yang tidak rumit akan semakin cepat dan handal. Hampir semua instruksi prosesor RISC adalah instruksi dasar (belum tentu sederhana),  sehingga instruksi-instruksi ini umumnya hanya memerlukan 1 siklus mesin untuk menjalankannya. Kecuali instruksi percabangan yang membutuhkan 2 siklus mesin. RISC biasanya dibuat dengan arsitektur Harvard, karena arsitektur ini yang memungkinkan untuk membuat eksekusi instruksi selesai dikerjakan dalam  satu atau dua siklus mesin.
Sebagai perbandingan jumlah instruksi pada prosesor RISC,  COP8 hanya dilengkapi dengan 58 instruksi dan PIC12/16CXX hanya memiliki 33 instruksi saja. Untuk merealisasikan instruksi dasar yang jumlah tidak banyak ini, mikroprosesor RISC tidak memerlukan gerbang logik yang banyak. Karena itu dimensi dice IC dan konsumsi daya prosesor RISC umumnya lebih kecil dibanding prosesor CISC. Bukan karena kebetulan, keluarga mikrokontroler PICXX banyak yang dirilis ke pasar dengan ukuran mini. Misalnya PIC12C508 adalah mikrokontroler DIP 8 pin.
CISC dan RISC perbedaannya tidak signifikan jika hanya dilihat dari terminologi set instruksinya yang kompleks atau tidak (reduced). Lebih dari itu, RISC dan CISC berbeda dalam filosofi arsitekturnya. Filosofi arsitektur CISC adalah memindahkan kerumitan software ke dalam hardware. Teknologi pembuatan IC saat ini memungkinkan untuk menamam ribuan bahkan jutaan transistor di dalam satu dice. Bermacam-macam instruksi yang mendekati bahasa pemrogram tingkat tinggi dapat dibuat dengan tujuan untuk memudahkan programmer membuat programnya. Beberapa prosesor CISC umumnya memiliki microcode berupa firmware internal di dalam chip-nya yang berguna untuk menterjemahkan instruksi makro. Mekanisme ini bisa memperlambat eksekusi instruksi, namun efektif untuk membuat instruksi-instruksi yang kompleks. Untuk aplikasi-aplikasi tertentu yang membutuhkan singlechip komputer, prosesor CISC bisa menjadi pilihan.
Sebaliknya, filosofi arsitektur RISC adalah arsitektur prosesor yang tidak rumit dengan membatasi jumlah instruksi hanya pada instruksi dasar yang diperlukan saja. Kerumitan membuat program dalam bahasa mesin diatasi dengan membuat bahasa program tingkat tinggi dan compiler yang sesuai. Karena tidak rumit, teorinya mikroprosesor RISC adalah mikroprosesor yang low-cost dalam arti yang sebenarnya. Namun demikian, kelebihan ruang pada prosesor RISC dimanfaatkan untuk membuat sistem-sistem tambahan yang ada pada prosesor modern saat ini. Banyak prosesor RISC yang di dalam chip-nya dilengkapi dengan sistem superscalar, pipelining, caches memory, register-register dan sebagainya, yang tujuannya untuk membuat prosesor itu menjadi semakin cepat.
Jadi mana yang lebih baik apakah RISC atau CISC, anda tentu punya pendapat sendiri.
CISC (Complex Instructions Set Computer)
RISC (Reduce Instructions Set Computer)

1. CISC (Complex Instructions Set Computer).
Dimana prosesor tersebut memiliki set instruksi yang kompleks dan lengkap. CISC sendiri adalah salah satu bentuk arsitektur yang menjalani beberapa instruksi dengan tingkat yang rendah. Misalnya intruksi tingkat rendah tersebut yaitu operasi aritmetika, penyimpanan-pengambilan dari memory.
CISC memang memiliki instruksi yang complex dan memang dirasa berpengaruh pada kinerjanya yang lebih lambat. CISC menawarkan set intruksi yang powerful, kuat, tangguh, maka tak heran jika CISC memang hanya mengenal Bahasa Asembly yang sebenarnya ia tujukan bagi para
Programmer. Oleh karena itu ,CISC hanya memerlukan sedikit instruksi untuk berjalan.
Sistem Mikrokontroler selalu terdiri dari perangkat keras (hardware) dan perangkat lunak (software). Perangkat lunak ini merupakan deretan perintah atau instruksi yang dijalankan oleh prosesor secara sekuensial. Instruksi itu sendiri sebenarnya adalah bit-bit logik 1 atau 0 (biner) yang ada di memori program. Angka-angka biner ini jika lebarnya 8 bit disebut byte dan jika 16 bit disebut word.
Deretan logik biner inilah yang dibaca oleh prosesor sebagai perintah atau instruksi. Supaya lebih singkat, angka biner itu biasanya direpresentasikan dengan bilangan hexa (HEX). Tetapi bagi manusia, menulis program dengan angka biner atau hexa sungguh merepotkan. Sehingga dibuatlah Bahasa Assembler yang direpresentasikan dengan penyingkatan kata-kata yang cukup dimengerti oleh manusia.
Bahasa Assembler ini biasanya diambil dari bahasa Inggris dan presentasinya itu disebut dengan Mnemonic. Masing-masing pabrik mikroprosesor melengkapi chip buatannya dengan set instruksi yang akan dipakai untuk membuat program.

Contohnya pada Diagram dibawah ini :

Biner Hexa Mnemonic
10110110 B6 LDAA
10010111 97 STAA
01001010 4A DECA
10001010 8A ORAA
00100110 26 BNE
00000001 01 NOP
01111110 7E JMP

Jadi sebenarnya Tujuan utama dari arsitektur CISC adalah melaksanakan suatu perintah cukup dengan beberapa baris bahasa mesin sedikit mungkin. Hal ini bisa tercapai dengan cara membuat perangkat keras prosesor mampu memahami dan menjalankan beberapa rangkaian operasi. Untuk tujuan contoh kita kali ini, sebuah prosesor CISC sudah dilengkapi dengan sebuah instruksi khusus, yang kita beri nama MULT. Saat dijalankan, instruksi akan membaca dua nilai dan menyimpannya ke 2 register yag berbeda, melakukan perkalian operan di unit eksekusi dan kemudian mengambalikan lagi hasilnya ke register yang benar. Jadi instruksi-nya cukup satu saja, Sedangkan

2. RISC (Reduce Instructions Set Computer)
Adalah Prosesor tersebut memiliki set instruksi program yang lebih sedikit. Karena perbedaan keduanya ada pada kata set instruksi yang kompleks atau sederhana (reduced). RISC lahir pada pertengahan 1980,
kelahirannya ini dilator belakangi untuK CISC. Perbedaan mencolok dari kelahiran RISC ini adalah tidak ditemui pada dirinya instruksi Assembly atau yang dikenal dengan Bahasa Mesin sedangkan itu banyak sekali di jumpai di CISC.
Konsep Arsitektur RISC banyak menerapkan proses eksekusi pipeline.
Meskipun jumlah perintah tunggal yang diperlukan untuk melakukan pekerjaan yang diberikan mungkin lebih besar, eksekusi secara pipeline memerlukan waktu yang lebih singkat daripada waktu untuk melakukan pekerjaan yang sama dengan menggunakan perintah yang lebih rumit. Mesin RISC memerlukan memori yang lebih besar untuk mengakomodasi program yang lebih besar.
Salah satu contoh adalah IBM 801 adalah prosesor komersial pertama yang menggunakan pendekatan RISC. Untuk lebih lanjut memahami RISC, diawali dengan tinjauan singkat tentang karakteristik eksekusi Instruksi yaitu Aspek komputasi yang ditinjau dalam merancang mesin RISC adalah sbb.:
>>Operasi-operasi yang dilakukan:
Hal ini menentukan fungsi-fungsi yang akan dilakukan oleh CPU dan interaksinya dengan memori.
>> Operand-operand yang digunakan:
Jenis-jenis operand dan frekuensi pemakaiannya akan menentukan organisasi memori untuk menyimpannya dan mode pengalamatan untuk mengaksesnya.
>> Pengurutan eksekusi:
Hal ini akan menentukan kontrol dan organisasi pipeline.
Salah satu jenis dari arsitektur, dimana Superscalar adalah sebuah Uniprocessor yang dapat mengeksekusi dua atau lebih operasi scalar dalam bentuk paralel. Merupakan salah satu rancangan untuk meningkatkan kecepatan CPU. Kebanyakan dari komputer saat ini menggunakan mekanisme Superscalar ini.
Standar Pipeline yang digunakan adalah untuk pengolahan bilangan matematika integer (bilangan bulat, bilangan yang tidak memiliki pecahan), kebanyakan CPU juga memiliki kemampuan untuk pengolahan untuk data Floating Point (bilangan berkoma). Pipeline yang mengolah integer dapat juga digunakan untuk mengolah data bertipe floating point ini, namun untuk aplikasi tertentu, terutama untuk aplikasi keperluan ilmiah CPU yang memiliki kemampuan pengolahan floating point dapat meningkatkan kecepatan prosesnya secara dramatis. Peristiwa menarik yang bisa dilakukan dengan metoda superscalar ini adalah dalam hal memperkirakan pencabangan instruksi (brach prediction) serta perkiraan eksekusi perintah (speculative execution). Peristiwa ini sangat menguntungkan buat program yang membutuhkan pencabangan dari kelompok intruksi yang dijalankankannya. Program yang terdiri dari kelompok perintah bercabang ini sering digunakan dalam pemrograman.
Contohnya dalam menentukan aktifitas yang dilakukan oleh suatu sistem berdasarkan umur seseorang yang sedang diolahnya, katakanlah jika umur yang bersangkutan lebih dari 18 tahun, maka akan diberlakukan instruksi yang berhubungan dengan umur tersebut, anggaplah seseorang tersebut dianggap telah dewasa, sedangkan untuk kondisi lainnya dianggap belum dewasa. Tentu perlakuannya akan dibedakan sesuai dengan sistem yang sedang dijalankan. Lalu apa yang dilakukan oleh CPU untuk hal ini? Komputer akan membandingkan nilai umur data yang diperolehnya dengan 18 tahun sehingga komputer dapat menentukan langkah dan sikap yang harus diambilnya berdasarkan hasil perbandingan tersebut. Sikap yang diambil tentu akan diambil berdasarkan pencabangan yang ada.
Pada CPU yang mendukung perintah pencabangan ini, CPU membutuhkan lumayan banyak clock cycle, mengingat CPU menempatkan semuanya pada pipeline dan menemukan perintah berikutnya yang akan dieksekusinya. Sirkuit untuk branch prediction melakukan pekerjaan ini bekerja sama dengan pipeline, yang dilakukan sebelum proses di ALU dilaksanakan, dan memperkirakan hasil dari pencabangan tersebut. Jika CPU berfikir bahwa branch akan menuju suatu cabang, biasanya berdasarkan pekerjaan sebelumnya, maka perintah berikutnya sudah dipersiapkan untuk dieksekusi berikut datadatanya, bahkan dengan adanya pipeline ini, bila tidak diperlukan suatu referensi dari instruksi terakhir, maka bisa dilaksanakan dengan segera, karena data dan instruksi yang dibutuhkan telah dipersiapkan sebelumnya.. Dalam hal speculative execution, artinya CPU akan menggunakan melakukan perhitungan pada pipeline yang berbeda berdasarkan kemungkinan yang diperkirakan oleh komputer. Jika kemungkinan yang dilakukan oleh komputer tepat, maka hasilnya sudah bisa diambil langsung dan tinggal melanjutkan perintah berikutnya, sedangkan jika kemungkinan yang diperkirakan oleh komputer tidak tepat, maka akan dilaksanakan kemungkinan lain sesuai dengan logika instruksi tersebut. Teknik yang digunakan untuk pipeline dan superscalar ini bisa melaksanakan Branch Prediction dan speculative execution tentunya membutuhkan ekstra transistor yang tidak sedikit untuk hal tersebut. Sebagai perbandingan, komputer yang membangkitkan pemrosesan pada PC pertama yang dikeluarkan oleh IBM pada mesin 8088 memiliki sekitar 29.000 transistor. Sedangkan pada mesin Pentium III, dengan teknologi superscalar dan superpipeline, mendukung branch prediction, speculative execution serta berbagai kemampuan lainnya memiliki sekitar 7,5 juta transistor. BeberapA CPU terkini lainnya seperti HP 8500 memiliki sekitar 140 juta transistor.

3. Perbedaan karakteristik CISC dan RISC.
CISC dan RISC perbedaannya tidak signifikan jika hanya dilihat dari terminologi set instruksinya yang kompleks atau tidak (reduced). Lebih dari itu, RISC dan CISC berbeda dalam filosofi arsitekturnya. Filosofi arsitektur CISC adalah memindahkan kerumitan software ke dalam hardware.
Teknologi pembuatan IC saat ini memungkinkan untuk menamam ribuan bahkan jutaan transistor di dalam satu dice. Bermacam-macam instruksi yang mendekati bahasa pemrogram tingkat tinggi dapat dibuat dengan tujuan untuk memudahkan programmer membuat programnya. Beberapa prosesor CISC umumnya memiliki microcode berupa firmware internal di dalam chip-nya yang berguna untuk menterjemahkan instruksi makro. Mekanisme ini bisa memperlambat eksekusi instruksi, namun efektif untuk membuat instruksi-instruksi yang kompleks. Untuk aplikasi-aplikasi tertentu yang membutuhkan singlechip komputer, prosesor CISC bisa menjadi pilihan.

4. Karakteristik CISC versus RISC
Rancangan RISC dapat memperoleh keuntungan dengan mengambil sejumlah feature CISC dan Rancangan CISC dapat memperoleh keuntungan dengan mengambil sejumlah feature RISC.
Hasilnya adalah bahwa sejumlah rancangan RISC yang terbaru, yang dikenal sebagai PowerPC, tidak lagi “murni” RISC dan rancangan CISC yang terbaru, yang dikenal sebagai Pentium, memiliki beberapa karakteristik RISC.

5. Ciri-ciri RISC:
1. Instruksi berukuran tunggal.
2. Ukuran yang umum adalah 4 byte.
3. Jumlah mode pengalamatan data yang sedikit, biasanya kurang dari lima buah.
4. Tidak terdapat pengalamatan tak langsung.
5. Tidak terdapat operasi yang menggabungkan operasi load/store dengan operasi aritmetika (misalnya, penambahan dari memori, penambahan ke memori)

Sebaliknya, filosofi arsitektur RISC adalah arsitektur prosesor yang tidak rumit dengan membatasi jumlah instruksi hanya pada instruksi dasar yang diperlukan saja. Kerumitan membuat program dalam bahasa mesin diatasi dengan membuat bahasa program tingkat tinggi dan compiler yang sesuai. Karena tidak rumit, teorinya mikroprosesor RISC adalah mikroprosesor yang low-cost dalam arti yang sebenarnya. Namun demikian, kelebihan ruang pada prosesor RISC dimanfaatkan untuk membuat sistem-sistem tambahan yang ada pada prosesor modern saat ini. Banyak prosesor RISC yang di dalam chip-nya dilengkapi dengan sistem superscalar, pipelining, caches memory, register-register dan sebagainya, yang tujuannya untuk membuat prosesor itu menjadi semakin cepat.
Sudah sering kita mendengar debat yang cukup menarik antara komputer personal IBM dan kompatibelnya yang berlabel Intel Inside dengan komputer Apple yang berlabel PowerPC. Perbedaan utama antara kedua komputer itu ada pada tipe prosesor yang digunakannya. Prosesor PowerPC dari Motorola yang menjadi otak utama komputer Apple Macintosh dipercaya sebagai prosesor RISC, sedangkan Pentium buatan Intel diyakini sebagai prosesor CISC. Kenyataannya komputer personal yang berbasis Intel Pentium saat ini adalah komputer personal yang paling banyak populasinya. Tetapi tidak bisa pungkiri juga bahwa komputer yang berbasis RISC seperti Macintosh, SUN adalah komputer yang handal dengan sistem pipelining, superscalar, operasi floating point dan sebagainya. Tersedia dari peningkatan kinerja superscalar teknik dibatasi oleh dua bidang utama:
• Tingkat dari hakiki paralel dalam instruksi streaming, yakni terbatasnya jumlah instruksi level parallelism, dan
• Kompleksitas waktu dan biaya yang terkait memberangkatkan dan ketergantungan memeriksa logika.
Binari yang ada telah dijalankan program tahap hakiki paralel. Dalam beberapa kasus petunjuk tidak tergantung pada satu sama lain dan dapat dijalankan secara bersamaan. Dalam kasus lain mereka yang antar-tergantung yaitu satu instruksi dampak baik sumber daya atau hasil lainnya. Petunjuk yang = b + c; d = e + f dapat berjalan secara bersamaan karena tidak ada yang bergantung pada hasil perhitungan lain. Namun, petunjuk yang = b + c; d = a + f mungkin tidak akan runnable secara paralel, tergantung pada urutan petunjuk yang lengkap saat mereka bergerak melalui unit.
Bila jumlah yang dikeluarkan secara simultan petunjuk meningkat, biaya memeriksa dependensi meningkat sangat pesat. Hal ini diperparah oleh kebutuhan untuk memeriksa dependensi di waktu dan menjalankan di CPU jam menilai. Ini termasuk biaya tambahan gerbang logika diperlukan untuk melaksanakan pemeriksaan, dan waktu tunda yang melalui pintu. Penelitian menunjukkan pintu gerbang biaya dalam beberapa kasus dapat NK pintu, dan biaya keterlambatan k2logn, dimana n adalah jumlah instruksi pada prosesor's set instruksi, dan k adalah jumlah bersamaan menurunkan petunjuk. Dalam matematika, ini disebut sebagai combinatoric masalah melibatkan permutations.
Meski mungkin berisi instruksi streaming tidak antar-instruksi dependensi, superscalar CPU yang sebenarnya harus memeriksa bahwa kemungkinan, karena tidak ada jaminan lain dan kegagalan untuk mendeteksi suatu dependensi akan menghasilkan hasil yang salah.
Tidak peduli bagaimana lanjutan proses yang semikonduktor atau cara cepat kecepatan yang berpindah, ini tempat yang praktis membatasi berapa petunjuk dapat menurunkan secara bersamaan. Meskipun proses kemajuan akan mengijinkan pernah lebih besar jumlah unit fungsional, beban instruksi memeriksa dependensi sehingga tumbuh pesat yang dicapai superscalar dispatch batas relatif kecil. Kemungkinan pada urutan lima hingga enam secara bersamaan menurunkan petunjuk.
Namun akhirnya tak terhingga cepat memeriksa ketergantungan pada logika konvensional yang lain superscalar CPU, jika instruksi streaming itu sendiri memiliki banyak dependensi, ini juga akan membatasi speedup mungkin. Dengan demikiantingkat hakiki paraleldalam kode streaming bentuk kedua dalam keterbatasan.


Karakteristik CISC RISC
IBM
370/168 VAX
11/780 Intel
80486 Motorola
88000
Tahun dibuat 1973 1978 7989 1988
Jumlah Intruksi 208 303 235 51
Intruksi (Bytes) 2-6 2-57 1-11 4
Mode Pengalamatan 4 22 11 3
Jumlah Register
General-purpose 16 16 8 32
Ukuran Memory
Control (Kbits) 420 480 246 _
Ukuran Cache
(Kbytes) 64 64 8 16


6. Kesimpulan.
Diantara kelebihan dan kekurangan dari arsitektur RISC dan arsitektur CISC sampai sekarang masih menjadi sebuah perdebatan. Ada juga teknologi yang menggabungkan kedua arsitektur tersebut, contohnya : Prosesor Intel dan AMD yang dijual secara komersil sekarang adalah pengembangan dari prosesor x86 yang menggunakan basis prosesor CISC. Lucunya, instruksi set yang didukung oleh kedua prosesor tersebut menggunakan instruksi RISC yang lebih efisien dalam menangani
data.

In the early days of computing, you had a lump of silicon which performed a number of instructions. As time progressed, more and more facilities were required, so more and more instructions were added. However, according to the 20-80 rule, 20% of the available instructions are likely to be used 80% of the time, with some instructions only used very rarely. Some of these instructions are very complex, so creating them in silicon is a very arduous task. Instead, the processor designer uses microcode. To illustrate this, we shall consider a modern CISC processor (such as a Pentium or 68000 series processor). The core, the base level, is a fast RISC processor. On top of that is an interpreter which 'sees' the CISC instructions, and breaks them down into simpler RISC instructions.
Already, we can see a pretty clear picture emerging. Why, if the processor is a simple RISC unit, don't we use that? Well, the answer lies more in politics than design. However Acorn saw this and not being constrained by the need to remain totally compatible with earlier technologies, they decided to implement their own RISC processor.
Up until now, we've not really considered the real differences between RISC and CISC, so...
A Complex Instruction Set Computer (CISC) provides a large and powerful range of instructions, which is less flexible to implement. For example, the 8086 microprocessor family has these instructions:
       JA      Jump if Above
       JAE     Jump if Above or Equal
       JB      Jump if Below
       ...
       JPO     Jump if Parity Odd
       JS      Jump if Sign
       JZ      Jump if Zero
There are 32 jump instructions in the 8086, and the 80386 adds more. I've not read a spec sheet for the Pentium-class processors, but I suspect it (and MMX) would give me a heart attack!
By contrast, the Reduced Instruction Set Computer (RISC) concept is to identify the sub-components and use those. As these are much simpler, they can be implemented directly in silicon, so will run at the maximum possible speed. Nothing is 'translated'. There are only two Jump instructions in the ARM processor - Branch and Branch with Link. The "if equal, if carry set, if zero" type of selection is handled by condition options, so for example:
       BLNV    Branch with Link NeVer (useful!)
       BLEQ    Branch with Link if EQual
and so on. The BL part is the instruction, and the following part is the condition. This is made more powerful by the fact that conditional execution can be applied to most instructions! This has the benefit that you can test something, then only do the next few commands if the criteria of the test matched. No branching off, you simply add conditional flags to the instructions you require to be conditional:
       SWI     "OS_DoSomethingOrOther"   ; call the SWI
       MVNVS   R0, #0                    ; If failed, set R0 to -1
       MOVVC   R0, #0                    ; Else set R0 to 0
Or, for the 80486:
       INT     $...whatever...           ; call the interrupt
       CMP     AX, 0                     ; did it return zero?
       JE      failed                    ; if so, it failed, jump to fail code
       MOV     DX, 0                     ; else set DX to 0
     return
       RET                               ; and return
     failed
       MOV     DX, 0FFFFH                ; failed - set DX to -1
       JMP     return
The odd flow in that example is designed to allow the fastest non-branching throughput in the 'did not fail' case. This is at the expense of two branches in the 'failed' case.
I am not, however, an x86 coder, so that can possibly be optimised - mail me if you have any suggestions...

Most modern CISC processors, such as the Pentium, uses a fast RISC core with an interpreter sitting between the core and the instruction. So when you are running Windows95 on a PC, it is not that much different to trying to get W95 running on the software PC emulator. Just imagine the power hidden inside the Pentium...
Another benefit of RISC is that it contains a large number of registers, most of which can be used as general purpose registers.
This is not to say that CISC processors cannot have a large number of registers, some do. However for it's use, a typical RISC processor requires more registers to give it additional flexibility. Gone are the days when you had two general purpose registers and an 'accumulator'.
One thing RISC does offer, though, is register independence. As you have seen above the ARM register set defines at minimum R15 as the program counter, and R14 as the link register (although, after saving the contents of R14 you can use this register as you wish). R0 to R13 can be used in any way you choose, although the Operating System defines R13 is used as a stack pointer. You can, if you don't require a stack, use R13 for your own purposes. APCS applies firmer rules and assigns more functions to registers (such as Stack Limit). However, none of these - with the exception of R15 and sometimes R14 - is a constraint applied by the processor. You do not need to worry about saving your accumulator in long instructions, you simply make good use of the available registers.
The 8086 offers you fourteen registers, but with caveats:
The first four (A, B, C, and D) are Data registers (a.k.a. scratch-pad registers). They are 16bit and accessed as two 8bit registers, thus register A is really AH (A, high-order byte) and AL (A low-order byte). These can be used as general purpose registers, but they can also have dedicated functions - Accumulator, Base, Count, and Data.
The next four registers are Segment registers for Code, Data, Extra, and Stack.
Then come the five Offset registers: Instruction Pointer (PC), SP and BP for the stack, then SI and DI for indexing data.
Finally, the flags register holds the processor state.
As you can see, most of the registers are tied up with the bizarre memory addressing scheme used by the 8086. So only four general purpose registers are available, and even they are not as flexible as ARM registers.
The ARM processor differs again in that it has a reduced number of instruction classes (Data Processing, Branching, Multiplying, Data Transfer, Software Interrupts).
A final example of minimal registers is the 6502 processor, which offers you:
Accumulator - for results of arithmetic instructions
X register  - First general purpose register
Y register  - Second general purpose register
PC          - Program Counter
SP          - Stack Pointer, offset into page one (at &01xx).
PSR         - Processor Status Register - the flags.
While it might seem like utter madness to only have two general purpose registers, the 6502 was a very popular processor in the '80s. Many famous computers have been built around it.
For the Europeans: consider the Acorn BBC Micro, Master, Electron...
For the Americans: consider the Apple2 and the Commadore PET.
The ORIC uses a 6502, and the C64 uses a variant of the 6502.
(in case you were wondering, the Speccy uses the other popular processor - the ever bizarre and freaky Z80)
So if entire systems could be created with a 6502, imagine the flexibility of the ARM processor.
It has been said that the 6502 is the bridge between CISC design and RISC. Acorn chose the 6502 for their original machines such as the Atom and the System# units. They went from there to design their own processor - the ARM.

To summarise the above, the advantages of a RISC processor are:
  • Quicker time-to-market. A smaller processor will have fewer instructions, and the design will be less complicated, so it may be produced more rapidly.
  • Smaller 'die size' - the RISC processor requires fewer transistors than comparable CISC processors...
    This in turn leads to a smaller silicon size (I once asked Russell King of ARMLinux fame where the StrongARM processor was - and I was looking right at it, it is that small!)
    ...which, in turn again, leads to less heat dissipation. Most of the heat of my ARM710 is actually generated by the 80486 in the slot beside it (and that's when it is supposed to be in 'standby').
  • Related to all of the above, it is a much lower power chip. ARM design processors in static form so that the processor clock can be stopped completely, rather than simply slowed down. The Solo computer (designed for use in third world countries) is a system that will run from a 12V battery, charging from a solar panel.
  • Internally, a RISC processor has a number of hardwired instructions.
    This was also true of the early CISC processors, but these days a typical CISC processor has a heart which executes microcode instructions which correlate to the instructions passed into the processor. Ironically, this 'heart' tends to be RISC. :-)
  • As touched on my Matthias below, a RISC processor's simplicity does not necessarily refer to a simple instruction set.
    He quotes LDREQ R0,[R1,R2,LSR #16]!, though I would prefer to quote the 26 bit instruction LDMEQFD R13!, {R0,R2-R4,PC}^ which restores R0, R2, R3, R4, and R15 from the fully descending stack pointed to by R13. The stack is adjusted accordingly. The '^' pushes the processor flags into R15 as well as the return address. And it is conditionally executed. This allows a tidy 'exit from routine' to be performed in a single instruction.
    Powerful, isn't it?
    The RISC concept, however, does not state that all the instructions are simple. If that were true, the ARM would not have a MUL, as you can do the exact same thing with looping ADDing. No, the RISC concept means the silicon is simple. It is a simple processor to implement.
    I'll leave it as an exercise for the reader to figure out the power of Mathias' example instruction. It is exactly on par with my example, if not slightly more so!
For a completion of this summary, and some very good points regarding the ARM processor, keep reading...


In response to the original version of this text, Matthias Seifert replied with a more specific and detailed analysis. He has kindly allowed me to reproduce his message here...

RISC vs ARM

You shouldn't call it "RISC vs CISC" but "ARM vs CISC". For example conditional execution of (almost) any instruction isn't a typical feature of RISC processors but can only(?) be found on ARMs. Furthermore there are quite some people claiming that an ARM isn't really a RISC processor as it doesn't provide only a simple instruction set, i.e. you'll hardly find any CISC processor which provides a single instruction as powerful as a
  LDREQ R0,[R1,R2,LSR #16]!
Today it is wrong to claim that CISC processors execute the complex instructions more slowly, modern processors can execute most complex instructions with one cycle. They may need very long pipelines to do so (up to 25 stages or so with a Pentium III), but nonetheless they can. And complex instructions provide a big potential of optimisation, i.e. if you have an instruction which took 10 cycles with the old model and get the new model to execute it in 5 cycles you end up with a speed increase of 100% (without a higher clock frequency). On the other hand ARM processors executed most instruction in a single cycle right from the start and thus don't have this optimisation potential (except the MUL instruction).
The argument that RISC processors provide more registers than CISC processors isn't right. Just take a look at the (good old) 68000, it has about the same number of registers as the ARM has. And that 80x86 compatible processors don't provide more registers is just a matter of compatibility (I guess). But this argument isn't completely wrong: RISC processors are much simpler than CISC processors and thus take up much less space, thus leaving space for additional functionality like more registers. On the other hand, a RISC processor with only three or so registers would be a pain to program, i.e. RISC processors simply need more registers than CISC processors for the same job.
And the argument that RISC processors have pipelining whereas CISCs don't is plainly wrong. I.e. the ARM2 hadn't whereas the Pentium has...
The advantages of RISC against CISC are those today:
  • RISC processors are much simpler to build, by this again results in the following advantages:
    • easier to build, i.e. you can use already existing production facilities
    • much less expensive, just compare the price of a XScale with that of a Pentium III at 1 GHz...
    • less power consumption, which again gives two advantages:
      • much longer use of battery driven devices
      • no need for cooling of the device, which again gives to advantages:
        • smaller design of the whole device
        • no noise
  • RISC processors are much simpler to program which doesn't only help the assembler programmer, but the compiler designer, too. You'll hardly find any compiler which uses all the functions of a Pentium III optimally...
And then there are the benefits of the ARM processors:
  • Conditional execution of most instructions, which is a very powerful thing especially with large pipelines as you have to fill the whole pipeline every time a branch is taken, that's why CISC processors make a huge effort for branch prediction
  • The shifting of registers while other instructions are executed which mean that shifts take up no time at all (the 68000 took one cycle per bit to shift)
  • The conditional setting of flags, i.e. ADD and ADDS, which becomes extremely powerful together with the conditional execution of instructions
  • The free use of offsets when accessing memory, i.e.
    LDR R0,[R1,#16]
    LDR R0,[R1,#16]!
    LDR R0,[R1],#16
    LDR R0,[R1,R2]
    LDR R0,[R1,R2]!
    LDR R0,[R1],R2
    ...
The 68000 could only increase the address register by the size of the data read (i.e. by 1, 2 or 4). Just imagine how much better an ARM processor can be programmed to draw (not only) a vertical line on the screen.
  • The (almost) free use of all registers with all instructions (which may well be an advantage of any RISC processor). It simply is great to be able to use
    ADD PC,PC,R0,LSL #2
    MOV R0,R0
    B R0is0
    B R0is1
    B R0is2
    B R0is3
    ...
or even
    ADD PC,PC,R0,LSL #3
    MOV R0,R0
    MOV R1,#1
    B Continue
    MOV R2,#2
    B Comtinue
    MOV R2,#4
    B Continue
    MOV R2,#8
    B Continue
    ...
I used this technique when programming my C64 emulator even more excessively to emulate the 6510. There the shift is 8 which gives 256 bytes for each instruction to emulate. Within those 256 bytes there is not only the code for the emulation of the instruction but also the code to react on interrupts, the fetching of the next instruction and the jump to the emulation code of that instruction, i.e. the code to emulate the CLC (clear C flag) looks like this:
    ADD     R10,R10,#1            ; increment PC of 6510 to point to next
                                  ; instruction
    BIC     R6,R6,#1              ; clear C flag of 6510 status register
    LDR     R0,[R12,#64]          ; read 6510 interrupt state
    CMP     R0,#0                 ; interrupt occurred?
    BNE     &00018040             ; yes -> jump to interrupt handler
    LDRB    R1,[R4,#1]!           ; read next instruction
    ADD     PC,R5,R1,LSL #8       ; jump to emulation code
    MOV     R0,R0                 ; lots of these to fill up the 256 bytes
This means that there is only one single jump for each instruction emulated. By this (and a bit more) the emulator is able to reach 76% of the speed of the original C64 with an A3000, 116% with an A4000, 300% with an A5000 and 3441% with my RiscPC (SA at 287 MHz). The code may look hard to handle, but the source of it looks much better:
     ;-----------;
     ; $18 - CLC ;
     ;-----------;
     ADD R10,R10,#1               ; increment PC of 6510
     BIC R6,R6,#000001         ; clear C flag of 6510 status register
     FNNextCommand                ; do next command
     FNFillFree                   ; fill remaining space

CISC vs. RISC

CISC Principles
  • Large instruction set;
  • Complex operations;
  • Complex addressing modes;
  • Complex hardware, long execution time;
  • Minimum number of instructions needed for a given task;
  • Easy to program, simpler compiler.
Observations
  • Complex operations are infrequently used;
  • Complex addressing modes are infrequently used, and they can always be realized using several simple instructions;
  • Few data types are frequently used;
  • Constants and displacements (offsets) in instructions are often small;
  • Compiler cannot easily exploit complex instructions.
RISC Principles
  • Small instruction set;
  • Simple instructions to allow for fast execution (fewer steps);
  • Both operands should be available in registers to allow for short fetch time;
  • Large number of registers;
  • Only read/write (load/store) instructions should access the main memory, one MM access per instruction;
  • Simple addressing modes to allow for fast address computation;
  • Fixed-length instructions with few formats and aligned fields to allow for fast instruction decoding;
  • Complex tasks are left to the compiler to construct from simple operations, with increased compiler complexity and compiling time;
  • simpler and faster hardware implementation, especially suitable for pipelined architecture.
Comparisons
The execution time of a program depends on
  • total number of instructions in the program;
  • average number of cycles in each instruction
  • clock cycle time.

The CISC instructions are closer to the high-level languages, while the RISC instructions are closer to the signel-step micro-instructions (to be discussed later).
Example:
  • CISC (M68000)
Add the content of MM location pointed to by A3 to the component of an array starting at MM address 100. The index number of the component is in A2. The content of A3 is then automatically incremented by 1.
  • RISC (MIPS)

0 Response to "CISC vs RISC"

Posting Komentar