Computer Architecture

Slides:



Advertisements
Similar presentations
Computer Architecture and Organization
Advertisements

Computer Architecture
Processor System Architecture
CSCI 4717/5717 Computer Architecture
Room: E-3-31 Phone: Dr Masri Ayob TK 2123 COMPUTER ORGANISATION & ARCHITECTURE Lecture 5: CPU and Memory.
1 Lecture 2: Review of Computer Organization Operating System Spring 2007.
TK 2123 COMPUTER ORGANISATION & ARCHITECTURE
1 Computer System Overview OS-1 Course AA
Chapter 3 System Buses.
University College Cork IRELAND Hardware Concepts An understanding of computer hardware is a vital prerequisite for the study of operating systems.
TECH CH03 System Buses Computer Components Computer Function
Computer Organization and Assembly language
More Basics of CPU Design Lecture for CPSC 5155 Edward Bosworth, Ph.D. Computer Science Department Columbus State University.
Lecture 13 - Introduction to the Central Processing Unit (CPU)
CS-334: Computer Architecture
Micro-operations Are the functional, or atomic, operations of a processor. A single micro-operation generally involves a transfer between registers, transfer.
THE COMPUTER SYSTEM. Lecture Objectives Computer functions – Instruction fetch & execute – Interrupt Handling – I/O functions Interconnections Computer.
ECE 456 Computer Architecture
CHAPTER 3 TOP LEVEL VIEW OF COMPUTER FUNCTION AND INTERCONNECTION
Top Level View of Computer Function and Interconnection.
Computer Architecture Lecture10: Input/output devices Piotr Bilski.
System bus.
2 nd Year - 1 st Semester Asst. Lect. Mohammed Salim Computer Architecture I 1.
COMPUTER ORGANIZATIONS CSNB123. COMPUTER ORGANIZATIONS CSNB123 Expected Course Outcome #Course OutcomeCoverage 1Explain the concepts that underlie modern.
General Concepts of Computer Organization Overview of Microcomputer.
Computer Architecture Lecture 2 System Buses. Program Concept Hardwired systems are inflexible General purpose hardware can do different tasks, given.
EEE440 Computer Architecture
Lecture 14 Today’s topics MARIE Architecture Registers Buses
Review Question (last week) 1.With the aid of diagrams, explain the significant difference between Von Neumann and Harvard Architecture. 1.
ECEG-3202 Computer Architecture and Organization Chapter 3 Top Level View of Computer Function and Interconnection.
Computer architecture
Computer Hardware A computer is made of internal components Central Processor Unit Internal External and external components.
Computer Architecture 2 nd year (computer and Information Sc.)
Computer Organization CDA 3103 Dr. Hassan Foroosh Dept. of Computer Science UCF © Copyright Hassan Foroosh 2002.
By Fernan Naderzad.  Today we’ll go over: Von Neumann Architecture, Hardware and Software Approaches, Computer Functions, Interrupts, and Buses.
Chapter 6: Computer Components Dr Mohamed Menacer Taibah University
Dr Mohamed Menacer College of Computer Science and Engineering, Taibah University CE-321: Computer.
Lecture 1: Review of Computer Organization
Overview von Neumann Architecture Computer component Computer function
Chapter 3 : Top Level View of Computer Functions Basic CPU function, Interconnection, Instruction Format and Interrupt.
Question What technology differentiates the different stages a computer had gone through from generation 1 to present?
Simple ALU How to perform this C language integer operation in the computer C=A+B; ? The arithmetic/logic unit (ALU) of a processor performs integer arithmetic.
Group 1 chapter 3 Alex Francisco Mario Palomino Mohammed Ur-Rehman Maria Lopez.
Processor Organization and Architecture Module III.
1 Computer Architecture. 2 Basic Elements Processor Main Memory –volatile –referred to as real memory or primary memory I/O modules –secondary memory.
Chapter 3 System Buses.  Hardwired systems are inflexible  General purpose hardware can do different tasks, given correct control signals  Instead.
Computer Architecture. Top level of Computer A top level of computer consists of CPU, memory, an I/O components, with one or more modules of each type.
Chapter 3 Top Level View of Computer Function and Interconnection
William Stallings Computer Organization and Architecture 8th Edition
ECEG-3202 Computer Architecture and Organization
MARIE: An Introduction to a Simple Computer
BIC 10503: COMPUTER ARCHITECTURE
A Top-Level View Of Computer Function And Interconnection
William Stallings Computer Organization and Architecture 7th Edition
Presentation transcript:

Computer Architecture Lecture 2: Processor, program cycle, interrupts, system bus Piotr Bilski

von Neumann Machine I/O devices Main memory CPU AC I/O AR ALU MBR I/O BR Internal bus MAR Main memory PC IR CU

Program Program is a set of instructions which, executed is a predefined order, assures processing of the information in a desired way. Instruction is a machine word, containing information about the executed instruction and memory location, where arguments, results and the next instruction are stored.

Requirements for the computer system executing program (von Neumann) Computer system should: Have finite and functionally coherent instruction list; Be able to insert program into the computer system using external devices and store instructions in the memory in the identical way as data; Store data and instructions in the memory in a way that they were equally accessible for the processor (by the addresses in the memory); Be able to process the information by sequential reading of the instructions from the memory and executing them by the processor .

Program vs hardware „program” X1 X2 X3 X4 Y1 Y2 X1 X2 X3 X4 Y1 Y2 control Hard-wired program 0000: move 4 0001: add 5 0010: store 6 0011: stop

Computer operation Interrupt execution Instruction fetching Interrupt cycle Interrupt execution Fetch cycle Execution cycle YES NO Instruction fetching Instruction execution Interrupts valid? START STOP

Register transfer language Symbols of capital letters stand for the content M – memory A, MAR etc. – register  writing ( ) – address 0:7 – range of bits of the memory word or registry, used in the operation For instance: MAR  PC MBR  M(MAR)

Instruction fetching cycle Program counter (PC) stores address of the next instruction to acquire (at the beginning it is so called entry point) Processor fetches instruction from the address pointed by PC Value of the PC is increased by 1 (unless something else is required - jump) Instruction is loaded into the instruction register (IR) Processor decodes instruction and executes operation pointed by it

Illustration of the instruction fetching cycle Entry point AC MBR Address Content Move 104 Add 105 Store 106 Stop 3 5 ALU MAR  PC PC IR CU 100 MAR ADDRESS BUS

Illustration of the instruction fetching cycle (cont.) DATA BUS MBR  M(MAR) Move 104 AC MBR Address Content Move 104 Add 105 Store 106 Stop 3 5 ALU READ PC IR CU CONTROL BUS MAR 101 ADDRESS BUS

Illustration of the instruction fetching cycle (cont.) DATA BUS Move 104 AC MBR Address Content Move 104 Add 105 Store 106 Stop 3 5 ALU PC  PC + 1 READ PC IR CU CONTROL BUS 101 MAR 100 ADDRESS BUS

Illustration of the instruction fetching cycle (cont.) DATA BUS Move 104 AC MBR Address Content Move 104 Add 105 Store 106 Stop 3 5 ALU IR  MBR Move 104 READ PC IR CU CONTROL BUS 101 MAR 100 ADDRESS BUS

Illustration of the instruction fetching cycle (cont.) DATA BUS Move 104 AC MBR Address Content Move 104 Add 105 Store 106 Stop 3 5 ALU CU  IR Move 104 READ PC IR CU CONTROL BUS 101 MAR 100 ADDRESS BUS

Instruction execution cycle Processor-memory data transfer between CPU and memory Processor – input/output data transfer between CPU and input/output module Data processing Arithmetic or logical operations on the data Change of the instruction execution order (for example, jump) Control Combination of the above

Illustration of the instruction execution cycle (cont.) Data BUS MBR  M(104) 3 AC MBR Address Content Move 104 Add 105 Store 106 Stop 3 5 AC  MBR ALU MAR  IR(104) Move 104 READ PC IR CU CONTROL BUS 101 MAR 104 104 ADDRESS BUS

Next instruction fetching cycle DATA BUS MBR  M(101) Add 105 AC MBR Address Content Move 104 Add 105 Store 106 Stop 3 5 ALU MAR  PC READ PC IR CU CONTROL BUS 101 MAR 101 ADDRESS BUS

Next instruction fetching cycle (cont.) DATA BUS Add 105 AC MBR Address Content Move 104 Add 105 Store 106 Stop 3 5 ALU IR  MBR CU  IR Add 105 READ PC IR CU CONTROL BUS 101 MAR 101 ADDRESS BUS

Instruction format instruction argument 0 3 4 15 Operation code Address 0 1 15 Size Sign instruction argument For example Move 104 - 0101000001101000

State graph of the instruction cycle Calculate argument addr. Fetching argument Fetch instr. Many arguments Many results Instr. decode Calculate instr. address Calculate argument addr. Data operation Saving argument No interrupts Return to data Instruction executed, fetch the next one Check for interrupts Interrupt execution

Interrupts Mechanism allowing to disturb the original execution order by the other system components Programmed For example, overflow, divide by zero Clock-generated Generated by the internal processor clock Used for process scheduling Input/Output From the I/O controller Hardware failure Memory parity error

Application of the interrupts User program I/O program User program I/O Program 1 1 4 4 WRITE WRITE I/O instruction I/O instruction 2a @ 2b 2 Interrupt execution program 5 WRITE WRITE Stop 3a @ 3b 5 3 Stop

Interrupt cycle Processor checks periodically, if the interrupt ocurred It is shown by the interrupt signal If no interrupt occured, the next instruction is fetched If the interrupt occured: The executed program is suspended Its context is saved Program counter is set to the address of the first instruction of the interrupt execution program Interrupt is processed After that, the previous context is loaded to the CPU and the user program is executed from the point it was suspended

Multiple interrupts Two ways of the multiple interrupts execution exist Blocked interrupts Processor ignores other interrupts while the current interrupt is processed Interrupts are queued and after the current interrupt is processed, the next one (if exists) is processed Interrupts are executed in the sequence they occured Priorities Execution of the low priority interrupt can be suspended by the higher priority interrupt After execution of the higher priority interrupt the execution of the low priority interrupt is continued

Multiple interrupts execution Sequential execution Priority execution User program Interrupt nr 1 User program Interrupt nr 1 Interrupt nr 2 Interrupt nr 2

Example of the interrupts assignment

Data flow in the computer modules read write MEMORY ADRESS N words DATA DATA read write INPUT / OUTPUT MODULE Internal data ADRESS External data Internal data M ports INT. External data INSTR. ADRESS PROCESSOR DATA DATA INT. INT.

BUS The highway to allow communication between the devices Includes multiple trails of the three types: data, address and control Breadth of the bus is the maximum number of bits, which can be transferred between the modules

The main buses ISA (1985) PCI (1993) AGP 1x/2x (1997-1998) PCI Express (2004) SCSI (1979) Industrial busses (PROFIBUS, IEC-625)

Buses bandwidth

How does it work? Communication between the two modules Sending data: 1. Accessing the bus 2. transferring the data Receiving data: 3. Accessing the bus 4. Informing about the need to acquire data (using control lines) 5. Awaiting the incoming data

„Flat” bus structure (ISA)

Hierarchical bus structure

Buses categories Application Specialized Multiplexed Arbitration method Centralized Distributed Time synchronization Synchronous Asynchronous

Synchronous coordination

Asynchronous coordination Read

Asynchronous coordination Write

PCI bus Proposed by Intel in 1990 Work frequency: 66 MHz Works in 32 or 64-bit configuration Communication between the processor and the memory using bridges Valid signal lines: system (np. clock, reset) Address and data (32) Interface control Arbitration (individual!) Error information

PCI bus read

PCI bus arbitrage

PCI Express bus Parallel bus architecture Introducing switches Backward compatibility with PCI Scaleable bandwidth of the bus – from 1x to 32x (depending on the used channels/slots) Speed of 250 MB/s for the single slot (for the graphic card 16x PCIe it is 4 GB/s)

PCI Express computer architecture