Fig 1.8 - Fatih Üniversitesi

advertisement
C
S
D
A
2/e
Computer Systems
Design and Architecture
Vincent P. Heuring
and
Harry F. Jordan
Department of Computer Engineering
Fatih University
Computer Systems Design and Architecture Second Edition
© 2004 Prentice Hall
C
S
D
A
2/e
Bilgisayar Sistem
Tasarımı ve Mimarisi
Vincent P. Heuring
and
Harry F. Jordan
Bilgisayar Mühendisliği Bölümü
Fatih Üniversitesi
Computer Systems Design and Architecture Second Edition
© 2004 Prentice Hall
C
S
D
A
2/e
Course Goals: Understanding Structure and Function of Digital
Computer at 3 Levels

Multiple levels of computer operation




This
course




Interactions and relations between levels




Application level
High Level Language(s), HLL, level(s)
Assembly/machine language level: instruction set
System architecture level: subsystems & connections
Digital logic level: gates, memory elements, buses
Electronic design level
Semiconductor physics level
View of machine at each level
Tasks and tools at each level
Historical perspective
Trends and research activities
Computer Systems Design and Architecture Second Edition
© 2004 Prentice Hall
C
S
D
A
2/e
Dersin Amacı: Dijital Bilgisayarların Fonksiyon ve Yapısının 3
Düzeyde Anlaşılması

Çok katmanlı bilgisayar işlemleri



Dersin
Konuları





Düzeyler arası etkileşim ve ilişkiler




Uygulama Düzeyi
Yüksek Düzeyli Diller, (High Level Languages)
Assembly/Makine Dil düzeyi: Komut kümesi (instruction set)
Sistem Mimari Düzeyi: alt sistemler & bağlantılar
Sayısal Mantık Düzeyi: kapılar, hafıza elemanları, veri yolları
Elektronik dizayn Düzeyi
Yarı iletken Fizik Düzeyi
Makine’nin her düzeydeki görünümü
Her düzeyde ki görev ve araçlar
Tarihsel Bakış Açısı
Trendler ve Araştırmalar
Computer Systems Design and Architecture Second Edition
© 2004 Prentice Hall
Real Course Goal: No Mysteries
The goal of CSDA is to treat the design and
architecture of computer systems at a level of detail
that leaves “no mysteries” in computer systems
design.
This “no mysteries” approach is followed throughout
the text, from instruction set design to the logic-gatedesign of the CPU data path and control unit out to the
memory, disk, and network.
C
S
D
A
2/e
Prerequisites

Experience with a high level language




Pascal
C, etc.
Assembly language programming
Digital logic circuits

Appendix A summarizes logic design in sufficient detail so the
text can be used in courses without digital logic circuits as a
prerequisite.
Computer Systems Design and Architecture Second Edition
© 2004 Prentice Hall
C
S
D
A
2/e
Ön Şartlar

Yüksek düzeyli bir dilde tecrübe sahibi olmak




Pascal
C, vs.
Assembly dilinde programlama
Sayısal mantık devreleri (Digital logic circuits)
Computer Systems Design and Architecture Second Edition
© 2004 Prentice Hall
C
S
D
A
2/e
Text Overview










1: The General Purpose Machine
2: Machines, Machine Languages, and Digital Logic
3: Some Real Machines
4: Processor Design at the Gate Level
5: Processor Design - Advanced Topics
6: Computer Arithmetic and the Arithmetic Unit
7: Memory System Design
8: Input and Output
9: Peripheral Devices
10: Communications, Networking and the Internet
Computer Systems Design and Architecture Second Edition
© 2004 Prentice Hall
C
S
D
A
2/e
Konular









1: Genel Amaçlı Makineler
2: Makineler, Makine Dilleri, ve Dijital Logic
4: İşlemci Tasarımı – Dijital Logic Düzeyi (Gate Level)
5: İşlemci Tasarımı – İleri Konular
6: Bilgisayar Aritmetiği ve Aritmetik Birimler
7: Hafıza Sistemi Tasarımı
8: Input ve Output
9: Çevre Birim Aygıtları
10: Haberleşme, Ağlar ve İnternet
Computer Systems Design and Architecture Second Edition
© 2004 Prentice Hall
C
S
D
A
2/e
Chapter 1 Summary
Views of the General Purpose Machine:
1.1 The User’s View
1.2 The Assembly/Machine Language Programmer’s View
Instruction set architecture - ISA
Registers, memory, and instructions
The stored program
The fetch execute cycle
1.3 The Computer Architect’s View
System design & balance
1.4 The Digital Logic Designer’s View
Realization of specified function—from concept to logic hardware

Also discussed: Historical Perspective, Trends and Research,
Approach of the Text
Computer Systems Design and Architecture Second Edition
© 2004 Prentice Hall
C
S
D
A
2/e
Bölüm 1 Özet
Genel Amaçlı Makinelere Bakış:
1.1 Kullanıcının Bakışı
1.2 Assembly/Makine Dili Programcısının Bakışı
Komut Küme Mimarisi (Instruction set architecture – ISA)
Registers, hafıza, ve komutlar
Kayıtlı Program
Fetch-Execute döngüsü
1.3 Bilgisayar Mimarının Bakışı
Sistem Dizaynı ve Denge
1.4 Digital Logic Tasarımcısının Bakışı
Özelleştirilmiş fonksiyonların anlaşılması - from concept to logic hardware

Değinilecek Diğer Konular: Tarihsel Bakış Açısı, Trendler ve
Araştırmalar, Kitabın Yaklaşımı
Computer Systems Design and Architecture Second Edition
© 2004 Prentice Hall
C
S
D
A
2/e



Looking Ahead - Chapter 2
Explores the nature of machines and machine languages
Relationship of machines and languages
Generic 32 bit Simple RISC Computer - SRC
Register transfer notation - RTN








The main function of the CPU is the Register Transfer
RTN provides a formal specification of machine structure and function
Maps directly to hardware
RTN and SRC will be used for examples in subsequent chapters
Provides a general discussion of addressing modes
Covers quantitative estimates of system performance
For students without digital logic design background Appendix A should be
covered at this point.
Presents a view of logic design aimed at implementing registers and register
transfers, including timing considerations.
Computer Systems Design and Architecture Second Edition
© 2004 Prentice Hall
C
S
D
A
2/e



Bölüm 2
Makineleri ve Makine Dillerinin Yapısının İncelenmesi
Makineler ve diller arasındaki ilişkiler
Generic 32 bit Basit RISC Bilgisayarı - SRC
Register transfer notation - RTN








CPU’nun ana fonksiyonu Register transferdir.
RTN, makine yapısı ve fonksiyonları için biçimsel bir belirleyicidir.
Direk olarak donanımı işaret eder
RTN ve SRC sonraki bölümler de örnekler için kullanılacaktır.
Genel adresleme modları için bakış açısı sağlar.
Sistem performansının tahmininde kullanılır.
Digital Logic Dizayn altyapısı olmayan öğrenciler için Appendix A gözden
geçirilecektir.
Register implementation, register transferi ve zamanlama amacıyla logic
dizayn bakış açısı oluşturulacaktır.
Computer Systems Design and Architecture Second Edition
© 2004 Prentice Hall
C
S
D
A
2/e
Looking Ahead - Chapter 3

Treats two real machines of different types - CISC and RISC - in
some depth


Discusses general machine characteristics and performance
Differences in design philosophies of



CISC machine - Motorola MC68000




CISC (Complex instruction Set Computer) and
RISC (Reduced Instruction Set Computer) architectures
Applies RTN to the description of real machines
RISC machine - SPARC
Introduces quantitative performance estimation
Java-based simulators are available for subsets of both
machines, MC68000 and SPARC subset, ARC.

Run on PC, Mac OS X, Linux, and Unix
Computer Systems Design and Architecture Second Edition
© 2004 Prentice Hall
C
S
D
A
2/e
Bölüm 3

Farklı tiplerdeki iki gerçek makinenin davranışları – CISC ve
RISC


Genel makine karakteristikleri ve performansının incelenmesi
Dizayn felsefesi açısından farklılıkları



CISC machine - Motorola MC68000




CISC (Complex instruction Set Computer) ve
RISC (Reduced Instruction Set Computer) mimarileri
Gerçek makineleri tanımlamak için RTN uygulanır
RISC machine - SPARC
Nicel Performans Tahmini
Her iki makinelerin altkümeleri için de Java tabanlı simülatörler
uygundur. MC68000 and SPARC altkümeleri, ARC.

PC, Mac OS X, Linux, ve Unix de çalışırlar.
Computer Systems Design and Architecture Second Edition
© 2004 Prentice Hall
C
S
D
A
2/e
Looking Ahead - Chapter 4
This keystone chapter describes processor design at the logic gate level





Describes the connection between the instruction set and
the hardware
Develops alternative 1- 2- and 3- bus designs of SRC at
the gate level
RTN provides description of structure and function at low
and high levels
Shows how to design the control unit that makes it all run
Describes two additional machine features:


implementation of exceptions (interrupts)
machine reset capability
Computer Systems Design and Architecture Second Edition
© 2004 Prentice Hall
C
S
D
A
2/e
Bölüm 4
İşlemci tasarımının logic gate düzeyinde tanımlanması





Komut kümesi ve donanım arasındaki bağlantının
tanımlanması
SRC ’nin Alternatif 1- 2- ve 3- veri yolu dizaynının gate level
de geliştirilmesi
RTN düşük ve yüksek düzeyde yapı ve fonksiyon
açıklaması sağlar.
Her şeyi çalıştıracak bir kontrol birimi (control unit)
tasarımının gösterilmesi
İki ilave makine özelliğinin tanımlanması


implementation of exceptions (interrupts)
machine reset yeteneği
Computer Systems Design and Architecture Second Edition
© 2004 Prentice Hall
C
S
D
A
2/e

Looking Ahead - Chapter 5
Important advanced topics in CPU design
General discussion of pipelining—having more than one instruction
executing simultaneously





Design of a pipelined version of SRC
Instruction-level parallelism—issuing more than one instruction
simultaneously



requirements on the instruction set
how instruction classes influence design
pipeline hazards: detection & management
Superscalar and VLIW designs
Design a VLIW version of SRC
Microcoding as a way to implement control
Computer Systems Design and Architecture Second Edition
© 2004 Prentice Hall
C
S
D
A
2/e

Bölüm 5
CPU dizaynında önemli ileri düzey konuları
Pipelining —Birden fazla komutun eş zamanlı işletilmesi





SRC ’nin pipeline versiyonunun tasarımı
Komut düzeyinde paralellik - Birden fazla komutun eş zamanlı
işletilmesi



Komut kümesinde ki gereklilikler
Komut sınıflarının dizayn üzerindeki etkileri
pipeline riskleri: tespit edilmesi & yönetilmesi
Superscalar ve VLIW dizaynları
SRC ’nin VLIW versiyonunun dizaynı
Mikro programlama kontrol oluşturmada kullanılan bir yoldur
Computer Systems Design and Architecture Second Edition
© 2004 Prentice Hall
C
S
D
A
2/e
Looking Ahead - Chapter 6
The arithmetic and logic unit: ALU


Impact of the ALU on system performance
Digital number systems and arithmetic in an arbitrary radix







number systems and radix conversion
integer add, subtract, multiply, and divide
Time/space trade-offs: fast parallel arithmetic
Floating point representations and operations
Branching and the ALU
Logic operations
ALU hardware design
Computer Systems Design and Architecture Second Edition
© 2004 Prentice Hall
C
S
D
A
2/e
Bölüm 6
Arithmetic and logic unit: ALU


ALU ‘nun sistem performansı üzerindeki etkileri
Digital number systems and arithmetic in an arbitrary radix







number systems and radix conversion
integer add, subtract, multiply, and divide
Time/space trade-offs: fast parallel arithmetic
Floating point representations and operations
Branching and the ALU
Logic işlemleri
ALU donanım dizaynı
Computer Systems Design and Architecture Second Edition
© 2004 Prentice Hall
C
S
D
A
2/e
Looking Ahead - Chapter 7
The memory subsystem of the computer




Structure of 1-bit RAM and ROM cells
RAM chips, boards, and modules
SDRAM and DDR RAM
Concept of a memory hierarchy



Virtual memory



The nature and functioning of different levels
The interaction of adjacent levels
Temporal and spatial locality are what makes it work
Cache design: matching cache & main memory
Memory as a complete system
Computer Systems Design and Architecture Second Edition
© 2004 Prentice Hall
C
S
D
A
2/e
Bölüm 7
Bilgisayarın Bellek Sistemleri




1-bit RAM ve ROM hücrelerinin yapısı
RAM chips, boards, ve modules
SDRAM ve DDR RAM
Hafıza (bellek) hiyerarşisi



Sanal Bellek (Virtual memory)



Farklı düzeydeki hafızaların yapısı ve fonksiyonları
Birleşik düzeydeki hafızaların etkileşimi
Temporal and spatial locality are what makes it work
Cache dizaynı: cache eşleşme & main memory
Bütün Sistem olarak Bellek
Computer Systems Design and Architecture Second Edition
© 2004 Prentice Hall
C
S
D
A
2/e
Looking Ahead - Chapter 8
Computer input and output: I/O







Kinds of system buses, signals and timing
Serial and parallel interfaces
Interrupts and the I/O system
Direct memory access - DMA
DMA, interrupts, and the I/O system
The hardware/software interface: device drivers
Encoding signals with error detection and correction capabilities
Computer Systems Design and Architecture Second Edition
© 2004 Prentice Hall
C
S
D
A
2/e
Bölüm 8
Computer input and output: I/O







Sistem veri yolları, sinyalleri ve zamanlama çeşitleri
Seri ve paralel ara yüzler (interfaces)
Interrupt ve I/O sistemi
Direct memory access - DMA
DMA, interrupts, ve I/O sistemi
Donanım/Yazılım ara yüzleri (interfaces): araç sürücüleri
Hata tespiti ve düzeltme için sinyal şifreleme
Computer Systems Design and Architecture Second Edition
© 2004 Prentice Hall
C
S
D
A
2/e
Looking Ahead - Chapter 9
Structure, function and performance of peripheral devices

Disk drives









Organization
Static and dynamic properties
Disk system reliability–SMART disk systems
RAID disk arrays
Video display terminals
Memory mapped video
Printers
Mouse and keyboard
Interfacing to the analog world
Computer Systems Design and Architecture Second Edition
© 2004 Prentice Hall
C
S
D
A
2/e
Bölüm 9
Çevre Birimlerinin Yapısı, Fonksiyonu ve Performansı

Disk Sürücüler









Organizasyon
Static ve dynamic özellikleri
Disk sistem güvenilirliği–SMART disk sistem
RAID disk arrays
Video görüntü terminalleri
Memory mapped video
Yazıcılar
Fare ve Klavye
Çevreyle iletişim için kullanılan ara yüzler
Computer Systems Design and Architecture Second Edition
© 2004 Prentice Hall
C
S
D
A
2/e
Looking Ahead - Chapter 10
Computer communications, networking, and the Internet




Communications protocols; layered networks
The OSI layer model
Point to point communication: RS-232 & ASCII
Local area networks - LANs



Modern serial buses: USB and FireWire
Internetworking and the Internet






Example: Ethernet, including Gigabit Ethernet
TCP/IP protocol stack
Packet routing and routers
IP addresses: assignment and use
Nets and subnets: subnet masks
Reducing wasted IP address space: CIDR, NAT, and DHCP
Internet applications and futures
Computer Systems Design and Architecture Second Edition
© 2004 Prentice Hall
C
S
D
A
2/e
Bölüm 10
Bilgisayar Haberleşmesi, Ağlar ve İnternet




Haberleşme Protokolleri; Katmanlı Ağ(Network)
OSI katmanlı model
Point to point haberleşme: RS-232 & ASCII
Local area networks - LANs



Modern seri veri yolları: USB ve FireWire
Internetworking and the Internet






Example: Ethernet, including Gigabit Ethernet
TCP/IP protocol yığını
Packet routing ve routers
IP adresleri: görevleri ve kullanımları
Nets and subnets: subnet masks
Reducing wasted IP address space: CIDR, NAT, and DHCP
İnternet uygulamaları ve geleceği
Computer Systems Design and Architecture Second Edition
© 2004 Prentice Hall
C
S
D
A
2/e
Appendices




Appendix A: Digital logic circuits
Appendix B: Complete SRC documentation
Appendix C: Assembly and assemblers
Appendix D: Selected problems and solutions
Computer Systems Design and Architecture Second Edition
© 2004 Prentice Hall
C
S
D
A
2/e
Problem Solving
There are four steps to problem solving:
1. UNDERSTAND THE PROBLEM!
2. Have an idea about how to go about solving it (pondering)
3. Show that your idea works
4. Then and only then work on the solution
Computer Systems Design and Architecture Second Edition
© 2004 Prentice Hall
C
S
D
A
2/e
Problem Çözümü
Problem çözümü 4 aşamada gerçekleştirilir:
1. PROBLEMİ ANLA!
2. Çözümün nasıl olacağı konusunda fikir elde et (düşünüp
taşınmak)
3. Çözüm fikrinin doğruluğunu göster
4. Çözüm üzerinde çalış
Computer Systems Design and Architecture Second Edition
© 2004 Prentice Hall
C
S
D
A
2/e
Chapter 1 - A Perspective



Alan Turing showed that an abstract computer, a Turing
machine, can compute any function that is computable by any
means
A general purpose computer with enough memory is
equivalent to a Turing machine
Over 50 years, computers have evolved



from memory size of 1 kiloword (1024 words) and clock periods
of 1 millisecond (0.001 s.)
to memory size of a terabyte (240 bytes) and clock periods of 100
ps. (10-12 s.) and shorter
More speed and capacity is needed for many applications,
such as real-time 3D animation, various simulations
Computer Systems Design and Architecture Second Edition
© 2004 Prentice Hall
C
S
D
A
2/e
Bölüm 1 – Bakış Açısı



Alan Turing’ e göre Turing makinesi hesaplanabilecek
herhangi bir fonksiyonu hesaplayabilen soyut bir makinedir.
Yeteri belleğe sahip bir genel amaçlı bilgisayar, bir Turing
makinesine eştir.
50 yıldan fazla sürede, bilgisayarlar
1 kiloword (1024 words) bellek boyutu ve 1 milisaniye (0.001 s)
clock period dan

Terabyte (240 bytes) bellek boyutları ile 100 ps (10-12 s) clock
period dan daha az clock periodlarına
geliştirilmiştir.


Bazı uygulamalar için daha fazla hız ve kapasiteye ihtiyaç
duyulabilir. Örneğin; gerçek-zamanlı 3D animasyonlar, vs…
Computer Systems Design and Architecture Second Edition
© 2004 Prentice Hall
C
S
D
A
2/e
Scales, Units, and Conventions
Term
Normal Usage
As a power of 2
K (kilo-)
10 3
2 10 = 1024
M (mega-)
10 6
2 20 = 1,048,576
G (giga-)
10 9
2 30 = 1,073,741,824
T (tera-)
10 12
2 40 = 1,099,511,627,776
Note the
differences
between usages.
You should commit
the powers of 2 and
10 to memory.
Term
m (milli-)
 (micro-)
n (nano-)
p (pico-)
Usage
10 -3
10 -6
Powers of 2 are
used to describe
memory sizes.
10 -9
10 -12
Units: Bit (b), Byte (B), Nibble, Word (w), Double Word, Long Word
Second (s), Hertz (Hz)
Computer Systems Design and Architecture Second Edition
© 2004 Prentice Hall
C
S
D
A
2/e
Ölçü, Birim, ve Kurallar
Terim
Normal Kullanımı
2’nin üstü olarak kullanımı
K (kilo-)
10 3
2 10 = 1024
M (mega-)
10 6
2 20 = 1,048,576
G (giga-)
10 9
2 30 = 1,073,741,824
T (tera-)
10 12
2 40 = 1,099,511,627,776
Kullanımlar
arasındaki farka
dikkat edin. Bellek
2 ve 10 un
kuvvetleri şeklinde
de ifade edilebilir.
Birim
m (milli-)
 (micro-)
n (nano-)
p (pico-)
Kullanımı
10 -3
10 -6
10 -9
10 -12
Bellek boyutu 2’nin
kuvvetleri
kullanılarak
tanımlanır.
Units: Bit (b), Byte (B), Nibble, Word (w), Double Word, Long Word
Second (s), Hertz (Hz)
Computer Systems Design and Architecture Second Edition
© 2004 Prentice Hall
C
S
Views of Computer
D
A
2/e There are various vies of computer, such as




User
Machine language programmer
Computer architect
Computer logic designer
Computer Systems Design and Architecture Second Edition
© 2004 Prentice Hall
C
S
Bilgisayar’a Bakış
D
A
2/e Bilgisayar’a pek çok bakış açısı vardır, örneğin;




Kullanıcı
Makine Dili Programcısı
Bilgisayar Mimarı
Bilgisayar logic tasarımcısı
Computer Systems Design and Architecture Second Edition
© 2004 Prentice Hall
C
S
D
A
2/e
Fig 1.1 The User’s View of a Computer
The user sees software, speed, storage capacity,
and peripheral device functionality.
Computer Systems Design and Architecture Second Edition
© 2004 Prentice Hall
C
S
D
A
2/e
Fig 1.1 Kullanıcı Gözüyle Bilgisayara Bakış
Kullanıcı yazılımı, hızı, depo kapasitesini
ve çevre birim aygıtlarının fonksiyonlarını görür.
Computer Systems Design and Architecture Second Edition
© 2004 Prentice Hall
C
S
D
A
2/e
Machine/assembly Language Programmer’s
View

Machine language:



Assembly language:



Set of fundamental instructions the machine can execute
Expressed as a pattern of 1’s and 0’s
Alphanumeric equivalent of machine language
Mnemonics more human oriented than 1’s and 0’s
Assembler:



Computer program that transliterates (one-to-one mapping)
assembly to machine language
Computer’s native language is assembly/machine language
“Programmer”, as used in this course, means
assembly/machine language programmer
Computer Systems Design and Architecture Second Edition
© 2004 Prentice Hall
C
S
D
A
2/e
Makine/assembly Dili Programcısı Gözüyle
Bilgisayara Bakış

Makine Dili:



Assembly Dili:



Makinenin işleyebileceği temel komut kümesi
1’ler ve 0’lar ile ifade edilirler
Makine dilinin alfanümerik karşılığıdır
1 ve 0 lara göre insanlar tarafından daha anlaşılırdır.
Assembler:



Assembly dilini Makine diline çeviren bilgisayar programı.
(birebir eşleme)
Bilgisayarın doğal dili assembly/makine dilidir
Bu ders için programcı denildiği zaman assembly/machine dili
programcısı anlaşılmalıdır.
Computer Systems Design and Architecture Second Edition
© 2004 Prentice Hall
C
S
D
A
2/e

Machine and Assembly Language
The assembler converts assembly language to machine language. You
must also know how to do this.
Op code
MC68000 Assembly Language
Data reg. #5
Data reg. #4
Machine Language
MOVE.W D4, D5
0011 101 000 000 100
ADDI.W #9, D2
00000001 10 111 100
0000 0000 0000 1001
Table 1.2 Two Motorola MC68000 instructions
Computer Systems Design and Architecture Second Edition
© 2004 Prentice Hall
C
S
D
A
2/e

Makine ve Assembly Dili
Assembler assembly dilini, makine diline çevirir. Bunun nasıl yapıldığını
bilmek gerekir.
Op code
MC68000 Assembly Dili
Data reg. #5
Data reg. #4
Makine Dili
MOVE.W D4, D5
0011 101 000 000 100
ADDI.W #9, D2
00000001 10 111 100
0000 0000 0000 1001
Table 1.2 İki Motorola MC68000 komutu
Computer Systems Design and Architecture Second Edition
© 2004 Prentice Hall
C
S
D
A
2/e
The Stored Program Concept
The stored program concept says that the program
is stored with data in the computer’s memory. The
computer is able to manipulate it as data
• for example, to load it from disk, move it in
memory, and store it back on disk.



It is the basic operating principle for every computer.
It is so common that it is taken for granted.
Without it, every instruction would have to be initiated manually.
Computer Systems Design and Architecture Second Edition
© 2004 Prentice Hall
C
S
D
A
2/e
Depolanmış Program İçeriği
Program, verileri ile birlikte bilgisayarın belleğine
depolanır . Bilgisayar programları veri olarak işleme
yeteneğine sahiptir.
• örneğin, programı diskden yükleme, programı
belleğe taşıma, ve tekrar diske yükleme



Bu, her bilgisayar için temel işletim prensibidir.
It is so common that it is taken for granted.
Bu olmadan, her komut manual olarak baştan başlatılmalıdır.
Computer Systems Design and Architecture Second Edition
© 2004 Prentice Hall
C
S
D
A
2/e
Fig 1.2 The Fetch-Execute Cycle
Computer Systems Design and Architecture Second Edition
© 2004 Prentice Hall
C
S
D
A
2/e
Fig 1.2 Fetch-Execute Döngüsü
Computer Systems Design and Architecture Second Edition
© 2004 Prentice Hall
C
S
D
A
2/e
Programmer’s Model:
Instruction Set Architecture (ISA)



Instruction set: the collection of all machine operations.
Programmer sees set of instructions, along with the machine
resources manipulated by them.
ISA includes




instruction set,
memory, and
programmer accessible registers of the system.
There may be temporary or scratch-pad memory used to
implement some function is not part of ISA.

“Non Programmer Accessible.”
Computer Systems Design and Architecture Second Edition
© 2004 Prentice Hall
C
S
D
A
2/e
Programcının Modeli:
Komut Kümesi Mimarisi
(Instruction Set Architecture (ISA))



Komut Kümesi: makine işlemlerinin tümü
Programcı komutların kümesini görür, along with the machine
resources manipulated by them.
ISA includes




Komut kümesi (instruction set),
Bellek ve
Programcının ulaşabileceği sistem register ları
Geçici veya scratch-pad memory ISA’nın bir parçası olmayan
bazı fonksiyonların implement edilmesinde kullanılabilir.

“Programcının ulaşamayacağı”
Computer Systems Design and Architecture Second Edition
© 2004 Prentice Hall
C
S
D
A
2/e
Generations of Microprocessors

There are various generations of microprocessors
In Fig 1.3 (next page) a comparison between some of them is
given

Points to consider when analyzing Microprocessors





Programmer’s manual
Machine instruction classes
Machine, processor, and memory states
Procedure calls and machine interrupts



Procedure calls
Machine interrupts
Exceptions
Computer Systems Design and Architecture Second Edition
© 2004 Prentice Hall
C
S
D
A
2/e
Mikroişlemcilerin Gelişimi

There are various generations of microprocessors
In Fig 1.3 (sonraki sayfa) bazı mikroişlemcilerin karşılaştırılması
verilmiştir

Mikroişlemcilerin analiz edilmesinde düşünülecek noktalar





Programcının sunduğu kullanma kılavuzu
Makine komut sınıfları
Makine, işlemci ve bellek durumları
Procedure çağırma ve makine interrupt ları



Procedure çağırma
Makine interrupt ları
Exception lar
Computer Systems Design and Architecture Second Edition
© 2004 Prentice Hall
C
S
D
A
2/e
Fig 1.3 Programmer’s Models of 4 commercial
machines
Computer Systems Design and Architecture Second Edition
© 2004 Prentice Hall
C
S
D
A
2/e
Machine, Processor, and Memory State

The Machine State:


The Processor State:


contents of all registers in system, accessible to programmer or not
registers internal to the CPU
The Memory State:



contents of registers in the memory system
“State” is used in the formal finite state machine sense
Maintaining or restoring the machine and processor state is
important to many operations, especially procedure calls and
interrupts
Computer Systems Design and Architecture Second Edition
© 2004 Prentice Hall
C
S
D
A
2/e
Makine, İşlemci, ve Bellek Durumu

Makine Durumu:


İşlemci Durumu:


sistemdeki bütün register ların içerikleri, ulaşılabilir olup olmadıkları
bilgileri
CPU’ya dahili register lar
Bellek Durumu:



bellek sistemindeki register ların içeriği
“State” is used in the formal finite state machine sense
Makine ve işlemci durumlarının sağlanması ve yenilenmesi pek çok
işlem açısından önemlidir, özellikle procedure çağırma ve interrupt
Computer Systems Design and Architecture Second Edition
© 2004 Prentice Hall
C
S
D
A
2/e
Data Type: HLL Versus Machine Language

High level language (HLL) provide type checking




Verifies proper use of variables at compile time
Allows compiler to determine memory requirements
Helps detect bad programming practices
Most machines have no type checking


The machine sees only strings of bits
Instructions interpret the strings as a type:



usually limited to signed or unsigned integers and FP #
ASCII, EBCDIC, etc
Interpretation of bits:

A given 32 bit word might be an instruction, an integer, a FP #, or four
ASCII characters
Computer Systems Design and Architecture Second Edition
© 2004 Prentice Hall
C
S Veri Tipi: Yüksek Seviyeli Diller ile Makine Dilleri
D
A
2/e  Yüksek Seviyeli Diller (HLL) type checking (tip kontrolü) sağlar




Değişkenlerin özellikleri derleme süresinde doğrulanır
Derleyicinin bellek gereksinimlerine karar vermesine izin verilir
Programlama hatalarının tespit edilmesinde yardımcı
Pek çok makine dilinde type checking yoktur


Makine sadece 0 ve 1 dizilerini tanır.
Komutlar bu dizileri tip olarak yorumlar:



usually limited to signed or unsigned integers and FP #
ASCII, EBCDIC, etc
Bit lerin yorumlanması:

Verilen 32 bitlik bir word, herhangi bir komut, tamsayı, kesirli sayı veya
4 ASCII karakteri olabilir.
Computer Systems Design and Architecture Second Edition
© 2004 Prentice Hall
C
S
D
A
2/e
Tbl 1.3 Examples of HLL to Assembly
Language Mapping

This compiler:




Maps C integers to 32 bit VAX integers
Maps C assign, *, and + to VAX MOV, MPY, and ADD
Maps C goto to VAX BR instruction
The compiler writer must develop this mapping for each
language-machine pair
Computer Systems Design and Architecture Second Edition
© 2004 Prentice Hall
C
S
D
A
2/e
Tbl 1.3 HLL den Assembly Diline Örnekler

Bu derleyici:




C deki tamsayıları 32 bitlik VAX tamsayısına karşılık geliyor
C de eşitlik, *, ve + Vax da MOV,MPY ve ADD e karşılık
geliyor
C de goto VAX da BR komutuna karşılık geliyor
Derleyici’yi programlayan bu karşılaştırmaları her dil çifti
için geliştirmelidir.
Computer Systems Design and Architecture Second Edition
© 2004 Prentice Hall
C
S
D
A
2/e
Tools of the Assembly Language Programmer




The assembler
The linker
The debugger or monitor
The development system
Computer Systems Design and Architecture Second Edition
© 2004 Prentice Hall
C
S
D
A
2/e
Assembly Dili Programcısı’nın Araçları




Assembler
Linker
Debugger veya monitor
Geliştirme sistemi
Computer Systems Design and Architecture Second Edition
© 2004 Prentice Hall
C
S
D
A
2/e
Who Uses Assembly Language?

The machine designer


The compiler writer


must generate machine language from a HLL
The writer of time or space critical code


must implement and trade-off instruction functionality
Performance goals may force program specific optimizations of the
assembly language
Special purpose or imbedded processor programmers

Special (additional) functions and heavy dependence on unique I/O
devices in embedded systems can make HLL’s useless
Computer Systems Design and Architecture Second Edition
© 2004 Prentice Hall
C
S
D
A
2/e
Assembly Dilini Kimler Kullanır?

Makine Tasarımcısı


Derleyici’ yi Yazan


HLL den makine dili geliştirilmelidir
Zaman veya depolama ile ilgili kritik kodları yazan programcılar


Komut fonksiyonlarını oluşturmalıdır
Performance goals may force program specific optimizations of the
assembly language
Özel amaçlı veya imbedded işlemci programcıları

Embeded sistemlerde özel (Ek) fonksiyonlar ve I/O birimlerindeki
yüksek derecedeki bağımlılıklar HLL kullanışsız kılabiliyor.
Computer Systems Design and Architecture Second Edition
© 2004 Prentice Hall
C
S
D
A
2/e
Key Concepts in Assembly Language
Programming


Instruction set
Programmer’s model of machine




Instruction set architecture (ISA)
Manipulation of machine’s data types
Available data types in machines
Mapping between HLL and the ISA
Computer Systems Design and Architecture Second Edition
© 2004 Prentice Hall
C
S
D
A
2/e
Assembly Programlama Dillerinde Önemli
Kavramlar


Komut Kümesi
Programcının makine modeli




Komut Kümesi Mimarisi (ISA)
Makinelerin data tiplerinin kullanılması, işlenmesi
Makinede ki uygun data tipleri
HLL ile ISA arasındaki eşleme
Computer Systems Design and Architecture Second Edition
© 2004 Prentice Hall
C
S
D
A
2/e
The Computer Architect’s View






Architect is concerned with design & performance
Designs the ISA for optimum programming utility and optimum
performance of implementation
Designs the hardware for best implementation of the instructions
Uses performance measurement tools, such as benchmark
programs, to see that goals are met
Balances performance of building blocks such as CPU, memory,
I/O devices, and interconnections
Meets performance goals at lowest cost
Computer Systems Design and Architecture Second Edition
© 2004 Prentice Hall
C
S
D
A
2/e
Bilgisayar Mimarının Bakış Açısı






Mimar, dizayn ve performans ile alakalıdır
optimum programlama faydası ve optimum performans
implementasyonu için ISA dizaynı
en iyi komut implementasyonlu donanımın dizayn edilmesi
performans hesaplama araçlarının kullanılması, mesela
benchmark programları
CPU, bellek, I/O birimleri ve bağlantıları arasındaki performansın
dengelenmesi
Performans amaçlarına en az maliyetle ulaşılması
Computer Systems Design and Architecture Second Edition
© 2004 Prentice Hall
C
S
D
A
2/e
Constraints

Constraints on optimization:






Constrained imposed by



Cost
System size
Thermal/mechanical durability
Timely availability of components
Immunity to static charge
Internal
External (corporate marketing, department of defense, etc)
Constraints may be ‘conflicting’
Computer Systems Design and Architecture Second Edition
© 2004 Prentice Hall
C
S
D
A
2/e
Kısıtlamalar

Optimizasyonda ki kısıtlamalar:






Maruz kalınan kısıtlamalar



Maliyet
Sistem boyutu
Termal/Mekanik dayanıklılık (süreklilik)
Zamana bağlı unsurlar
Static charge a bağışıklılık
İç
Dış (corporate marketing, department of defense, etc)
Karmaşadan(conflicting) doğan kısıtlamalar
Computer Systems Design and Architecture Second Edition
© 2004 Prentice Hall
C
S
D
A
2/e
The Big Picture

ISA as a bridge
CPU and memory
Buses

Examples


Computer Systems Design and Architecture Second Edition
© 2004 Prentice Hall
C
S
D
A
2/e
The Big Picture

ISA ‘ı bir köprü niteliğinde düşünebiliriz
CPU ve Bellek
Veri Yolları

Örnekler


Computer Systems Design and Architecture Second Edition
© 2004 Prentice Hall
C
S
D
A
2/e
Buses as Multiplexers





Interconnections are very important to computer
Most connections are shared
A bus is a time-shared connection or multiplexer
A bus provides a data path and control
Buses may be serial, parallel, or a combination


Serial buses transmit one bit at a time
Parallel buses transmit many bits simultaneously on many wires
Computer Systems Design and Architecture Second Edition
© 2004 Prentice Hall
C
S
D
A
2/e
Çoklayıcı niteliğinde Veri Yolları





Dahili bağlantılar bilgisayar için çok önemlidir
Pek çok bağlantı paylaşılır
Bir veri yolu zaman-paylaşımı bağlantısı veya çoklayıcıdır.
Bir veri yolu veri akışı için yol ve kontrol sağlar.
Veri yolları seri, paralel veya kombinasyonlu şekillerde olabilir


Seri veri yolları birim zamanda 1 bit transfer eder.
Paralel veri yolları pek çok biti eş zamanlı pek çok kablo
üzerinden transfer ederler
Computer Systems Design and Architecture Second Edition
© 2004 Prentice Hall
C
S
D
A
2/e
Fig 1.4 One and Two Bus Architecture
Examples
Computer Systems Design and Architecture Second Edition
© 2004 Prentice Hall
C
S
D
A
2/e
Fig 1.4 Bir ve İki Veri Yollu Mimari Örnekleri
Computer Systems Design and Architecture Second Edition
© 2004 Prentice Hall
C
S
D
A
2/e
Fig 1.5 Getting Specific:
The Apple PowerMac G4 Bus (simplified)
Computer Systems Design and Architecture Second Edition
© 2004 Prentice Hall
C
S
D
A
2/e
Fig 1.5 Getting Specific:
The Apple PowerMac G4 Veri Yolu (sadeleştirilmiş)
Computer Systems Design and Architecture Second Edition
© 2004 Prentice Hall
C
S
D
A
2/e
Fig 1.6 The Memory Hierarchy

Modern computers have a hierarchy of memories


Allows tradeoffs of speed/cost/volatility/size, etc.
CPU sees common view of levels of the hierarchy.
CPU
Cache
Memory
Computer Systems Design and Architecture Second Edition
Main Memory
Disk Memory
Tape
Memory
© 2004 Prentice Hall
C
S
D
A
2/e
Fig 1.6 Bellek Hiyerarşisi

Modern Bilgisayarlar bellek hiyerarşisine sahiptirler.


Allows tradeoffs of speed/cost/volatility/size, etc.
CPU genel hiyerarşi düzeylerini görür.
CPU
Cache
Memory
Computer Systems Design and Architecture Second Edition
Main Memory
Disk Memory
Tape
Memory
© 2004 Prentice Hall
C
S
D
A
2/e
Tools of the Architect’s Trade






Software models, simulators and emulators
Performance benchmark programs
Specialized measurement programs
Data flow and bottleneck analysis
Subsystem balance analysis
Parts, manufacturing, and testing cost analysis
Computer Systems Design and Architecture Second Edition
© 2004 Prentice Hall
C
S
D
A
2/e
Mimarın Araçları






Yazılım modelleri, simülatörler ve emülatörler
Karşılaştırmalı performans programları
Özelleştirilmiş ölçüm programları
Veri akış ve bottleneck analizi
Alt sistem denge analizi
Parça, üretim ve test etme maliyet analizi
Computer Systems Design and Architecture Second Edition
© 2004 Prentice Hall
C
S
D
A
2/e
Key Concepts: Architect’s View






Architect responsible for the overall system design and
performance
Performance must be measured against quantifiable
specifications
Architect uses various performance measurement tools
Architect is likely to become involved in low-level details
Architect often uses formal description languages to convey
details
Architect strives for harmony and balance in system design
Computer Systems Design and Architecture Second Edition
© 2004 Prentice Hall
C
S
D
A
2/e
Mimarın Bakış Açısından Önemli Noktalar






Mimar bütün sistem dizaynı ve performansından sorumludur
Performans ölçülebilir özelliklere karşı ölçülmelidir
Mimar farklı performans araçları kullanır
Mimar düşük-düzeyde detaylar ile meşgul olur
Mimar çoğu kez detayları ifade etmek için formal tanımlamalı
diller kullanır
Mimar harmonik ve dengeli bir sistem dizaynı için çabalar
Computer Systems Design and Architecture Second Edition
© 2004 Prentice Hall
C
S
D
A
2/e
Computer System Logic Designer’s View
Implementation Domain




What is implementation domain?
Designs the machine at the logic gate level
The design determines whether the architect meets cost and
performance goals
Architect and logic designer may be a single person or team
Computer Systems Design and Architecture Second Edition
© 2004 Prentice Hall
C
S
D
A
2/e
Logic Tasarımcısı’nın Bakış Açısından
Implementation Domain




Implementation domain nedir?
Makinenin logic gate düzeyinde tasarımı
Tasarım, mimarın maliyet ve performans amaçlarıyla uyuşup
uyuşmayacağına karar verir
Mimar ve Logic tasarımcı tek bir kişi veya bir takım olabilir
Computer Systems Design and Architecture Second Edition
© 2004 Prentice Hall
C
S
D
A
2/e
Implementation Domains
An implementation domain is the collection of
devices, logic levels, etc. which the designer uses.
Possible implementation domains:





VLSI on silicon
TTL or ECL chips
Gallium Arsenide chips
PLA’s or sea-of-gates arrays
Fluidic logic or optical switches
Computer Systems Design and Architecture Second Edition
© 2004 Prentice Hall
C
S
D
A
2/e
Implementation Domains
Implementation domain tasarımcının kullandığı
araçlar ve logic birimlerinin hepsidir.
Muhtemel implementation domains:





VLSI on silicon
TTL or ECL chips
Gallium Arsenide chips
PLA’s or sea-of-gates arrays
Fluidic logic or optical switches
Computer Systems Design and Architecture Second Edition
© 2004 Prentice Hall
C
Fig 1.7 Three Different Implementation
S
Domains
D
A
2/e

2-to-1 multiplexer in three different implementation domains



generic logic gates (abstract domain)
National Semiconductor FAST Advanced Schottky TTL (VLSI on Si)
Fiber optic directional coupler switch (optical signals in LiNbO3)
Computer Systems Design and Architecture Second Edition
© 2004 Prentice Hall
C
S
Fig 1.7 Üç Farklı Implementation Domain
D
A
2/e

2-to-1 çoklayıcı(multiplexer) üç farklı implementation domain içinde



generic logic gates (abstract domain)
National Semiconductor FAST Advanced Schottky TTL (VLSI on Si)
Fiber optic directional coupler switch (optical signals in LiNbO3)
Computer Systems Design and Architecture Second Edition
© 2004 Prentice Hall
C
S
D
A
2/e
The Distinction between Classical Logic Design
and Computer Logic Design

The entire computer is too complex for traditional FSM
design techniques


There is a natural separation between data and control



FSM techniques can be used “in the small”
Data path: storage cells, arithmetic, and their connections
Control path: logic that manages data path information flow
Well defined logic blocks are used repeatedly

Multiplexers, decoders, adders, etc.
Computer Systems Design and Architecture Second Edition
© 2004 Prentice Hall
C
S
D
A
2/e
Klasik Logic Dizayn ile Bilgisayar Logic Dizayn
Arasındaki Farklar

Bilgisayarın bütünü, geleneksel FSM tasarım teknikleri için
çok fazla karmaşıktır


Veri ve kontrol arasında doğal bir fark vardır



FSM teknikleri küçük boyutlarda kullanılır
Veri Yolu: storage cells, arithmetic, ve bağlantılar
Kontrol Yolu: veri yolundan bilgi akışını kontrol eder
İyi tanımlanmış logic bloklar defalarca kullanılır

Çoklayıcılar(Multiplexers), dekoderler (decoders), toplayıcılar
(adders), etc.
Computer Systems Design and Architecture Second Edition
© 2004 Prentice Hall
C
S
D
A
2/e
Two Views of the CPU PC Register
31
0
Programmer:
PC
32
32
B Bus
D
Q
A Bus
PC
Logic Designer
(Fig 1.8):
PC out
CK PC in
Computer Systems Design and Architecture Second Edition
© 2004 Prentice Hall
C
S
D
A
2/e
CPU PC Register’ın İki Farklı Şekli
31
0
Programcı:
PC
32
32
B Bus
D
Q
A Bus
PC
Logic Tasarımcı
(Fig 1.8):
PC out
CK PC in
Computer Systems Design and Architecture Second Edition
© 2004 Prentice Hall
C
S
D
A
2/e
Tools of the Logic Designer’s Trade

Computer aided design tools





Logic design and simulation packages
Printed circuit layout tools
IC (integrated circuit) design and layout tools
Logic analyzers and oscilloscopes
Hardware development system
Computer Systems Design and Architecture Second Edition
© 2004 Prentice Hall
C
S
D
A
2/e
Logic Tasarımcının Araçları

Bilgisayar yardımlı tasarım araçları





Logic tasarım ve simülasyon paketleri
Printed circuit layout tools
IC (integrated circuit) design and layout tools
Logic analizci ve osiloskop
Donanım geliştirme sistemi
Computer Systems Design and Architecture Second Edition
© 2004 Prentice Hall
C
S
D
A
2/e
Key Concepts: The Logic Designer

Logic designer works in both the domain of abstract Boolean
logic and the selected implementation domain




At the abstract logic level, the logic designer is concerned with the
correctness of the design
At the selected implementation domain level, the logic designer is
concerned with fan-in and fan-out constraints, logic minimization
techniques, power required, heat dissipation, propagation delay,
number of components, and so on
Logic designer must bounce between the abstract logic level
and the implementation level to get an optimum design
Logic designer works with logic design and minimization tools,
board layout tools, IC design tools, and hardware design tools
(such as logic analyzers, oscilloscopes, and development sys)
Computer Systems Design and Architecture Second Edition
© 2004 Prentice Hall
C
S
D
A
2/e
Logic Tasarımcı Açısından Önemli Noktalar

Logic tasarımcısı hem domain of abstract Boolean logic hem de
seçilen implementasyon alanında çalışır




abstract logic düzeyinde, tasarımcı tasarımın doğruluğu ile ilgilenir
seçilen implementation alan düzeyinde, tasarımcı fan-in and fan-out
kısıtlamaları, logic minimization teknikleri, güç gereksinimleri, heat
dissipation, propagation delay, number of components ile ilgilenir
Logic tasarımcı optimum tasarımı elde etmek için, abstract logic
level ve implementation level arasında çalışır
Logic tasarımcı logic tasarım araçları, minimization tools, board
layout araçları, IC tasarım araçları, and donanım tasarım
araçları (such as logic analyzers, oscilloscopes, and
development sys) ile çalışır
Computer Systems Design and Architecture Second Edition
© 2004 Prentice Hall
C
S
D
A
2/e
Historical Generations

Early work




Relay Computer: 1930s





Charles Babbage
George Boole
Claude Shannon
George Stibitz
S.B. Williams
G. K. Zuse
etc
Generations
Computer Systems Design and Architecture Second Edition
© 2004 Prentice Hall
C
S
D
A
2/e
Historical Generations

1st Generation:


2nd generation:


1964-75 small and medium scale integrated circuits
4th generation:


1959-64 discrete transistors and magnetic cores
3rd generation:


1946-59 vacuum tubes, relays, mercury delay lines
1975-present, single chip microcomputer
Integration scale: components per chip




Small scale: 10-100
Medium scale: 100-1,000
Large scale: 1000-10,000
Very large: greater than 10,000
Computer Systems Design and Architecture Second Edition
© 2004 Prentice Hall
C
S
D
A
2/e
Tarihsel Gelişmeler

1st Nesil:


2nd Nesil:


1964-75 small and medium scale integrated circuits
4th Nesil:


1959-64 discrete transistors and magnetic cores
3rd Nesil:


1946-59 vacuum tubes, relays, mercury delay lines
1975-present, single chip microcomputer
Entegrasyon Ölçegi: components per chip




Small scale: 10-100
Medium scale: 100-1,000
Large scale: 1000-10,000
Very large: greater than 10,000
Computer Systems Design and Architecture Second Edition
© 2004 Prentice Hall
C
S
D
A
2/e
Summary


Three different views of machine structure and function
Machine/assembly language view: registers, memory cells,
instructions.





Architect views the entire system


PC, IR,
Fetch-execute cycle
Programs can be manipulated as data
No, or almost no data typing at machine level
Concerned with price/performance, system balance
Logic designer sees system as collection of functional logic
blocks.


Must consider implementation domain
Tradeoffs: speed, power, gate fanin, fanout
Computer Systems Design and Architecture Second Edition
© 2004 Prentice Hall
C
S
D
A
2/e
ÖZET


Makine yapısı ve fonksiyonlarına 3 bakış açısı vardır
Makine/assembly Dil Bakış Açısı: registers, memory cells (bellek
hücreleri), komutlar(instructions).





Mimarın bütün siteme bakışı


PC, IR,
Fetch-execute döngüsü
Programlar veri olarak işlenir
Makine düzeyinde veri tipi yoktur
Fiyat/performans, sistem dengesi ile ilgilidir
Logic tasarımcı sistemi fonksiyonel logic blokları şeklinde görür


implementation domain’i düşünmek zorundadırlar
Tradeoffs: hız, güç, power, gate fan-in, fan-out
Computer Systems Design and Architecture Second Edition
© 2004 Prentice Hall
Download