İnformasiya texnologiyaları kafedrası Mövzu № 1. Fərdi kompüterin mikroprosessorlarının arxitekturasının əsas istiqamətləri. (Hesablamanın konveyerləşdirilməsi.

Slides:



Advertisements
Similar presentations
CPU Structure and Function
Advertisements

CSCI 4717/5717 Computer Architecture
Computer Organization and Architecture
Processor structure and function
Chapter 12 CPU Structure and Function. CPU Sequence Fetch instructions Interpret instructions Fetch data Process data Write data.
Computer Organization and Architecture
Computer Organization and Architecture
Chapter 1 Computer System Overview Patricia Roy Manatee Community College, Venice, FL ©2008, Prentice Hall Operating Systems: Internals and Design Principles,
1 Lecture 2: Review of Computer Organization Operating System Spring 2007.
Computer Organization and Architecture The CPU Structure.
Chapter 12 Pipelining Strategies Performance Hazards.
Computer System Overview
Pipelining Fetch instruction Decode instruction Calculate operands (i.e. EAs) Fetch operands Execute instructions Write result Overlap these operations.
Computer System Overview
Chapter 12 CPU Structure and Function. Example Register Organizations.
RICARFENS AUGUSTIN JARED COELLO OSVALDO QUINONES Chapter 12 Processor Structure and Function.
Group 5 Alain J. Percial Paula A. Ortiz Francis X. Ruiz.
CH12 CPU Structure and Function
5-Stage Pipelining Fetch Instruction (FI) Fetch Operand (FO) Decode Instruction (DI) Write Operand (WO) Execution Instruction (EI) S3S3 S4S4 S1S1 S2S2.
Chapter 1 Computer System Overview Patricia Roy Manatee Community College, Venice, FL ©2008, Prentice Hall Operating Systems: Internals and Design Principles,
PART 4: (1/2) Central Processing Unit (CPU) Basics CHAPTER 14: P ROCESSOR S TRUCTURE AND F UNCTION.
Group 5 Tony Joseph Sergio Martinez Daniel Rultz Reginald Brandon Haas Emmanuel Sacristan Keith Bellville.
Computer Systems Overview. Page 2 W. Stallings: Operating Systems: Internals and Design, ©2001 Operating System Exploits the hardware resources of one.
Edited By Miss Sarwat Iqbal (FUUAST) Last updated:21/1/13
CPU Design and PipeliningCSCI 4717 – Computer Architecture CSCI 4717/5717 Computer Architecture Topic: CPU Operations and Pipelining Reading: Stallings,
Presented by: Sergio Ospina Qing Gao. Contents ♦ 12.1 Processor Organization ♦ 12.2 Register Organization ♦ 12.3 Instruction Cycle ♦ 12.4 Instruction.
Operating Systems and Networks AE4B33OSS Introduction.
Ihr Logo Operating Systems Internals & Design Principles Fifth Edition William Stallings Chapter 1 Computer System Overview.
ECE 456 Computer Architecture Lecture #14 – CPU (III) Instruction Cycle & Pipelining Instructor: Dr. Honggang Wang Fall 2013.
COMPUTER ORGANIZATION AND ASSEMBLY LANGUAGE Lecture 21 & 22 Processor Organization Register Organization Course Instructor: Engr. Aisha Danish.
Processor Structure and Function Chapter8:. CPU Structure  CPU must:  Fetch instructions –Read instruction from memory  Interpret instructions –Instruction.
Lecture 1: Review of Computer Organization
Question What technology differentiates the different stages a computer had gone through from generation 1 to present?
PART 4: (1/2) Central Processing Unit (CPU) Basics CHAPTER 12: P ROCESSOR S TRUCTURE AND F UNCTION.
Processor Organization
CPU Design and Pipelining – Page 1CSCI 4717 – Computer Architecture CSCI 4717/5717 Computer Architecture Topic: CPU Operations and Pipelining Reading:
1 Computer Architecture. 2 Basic Elements Processor Main Memory –volatile –referred to as real memory or primary memory I/O modules –secondary memory.
Computer Systems Overview. Lecture 1/Page 2AE4B33OSS W. Stallings: Operating Systems: Internals and Design, ©2001 Operating System Exploits the hardware.
Memory MAR Control unit MBR PC IR Figure 1 Data flow, fetch cycle Address Data Control Bus Bus Bus.
İnformasiya texnologiyaları kafedrası Mövzu № 7. Ünvanlaşdırma üsulları. (Ünvanlaşdırma rejimləri. Bilavasitə ünvanlaşdırma. Birbaşa ünvanlaşdırma. Registrli.
1 Computer System Overview Chapter 1. 2 Operating System Exploits the hardware resources of one or more processors Provides a set of services to system.
Chapter 12 Processor Structure and Function. Central Processing Unit CPU architecture, Register organization, Instruction formats and addressing modes(Intel.
Chapter 1 Computer System Overview
Computer Architecture Chapter (14): Processor Structure and Function
William Stallings Computer Organization and Architecture 8th Edition
Parallel Processing - introduction
Processor Organization and Architecture
Central Processing Unit CPU
Computer Organization and ASSEMBLY LANGUAGE
Computer Architecture
Computer Organization and Architecture Designing for Performance
Chapter 1 Computer System Overview
William Stallings Computer Organization and Architecture 10th Edition
CPU Structure and Function
Chapter 11 Processor Structure and function
COMPUTER ORGANIZATION AND ARCHITECTURE
Presentation transcript:

İnformasiya texnologiyaları kafedrası Mövzu № 1. Fərdi kompüterin mikroprosessorlarının arxitekturasının əsas istiqamətləri. (Hesablamanın konveyerləşdirilməsi. Sinxron xətti konveyerlər. Konveyerlərin effektivliyinin ölçülməsi. Qeyri-xətti konveyerlər. Əmrlər konveyeri. Keçid nöqtəsindən əmrlərin seçilməsi. Şərti keçidin problemlərinin həlli metodları. Keçidlərin təxmin edilməsi. Superkonveyerli prosessorlar. Superskalyar prosessorlar.) KOMPÜTERİN TƏŞKİLİ VƏ TEXNOLOGİYALARI (Computer Organization & Technologies) Azər Fərhad oğlu Həsənov iş nömrəsi: , 24-20

Mövzu № 1. Fərdi kompüterin mikroprosessorlarının arxitekturasının əsas istiqamətləri. Hesablamanın konveyerləşdirilməsi. Sinxron xətti konveyerlər. Konveyerlərin effektivliyinin ölçülməsi. Qeyri-xətti konveyerlər. Əmrlər konveyeri. Keçid nöqtəsindən əmrlərin seçilməsi. Şərti keçidin problemlərinin həlli metodları. Keçidlərin qabaqcadan bildirilməsi. Superkonveyerli prosessorlar. Superskalyar prosessorlar.

Hesablamanın konveyerləşdirilməsi FIFO (First In, First Out)

Sinxron xətti konveyerlər

Konveyerlərin effektivliyinin ölçülməsi sürətlənmə effektivlik məhsuldarlıq

Konveyerlərin effektivliyinin ölçülməsi

Qeyri-xətti konveyerlər Konveyer heçdə hər zaman etapların xətti zənciri şəkilində olmur. Funksional blokların özləri arasında ardıcıl qoşulmaması, emal məntiqinə uyğun qoşulması vəziyyətdən asılı olaraq sərfəli ola bilər. Bununla birlikdə, bəzi bloklar istifadə olunmaya bilər, digərləri isə dövrü struktur əmələ gətirə bilər. Bu eyni bir konveyerin köməyi ilə birdən çox funksiyanın eyni vaxtda hesablanmasına imkan verir. Ancaq funksiyaların özləri arasında ziddiyyət (konflikt) yaranarsa, onda, konveyeri bütünlüklə yükləmək çətin olur. Şəkil 1.2.-də eyni vaxtda iki X və Y funksiyalarını hesablayan qeyri-xətti konveyer göstərilmişdir.

Əmrlər konveyeri əmrlərin seçimi (ƏS); əmrlərin dekodlaşdırılması (ƏD); icraedici ünvanların hesablanması (ÜH); operandların seçimi (OS); əməliyyatların yerinə yetirilməsi (ƏY); nəticələrin yazılması (NY); növbəti əmrin ünvanının formalaşdırılması (NƏÜF) Hesablama maşınlarının arxitekturasında çoxlu sayda obyekt tapmaq olar ki, onlarda olan konveyerləşdirmə HM məhsuldarlığının artırılmasını təmin edir. Buna misal olaraq əməliyyat qurğusunu və yaddaşı göstərmək olar. Bunlardan əlavə maşın dövrlərinin etaplarının konveyerləşdirilməsinin təsirinin daha effektli olmasını hiss etmək olar. Əmrlər konveyeri ideyası 1956-cı ildə akademik S. A. Lebedev (Серге́й Алексе́евич Ле́бедев) tərəfindən təklif edilmişdir. Məlum olduğu kimi, əmrlər dövrü özlüyündə etaplar ardıcıllığıdır.Серге́й Алексе́евич Ле́бедев

Əmrlər konveyeri

Keçid nöqtəsindən əmrlərin seçilməsi əmrin dekodlaşdırılması pilləsində keçidin icraedici ünvanın hesablanması; keçidin ünvanları buferinin istifadəsi; keçid nöqtəsində yerləşən əmrlərin yadda saxlanması üçün olan keş- yaddaşdan istifadə edilməsi; dövr buferindən istifadə edilməsi. Keş-yaddaşlı keçidin ünvanları buferi (BTB, Branch Target Bufer) Keçid nöqtəsində yerləşən əmrlərin keş-yaddaşı (BTIC, Branch Target Instruction Cache HM arasında dövrün buferinin relizasiyasına görə CDC (Star 100, 6600, 7600) firmasının bir neçə maşınını və super EHM CRAY-1 göstərmək olar. Dövrü buferin xüsusiləşdirilmiş versiyası Motorola mikroprosessorunda realizasiya olunmuşdur. Bu mikroprosessorun tərkibindəki xüsusiləşdirilmiş dövrü buferə “azalma və şərtə görə keçid” əmri daxil edilmişdir.

Şərti keçidin problemlərinin həlli metodları Keçid nöqtəsinin icraedici ünvanının hesablanması aspektinin əhəmiyyətinə baxmayaraq HM layihələndirənlər əsas güclərini şərtli keçidin problemlərinin həllinə yönəldiblər. Belə ki, əsasən şərtli keçidlər konveyerin işində ləngimələrə səbəb olur. Bu ləngimələrin aradan qaldırılması və ya hissə-hissə azaldılması üçün müxtəlif üsullar təklif olunmuşdur. Bunlardan daha aktualı keçidlərin qabaqcadan bildirilməsi üsuludur.

Keçidlərin qabaqcadan bildirilməsi (Branch predictor) Keçidlərin statik qabaqcadan bildirilməsi; Keçidlərin dinamik qabaqcadan bildirilməsi.

Superkonveyerli prosessorlar

Superskalyar prosessorlar

+ William Stallings Computer Organization and Architecture 9 th Edition

+ Chapter 14 Processor Structure and Function

+ Processor Organization Fetch instruction The processor reads an instruction from memory (register, cache, main memory) Interpret instruction The instruction is decoded to determine what action is required Fetch data The execution of an instruction may require reading data from memory or an I/O module Process data The execution of an instruction may require performing some arithmetic or logical operation on data Write data The results of an execution may require writing data to memory or an I/O module In order to do these things the processor needs to store some data temporarily and therefore needs a small internal memory Processor Requirements:

CPU With the System Bus

CPU Internal Structure

+ Register Organization Enable the machine or assembly language programmer to minimize main memory references by optimizing use of registers Used by the control unit to control the operation of the processor and by privileged operating system programs to control the execution of programs User-Visible RegistersControl and Status Registers Within the processor there is a set of registers that function as a level of memory above main memory and cache in the hierarchy The registers in the processor perform two roles:

User-Visible Registers Referenced by means of the machine language that the processor executes General purpose Can be assigned to a variety of functions by the programmer Data May be used only to hold data and cannot be employed in the calculation of an operand address Address May be somewhat general purpose or may be devoted to a particular addressing mode Examples: segment pointers, index registers, stack pointer Condition codes Also referred to as flags Bits set by the processor hardware as the result of operations Categories:

Table 14.1 Condition Codes

+ Control and Status Registers Program counter (PC) Contains the address of an instruction to be fetched Instruction register (IR) Contains the instruction most recently fetched Memory address register (MAR) Contains the address of a location in memory Memory buffer register (MBR) Contains a word of data to be written to memory or the word most recently read Four registers are essential to instruction execution:

+ Program Status Word (PSW) Register or set of registers that contain status information Common fields or flags include: Sign Zero Carry Equal Overflow Interrupt Enable/Disable Supervisor

ExampleMicroprocessor Register Organizations

Instruction Cycle Includes the following stages: Fetch Read the next instruction from memory into the processor Execute Interpret the opcode and perform the indicated operation Interrupt If interrupts are enabled and an interrupt has occurred, save the current process state and service the interrupt

Instruction Cycle

Instruction Cycle State Diagram

Data Flow, Fetch Cycle

Data Flow, Indirect Cycle

Data Flow, Interrupt Cycle

Pipelining Strategy Similar to the use of an assembly line in a manufacturing plant New inputs are accepted at one end before previously accepted inputs appear as outputs at the other end To apply this concept to instruction execution we must recognize that an instruction has a number of stages

Two-Stage Instruction Pipeline

+ Additional Stages Fetch instruction (FI) Read the next expected instruction into a buffer Decode instruction (DI) Determine the opcode and the operand specifiers Calculate operands (CO) Calculate the effective address of each source operand This may involve displacement, register indirect, indirect, or other forms of address calculation Fetch operands (FO) Fetch each operand from memory Operands in registers need not be fetched Execute instruction (EI) Perform the indicated operation and store the result, if any, in the specified destination operand location Write operand (WO) Store the result in memory

Timing Diagram for Instruction Pipeline Operation

The Effect of a Conditional Branch on Instruction Pipeline Operation

+ Six Stage Instruction Pipeline

+ Alternative Pipeline Depiction

+ Speedup Factors with Instruction Pipelining

Pipeline Hazards Occur when the pipeline, or some portion of the pipeline, must stall because conditions do not permit continued execution Also referred to as a pipeline bubble There are three types of hazards: Resource Data Control

+ Resource Hazards A resource hazard occurs when two or more instructions that are already in the pipeline need the same resource The result is that the instructions must be executed in serial rather than parallel for a portion of the pipeline A resource hazard is sometimes referred to as a A resource hazard is sometimes referred to as a structural hazard

+ Data Hazards A data hazard occurs when there is a conflict in the access of an operand location RAW Hazard

+ Types of Data Hazard Read after write (RAW), or true dependency An instruction modifies a register or memory location Succeeding instruction reads data in memory or register location Hazard occurs if the read takes place before write operation is complete Write after read (WAR), or antidependency An instruction reads a register or memory location Succeeding instruction writes to the location Hazard occurs if the write operation completes before the read operation takes place Write after write (WAW), or output dependency Two instructions both write to the same location Hazard occurs if the write operations take place in the reverse order of the intended sequence

+ Control Hazard Also known as a branch hazard Occurs when the pipeline makes the wrong decision on a branch prediction Brings instructions into the pipeline that must subsequently be discarded Dealing with Branches: Multiple streams Prefetch branch target Loop buffer Branch prediction Delayed branch

Multiple Streams A simple pipeline suffers a penalty for a branch instruction because it must choose one of two instructions to fetch next and may make the wrong choice A brute-force approach is to replicate the initial portions of the pipeline and allow the pipeline to fetch both instructions, making use of two streams Drawbacks: With multiple pipelines there are contention delays for access to the registers and to memory Additional branch instructions may enter the pipeline before the original branch decision is resolved

+ Prefetch Branch Target When a conditional branch is recognized, the target of the branch is prefetched, in addition to the instruction following the branch Target is then saved until the branch instruction is executed If the branch is taken, the target has already been prefetched IBM 360/91 uses this approach

+ Loop Buffer Small, very-high speed memory maintained by the instruction fetch stage of the pipeline and containing the n most recently fetched instructions, in sequence Benefits: Instructions fetched in sequence will be available without the usual memory access time If a branch occurs to a target just a few locations ahead of the address of the branch instruction, the target will already be in the buffer This strategy is particularly well suited to dealing with loops Similar in principle to a cache dedicated to instructions Differences: The loop buffer only retains instructions in sequence Is much smaller in size and hence lower in cost

Loop Buffer

+ Branch Prediction Various techniques can be used to predict whether a branch will be taken: 1.Predict never taken 2.Predict always taken 3.Predict by opcode 1.Taken/not taken switch 2.Branch history table These approaches are static They do not depend on the execution history up to the time of the conditional branch instruction These approaches are dynamic They depend on the execution history

+ Branch Prediction Flow Chart

Branch Prediction State Diagram

+ Dealing With Branches

+ Intel Pipelining Fetch Objective is to fill the prefetch buffers with new data as soon as the old data have been consumed by the instruction decoder Operates independently of the other stages to keep the prefetch buffers full Decode stage 1 All opcode and addressing-mode information is decoded in the D1 stage 3 bytes of instruction are passed to the D1 stage from the prefetch buffers D1 decoder can then direct the D2 stage to capture the rest of the instruction Decode stage 2 Expands each opcode into control signals for the ALU Also controls the computation of the more complex addressing modes Execute Stage includes ALU operations, cache access, and register update Write back Updates registers and status flags modified during the preceding execute stage

Instruction Pipeline Examples

+ Summary Processor organization Register organization User-visible registers Control and status registers Instruction cycle The indirect cycle Data flow The x86 processor family Register organization Interrupt processing Instruction pipelining Pipelining strategy Pipeline performance Pipeline hazards Dealing with branches Intel pipelining The Arm processor Processor organization Processor modes Register organization Interrupt processing Chapter 14 Processor Structure and Function

Növbəti mühazirənin mövzusu Mövzu № 2. CISC və RISC tipli mikroprosessorlar. ( Prosessorların arxitekturası. CISC arxitekturalı prosessorlar. RISC arxitekturalı prosessorlar. Çoxnüvəli prosessorların arxitekturası. )