Apakah Set Arahan? Koleksi arahan yg lengkap yg difahami oleh CPU Kod Mesin (Machine code) Perduaan (Binary) Selalunya diwakili oleh kod2 penghimpunan.

Slides:



Advertisements
Similar presentations
CH10 Instruction Sets: Characteristics and Functions
Advertisements

INSTRUCTION SET ARCHITECTURES
Computer Organization and Architecture
The Central Processing Unit Instruction Sets: Characteristics and Functions.
Instruction Set Architecture & Design
Memory - Registers Instruction Sets
What is an instruction set?
Chapter 10 Instruction Sets: Characteristics and Functions.
CH12 CPU Structure and Function
GROUP #4 CHAPTER 10 JOEL FRAGA JAIME J.OCON DEISY HERNANDEZ.
Machine Instruction Characteristics
COMPUTER ORGANIZATIONS CSNB123 May 2014Systems and Networking1.
CSCI 4717/5717 Computer Architecture
Assembly Language Issues – Page 1CSCI 4717 – Computer Architecture CSCI 4717/5717 Computer Architecture Topic: Assembly Language Issues Reading: Stallings,
Dr Mohamed Menacer College of Computer Science and Engineering Taibah University CS-334: Computer.
Homework Problems 1. M1 runs the program P in 1.4 * 9 * ns or ns M2 runs the program P in 1.6*9800*10ns or ns Hence M2 is faster by.
Instruction Set Architecture Nizamettin AYDIN
Module 3 Instruction Set Architecture (ISA): ISA Level Elements of Instructions Instructions Types Number of Addresses Registers Types of Operands.
Instruction Sets: Characteristics Functions Addressing Modes Formats Chapter7:
Computer Architecture and Organization
Computer Architecture EKT 422
COMPUTER ORGANIZATIONS CSNB123 NSMS2013 Ver.1Systems and Networking1.
Chapter 10 Instruction Sets: Characteristics and Functions Felipe Navarro Luis Gomez Collin Brown.
Dr Mohamed Menacer College of Computer Science and Engineering, Taibah University CE-321: Computer.
What is a program? A sequence of steps
Operand Addressing And Instruction Representation Tutorial 3.
Group # 3 Jorge Chavez Henry Diaz Janty Ghazi German Montenegro.
EKT 422/4 COMPUTER ARCHITECTURE SoME-0809-I 1 Chapter 3a Instruction Sets: Characteristics and Functions.
Ass. Prof. Dr Masri Ayob TK 2123 Lecture 14: Instruction Set Architecture Level (Level 2)
Instruction Sets. Instruction set It is a list of all instructions that a processor can execute. It is a list of all instructions that a processor can.
Instruction Sets: Characteristics and Functions  Software and Hardware interface Machine Instruction Characteristics Types of Operands Types of Operations.
P.D.Thakar Prof.Ram Meghe College of Engineering & Management.
CSC 221 Computer Organization and Assembly Language Lecture 06: Machine Instruction Characteristics.
Computer Architecture. Instruction Set “The collection of different instructions that the processor can execute it”. Usually represented by assembly codes,
Computer Architecture
Architecture Review Instruction Set Architecture
William Stallings Computer Organization and Architecture 8th Edition
Computer Organization and Architecture + Networks
BIC 10503: COMPUTER ARCHITECTURE
Central Processing Unit
Computer Organization and ASSEMBLY LANGUAGE
Processor Organization and Architecture
ECEG-3202 Computer Architecture and Organization
Computer Architecture
Chapter 9 Instruction Sets: Characteristics and Functions
William Stallings Computer Organization and Architecture 8 th Edition Chapter 10 (Chap 12 edition 9) Instruction Sets: Characteristics and Functions.
CPU: Instruction Sets and Instruction Cycles
ECEG-3202 Computer Architecture and Organization
Chapter 9 Instruction Sets: Characteristics and Functions
Introduction to Microprocessor Programming
Chapter 11 Processor Structure and function
COMPUTER ORGANIZATION AND ARCHITECTURE
Computer Organization
Chapter 10 Instruction Sets: Characteristics and Functions
Presentation transcript:

Apakah Set Arahan? Koleksi arahan yg lengkap yg difahami oleh CPU Kod Mesin (Machine code) Perduaan (Binary) Selalunya diwakili oleh kod2 penghimpunan (assembly codes)

Element2 Arahan Kod operasi (Operation code - op code). –Buat ini (Do this). Sumber rujukan operan (Source operand reference). –Ke ini (To this). Rujukan jawapan operan (Result operand reference). –Letak jawapan di sini. Rujukan arahan berikut (Next instruction reference). –Pabila ia selesai, buat ini pulak...

Pewakilan Arahan Dlm kod mesin, setiap arahan mempunyai pola bit yg unik Utk kemudahan manusia (yakni pengaturcara), pewakilan simbolik digunakan –Cth. Add, sub, load Operan juga boleh diwakili dgn cara ini –Add a,b

Format2 Arahan Paparan bit2 dlm arahan Termasuk opcode Termasuk (tersirat atau nyata) operan2 Selalunya lbh drpd satu format arahan dlm set arahan.

Format Arahan Op-Code Operand Reference 1 Operand Reference bits Arahan Operand field

Jenis2 Arahan Pemprosesan data (Data processing) Penyimpanan data (Data storage - memori utama) Pergerakkan data (Data movement- I/O) Program flow control

Panjang Arahan Dipengaruhi oleh dan mempengaruhi: –Saiz Memori –Oraganisasi Memori –Struktur bas –Kekompleksan CPU –Kelajuan CPU Keseimbangan ant ‘powerful instruction repertoire’ & ‘saving space’.

Number of Addresses (a) 3 addresses –Operand 1, Operand 2, Result –a = b + c; –May be a forth - next instruction (usually implicit) –Not common –Needs very long words to hold everything

Number of Addresses (b) 2 addresses –One address doubles as operand and result –a = a + b –Reduces length of instruction –Requires some extra work Temporary storage to hold some results

Number of Addresses (c) 1 address –Implicit second address –Usually a register (accumulator) –Common on early machines

Number of Addresses (d) 0 (zero) addresses –All addresses implicit –Uses a stack –e.g. push a – push b – add – pop c –c = a + b

Bilangan Alamat Mesin satu alamat –Add b => ac = ac + b Mesin dua alamat –Sub a, b => a = a - b Mesin tiga alamat –Add a, b, c => a = b + c

Bilangan Alamat Arahan tiga alamat –Arahankomen/makna –Sub y, a, by<= a-b –MPY t, d, et<= d*e –Add t, t, ct<= t+c –Div y, y, ty<= y/t »Y= (a-b) / (c+d*e)

Bilangan Alamat Arahan dua alamat –MOV y, ay<= a –Sub y, by<= y-b –MOV t, dt<= d –MPY t, et<= t*e –Add t, ct<= t+c –Div y, ty<= y/t »Y= (a-b) / (c+d*e)

Bilangan Alamat Arahan satu alamat –LOD dac<= d –MPY eac<= ac*e –Add cac<=ac+c –STR yy<= ac –LOD aac<= a –Sub bac<= ac-b –Div yac<= ac/y –STR yy<= ac »Y= (a-b) / (c+d*e)

Berapa banyak alamat? Lebih alamat –Lbh komplek (powerful?) arahan –Lbh daftar (register) Inter-register operations are quicker –Sedikit arahan per program Sedikit alamat –Krg komplek (powerful?) arahan –Lbh arahan per program –Cepat Ambil/Laksana arahan

Keputusan Rekabentuk (1) Himpunan operasi –Berapa byk operasi? –Apa yg blh dilakukan? –Berapa komplek? Jenis2 data Format2 arahan –Panjang kod operasi –Bilangan alamat

Keputusan Rekabentuk (2) Daftar2 (Registers) –Bil. daftar2 CPU yg ada –Which operations can be performed on which registers? Mod Alamat (later…) RISC v CISC

Jenis2 Operan Alamat2. Nombor2. –Integer/floating point. Characters. –ASCII etc. Data Logikal. –Bits or flags. (Aside: is there any difference between numbers and characters? Ask a C programmer!).

Pentium Data Types 8 bit byte 16 bit word 32 bit double word 64 bit quad word Addressing is by 8 bit unit A 32 bit double word is read at addresses divisible by 4

Specific Data Types General - arbitrary binary contents Integer - single binary value Ordinal - unsigned integer Unpacked BCD - one digit per byte Packed BCD - 2 BCD digits per byte Near pointer - 32 bit offset within segment Bit field Byte string Floating point

Jenis2 Operasi Perpindahan data (Data transfer) Aritmetik Logikal Pertukaran (Conversion) I/O Kawalan sistem (System control) Transfer of control

Perpindahan Data Tentukan –Sumber (Source) –Destinasi (Destination) –Amount of data Berkemungkinan arahan yg berbeza utk permindahan yg berbeza –E.G. IBM 370 Atau satu arahan dan berlainan alamat –E.G. VAX

Aritmetik Tambah, tolak, darab, bahagi Integer bertanda Titik apungan? Mungkin juga termasuk –Increment (a++) –Decrement (a--) –Negate (-a)

Shift and Rotate Operations

Logikal Bit wise operations And, or, not

Pertukaran Cth. Binary to decimal

Input/output Mungkin ada arahan spesifik Mungkin dilakukan m’gunakan arahan peralihan data (memory mapped) Mungkin dilakukan oleh controller (DMA) yg terasing.

Kawalan Sistem Arahan terlindung CPU perlu berada dlm situasi tertentu –Ring 0 on –Kernel mode Utk kegunaan OS

Permindahan Kawalan Cabang (Branch) –E.G. Branch to x if result is zero Langkau (Skip) –E.G. Increment and skip if zero –ISZ register1 –Branch xxxx –Add a Panggil subrutin (Subroutine call) –C.F. Interrupt call

Pentium Floating Point Data Types See Stallings (5 th Ed - Chapter 9, 6 th Ed – Chap 10) / Instruction Sets: Characteristics and Function