Introduction COE 301 Computer Organization Prof. Muhamed Mudawar Computer Engineering Department King Fahd University of Petroleum and Minerals.

Slides:



Advertisements
Similar presentations
TU/e Processor Design 5Z0321 Processor Design 5Z032 Computer Systems Overview Chapter 1 Henk Corporaal Eindhoven University of Technology 2011.
Advertisements

EEE226 MICROPROCESSORBY DR. ZAINI ABDUL HALIM School of Electrical & Electronic Engineering USM.
Computers Organization & Assembly Language Chapter 1 THE 80x86 MICROPROCESSOR.
Introduction ICS 233 Computer Architecture and Assembly Language
Basic Concepts Computer Organization & Assembly Language Programming
Basic Concepts COE 205 Computer Organization and Assembly Language
Computer Architecture Instructor: Wen-Hung Liao Office: 大仁樓三樓 Office hours: TBA Course web page:
1  1998 Morgan Kaufmann Publishers Lectures for 2nd Edition Note: these lectures are often supplemented with other materials and also problems from the.
Introduction ICS 233 Computer Architecture and Assembly Language
EET 4250: Chapter 1 Performance Measurement, Instruction Count & CPI Acknowledgements: Some slides and lecture notes for this course adapted from Prof.
CS / Schlesinger Lec1.1 1/20/99©UCB Spring 1999 Computer Architecture Lecture 1 Introduction and Five Components of a Computer Spring, 1999 Arie Schlesinger.
CIS 314 : Computer Organization Lecture 1 – Introduction.
Chip Manufacturing Process
CS1104: Computer Organisation
GCSE Computing - The CPU
ECE 232 L1 Intro.1 Adapted from Patterson 97 ©UCBCopyright 1998 Morgan Kaufmann Publishers ECE 232 Hardware Organization and Design Lecture 1 Introduction.
Chapter 6 Memory and Programmable Logic Devices
Chapter 1 Sections 1.1 – 1.3 Dr. Iyad F. Jafar Introduction.
Introduction to Computer Architecture SCHOOL OF ELECTRICAL AND COMPUTER ENGINEERING SUMMER 2015 RAMYAR SAEEDI.
COM181 Computer Hardware Ian McCrumRoom 5B18,
Chapter 1 CSF 2009 Computer Abstractions and Technology.
C.S. Choy95 COMPUTER ORGANIZATION Logic Design Skill to design digital components JAVA Language Skill to program a computer Computer Organization Skill.
An Introduction Chapter Chapter 1 Introduction2 Computer Systems  Programmable machines  Hardware + Software (program) HardwareProgram.
Computer Architecture ECE 4801 Berk Sunar Erkay Savas.
Introduction to Computer Architecture
CS-2710 Computer Organization Dr. Mark L. Hornick web: faculty-web.msoe.edu/hornick – CS-2710 info syllabus, homework, labs… –
 Design model for a computer  Named after John von Neuman  Instructions that tell the computer what to do are stored in memory  Stored program Memory.
EET 4250: Chapter 1 Computer Abstractions and Technology Acknowledgements: Some slides and lecture notes for this course adapted from Prof. Mary Jane Irwin.
Computers organization & Assembly Language Chapter 0 INTRODUCTION TO COMPUTING Basic Concepts.
Sogang University Advanced Computing System Chap 1. Computer Architecture Hyuk-Jun Lee, PhD Dept. of Computer Science and Engineering Sogang University.
1 Embedded Systems Computer Architecture. Embedded Systems2 Memory Hierarchy Registers Cache RAM Disk L2 Cache Speed (faster) Cost (cheaper per-byte)
CS/ECE 3330 Computer Architecture Kim Hazelwood Fall 2009.
C OMPUTER O RGANIZATION AND D ESIGN The Hardware/Software Interface 5 th Edition Chapter 1 Computer Abstractions and Technology Sections 1.5 – 1.11.
Computer Organization and Design Computer Abstractions and Technology
CS35101 Computer Architecture Spring 2006 Week 1 Slides adapted from: Mary Jane Irwin ( Course url:
Programming for GCSE Topic 5.1: Memory and Storage T eaching L ondon C omputing William Marsh School of Electronic Engineering and Computer Science Queen.
Chapter 1 Computer Abstractions and Technology. Chapter 1 — Computer Abstractions and Technology — 2 The Computer Revolution Progress in computer technology.
Computer Organization & Assembly Language © by DR. M. Amer.
1 ECE3055 Computer Architecture and Operating Systems Lecture 1 Introduction Prof. Hsien-Hsin Sean Lee School of Electrical and Computer Engineering Georgia.
Introduction COE 301 / ICS 233 Computer Architecture and Assembly Language College of Computer Sciences and Engineering King Fahd University of Petroleum.
12/13/ _01 1 Computer Organization EEC-213 Computer Organization Electrical and Computer Engineering.
Computer Organization Instructors Course By: Lecturer: Shimaa Ibrahim Hassan TA: Eng: Moufeda Hussien Lecture: 9:45 Address:
Chapter 1 Computer Abstractions and Technology. Chapter 1 — Computer Abstractions and Technology — 2 The Computer Revolution Progress in computer technology.
1 chapter 1 Computer Architecture and Design ECE4480/5480 Computer Architecture and Design Department of Electrical and Computer Engineering University.
August 27 Books? ? Accounts?. What does a computer look like? Tape drives? Big box with lots of lights? Display with huge letters? Little box with.
Succeeding with Technology Chapter 2 Hardware Designed to Meet the Need The Digital Revolution Integrated Circuits and Processing Storage Input, Output,
DR. SIMING LIU SPRING 2016 COMPUTER SCIENCE AND ENGINEERING UNIVERSITY OF NEVADA, RENO Session 2 Computer Organization.
COMPUTER ARCHITECTURE & OPERATIONS I Instructor: Yaohang Li.
Basic Concepts Computer Organization & Assembly Language Programming Instructor: Maram Alsahafi [Some of the contents Adapted from slides Dr Adnan Gutub,
Computer Organization Yasser F. O. Mohammad 1. 2 Lecture 1: Introduction Today’s topics:  Why computer organization is important  Logistics  Modern.
Introduction Computer Organization Spring 1436/37H (2015/16G) Dr. Mohammed Sinky Computer Architecture
Chapter 1 Computer Abstractions and Technology. Chapter 1 — Computer Abstractions and Technology — 2 The Computer Revolution Progress in computer technology.
Computer Operation. Binary Codes CPU operates in binary codes Representation of values in binary codes Instructions to CPU in binary codes Addresses in.
Computer Architecture & Operations I
Computer Architecture & Operations I
Microprocessor and Assembly Language
Morgan Kaufmann Publishers
COMPUTER ORGANZIATION AND ASSEMBLY LANGUAGE
Basic Computer Organization
COSC 3406: Computer Organization
Introduction to Computer Architecture
Morgan Kaufmann Publishers
T Computer Architecture, Autumn 2005
COMS 361 Computer Organization
Introduction to Computer Architecture
Introduction COE 301 Computer Organization
Computer Architecture
Introduction COE 301 Computer Organization Prof. Aiman El-Maleh
ICS103 Programming in C 1: Overview of Computers And Programming
Presentation transcript:

Introduction COE 301 Computer Organization Prof. Muhamed Mudawar Computer Engineering Department King Fahd University of Petroleum and Minerals

IntroductionCOE 301 – Computer Organization - KFUPM© Muhamed Mudawar – slide 2 Presentation Outline  Welcome to COE 301  High-Level, Assembly-, and Machine-Languages  Components of a Computer System  Chip Manufacturing Process  Technology Improvements  Programmer's View of a Computer System

IntroductionCOE 301 – Computer Organization - KFUPM© Muhamed Mudawar – slide 3 Welcome to COE 301  Instructor:Dr. Muhamed F. Mudawar  Office:Building 22, Room 328  Office Phone:4642  Schedule and Office Hours:   Course Web Page:   

IntroductionCOE 301 – Computer Organization - KFUPM© Muhamed Mudawar – slide 4 Which Textbook will be Used?  Computer Organization & Design: The Hardware/Software Interface  Fourth Edition  David Patterson and John Hennessy  Morgan Kaufmann Publishers, 2009  Read the textbook in addition to slides

IntroductionCOE 301 – Computer Organization - KFUPM© Muhamed Mudawar – slide 5 Grading Policy  Laboratory15%  Quizzes10%  Programming Assignments10%  CPU Design Project15%  Midterm Exam I15%  Midterm Exam II15%  Final Exam20%

IntroductionCOE 301 – Computer Organization - KFUPM© Muhamed Mudawar – slide 6 Late Policy, Attendance, & Makeup  Late assignment or project is accepted up to 2 days late  But will be penalized 5% for each late day  Attendance will be taken at the beginning of each lecture  Official / medical excuses must be presented within one week  Late attendance is counted as half presence  Two late attendances are counted as one absence  No makeup exam will be given for missing exam or quiz

IntroductionCOE 301 – Computer Organization - KFUPM© Muhamed Mudawar – slide 7 Software Tools  MIPS Simulators  MARS: MIPS Assembly and Runtime Simulator  Runs MIPS-32 assembly language programs  Website:  SPIM  Also Runs MIPS-32 assembly language programs  Website:  CPU Design and Simulation Tool  Logisim  Educational tool for designing and simulating CPUs  Website:

IntroductionCOE 301 – Computer Organization - KFUPM© Muhamed Mudawar – slide 8 Course Learning Outcomes  Towards the end of this course, you should be able to …  Describe the instruction set architecture of a MIPS processor  Analyze, write, and test MIPS assembly language programs  Describe organization/operation of integer & floating-point units  Design the datapath and control of a single-cycle CPU  Design the datapath/control of a pipelined CPU & handle hazards  Describe the organization/operation of memory and caches  Analyze the performance of processors and caches  Required Background  Ability to program confidently in Java or C  Ability to design a combinational and sequential circuit

IntroductionCOE 301 – Computer Organization - KFUPM© Muhamed Mudawar – slide 9 Next...  Welcome to COE 301  High-Level, Assembly-, and Machine-Languages  Components of a Computer System  Chip Manufacturing Process  Technology Improvements  Programmer's View of a Computer System

IntroductionCOE 301 – Computer Organization - KFUPM© Muhamed Mudawar – slide 10 Some Important Questions to Ask  What is Assembly Language?  What is Machine Language?  How is Assembly related to a high-level language?  Why Learn Assembly Language?  What is an Assembler, Linker, and Debugger?

IntroductionCOE 301 – Computer Organization - KFUPM© Muhamed Mudawar – slide 11 A Hierarchy of Languages Application Programs High-Level Languages Assembly Language Machine Language Hardware High-Level Language Low-Level Language Machine independent Machine specific

IntroductionCOE 301 – Computer Organization - KFUPM© Muhamed Mudawar – slide 12 Assembly and Machine Language  Machine language  Native to a processor: executed directly by hardware  Instructions consist of binary code: 1s and 0s  Assembly language  Slightly higher-level language  Readability of instructions is better than machine language  One-to-one correspondence with machine language instructions  Assemblers translate assembly to machine code  Compilers translate high-level programs to machine code  Either directly, or  Indirectly via an assembler

IntroductionCOE 301 – Computer Organization - KFUPM© Muhamed Mudawar – slide 13 Compiler and Assembler

IntroductionCOE 301 – Computer Organization - KFUPM© Muhamed Mudawar – slide 14 MIPS Assembly Language: sll $2,$5, 2 add $2,$4,$2 lw $15,0($2) lw $16,4($2) sw $16,0($2) sw $15,4($2) jr $31 Compiler Translating Languages Program (C Language): swap(int v[], int k) { int temp; temp = v[k]; v[k] = v[k+1]; v[k+1] = temp; } A statement in a high-level language is translated typically into several machine-level instructions MIPS Machine Language: C CF20004 ACF20000 AC E00008 Assembler

IntroductionCOE 301 – Computer Organization - KFUPM© Muhamed Mudawar – slide 15 Advantages of High-Level Languages  Program development is faster  High-level statements: fewer instructions to code  Program maintenance is easier  For the same above reasons  Programs are portable  Contain few machine-dependent details  Can be used with little or no modifications on different machines  Compiler translates to the target machine language  However, Assembly language programs are not portable

IntroductionCOE 301 – Computer Organization - KFUPM© Muhamed Mudawar – slide 16 Why Learn Assembly Language?  Many reasons:  Accessibility to system hardware  Space and time efficiency  Writing a compiler for a high-level language  Accessibility to system hardware  Assembly Language is useful for implementing system software  Also useful for small embedded system applications  Space and Time efficiency  Understanding sources of program inefficiency  Tuning program performance  Writing compact code

IntroductionCOE 301 – Computer Organization - KFUPM© Muhamed Mudawar – slide 17 Assembly Language Programming Tools  Editor  Allows you to create and edit assembly language source files  Assembler  Converts assembly language programs into object files  Object files contain the machine instructions  Linker  Combines object files created by the assembler with link libraries  Produces a single executable program  Debugger  Allows you to trace the execution of a program  Allows you to view machine instructions, memory, and registers

IntroductionCOE 301 – Computer Organization - KFUPM© Muhamed Mudawar – slide 18 Assemble and Link Process Source File Source File Source File Assembler Object File Assembler Object File Assembler Object File Linker Executable File Link Libraries A program may consist of multiple source files Assembler translates each source file separately into an object file Linker links all object files together with link libraries

IntroductionCOE 301 – Computer Organization - KFUPM© Muhamed Mudawar – slide 19 MARS Assembler and Simulator Tool

IntroductionCOE 301 – Computer Organization - KFUPM© Muhamed Mudawar – slide 20 Next...  Welcome to COE 301  High-Level, Assembly-, and Machine-Languages  Components of a Computer System  Chip Manufacturing Process  Technology Improvements  Programmer's View of a Computer System

IntroductionCOE 301 – Computer Organization - KFUPM© Muhamed Mudawar – slide 21  Processor  Datapath  Control  Memory & Storage  Main Memory  Disk Storage  Input devices  Output devices  Bus: Interconnects processor to memory and I/O  Network: newly added component for communication Components of a Computer System Computer Memory I/O Devices Input Output BUSBUS Control Datapath Processor Disk Network

IntroductionCOE 301 – Computer Organization - KFUPM© Muhamed Mudawar – slide 22 Opening the Box

IntroductionCOE 301 – Computer Organization - KFUPM© Muhamed Mudawar – slide 23 Input Devices Logical arrangement of keys 0123 cdef 89ab 4567 Mechanical switch Spring Key Cap Contacts Membrane switch Conductor-coated membrane

IntroductionCOE 301 – Computer Organization - KFUPM© Muhamed Mudawar – slide 24 Output Devices Laser printing Rollers Sheet of paper Light from optical system Toner Rotating drum Cleaning of excess toner Charging Heater Fusing of toner

IntroductionCOE 301 – Computer Organization - KFUPM© Muhamed Mudawar – slide 25 Memory Devices  Volatile Memory Devices  RAM = Random Access Memory  DRAM = Dynamic RAM  1-Transistor cell + capacitor  Dense but slow, must be refreshed  Typical choice for main memory  SRAM: Static RAM  6-Transistor cell, faster but less dense than DRAM  Typical choice for cache memory  Non-Volatile Memory Devices  ROM = Read Only Memory  Flash Memory

IntroductionCOE 301 – Computer Organization - KFUPM© Muhamed Mudawar – slide 26 Arm provides read/write heads for all surfaces The disk heads are connected together and move in conjunction Track 0 Track 1 Recording area Spindle Direction of rotation Platter Read/write head Actuator Arm Track 2 A Magnetic disk consists of a collection of platters Provides a number of recording surfaces Magnetic Disk Storage

IntroductionCOE 301 – Computer Organization - KFUPM© Muhamed Mudawar – slide 27 Magnetic Disk Storage Track 0 Track 1 Sector Recording area Spindle Direction of rotation Platter Read/write head Actuator Arm Track 2 Disk Access Time = Seek Time + Rotation Latency + Transfer Time Seek Time: head movement to the desired track (milliseconds) Rotation Latency: disk rotation until desired sector arrives under the head Transfer Time: to transfer data

IntroductionCOE 301 – Computer Organization - KFUPM© Muhamed Mudawar – slide 28 Example on Disk Access Time  Given a magnetic disk with the following properties  Rotation speed = 5400 RPM (rotations per minute)  Average seek = 9 ms, Sector = 512 bytes, Track = 200 sectors  Calculate  Time of one rotation (in milliseconds)  Average time to access a block of 80 consecutive sectors  Answer  Rotations per second  Rotation time in milliseconds  Average rotational latency  Time to transfer 80 sectors  Average access time = 5400/60 = 90 RPS = 1000/90 = 11.1 ms = time of half rotation = 5.56 ms = (80/200) * 11.1 = 4.44 ms = = 19 ms

IntroductionCOE 301 – Computer Organization - KFUPM© Muhamed Mudawar – slide 29 Inside the Processor (CPU)  Datapath: part of a processor that executes instructions  Control: generates control signals for each instruction ALUALU Registers InstructionProgram Counter Instruction Cache Next Program Counter Data Cache Control Clock

IntroductionCOE 301 – Computer Organization - KFUPM© Muhamed Mudawar – slide 30 Datapath Components  Program Counter (PC)  Contains address of instruction to be fetched  Next Program Counter: computes address of next instruction  Instruction and Data Caches  Small and fast memory containing most recent instructions/data  Register File  General-purpose registers used for intermediate computations  ALU = Arithmetic and Logic Unit  Executes arithmetic and logic instructions  Buses  Used to wire and interconnect the various components

IntroductionCOE 301 – Computer Organization - KFUPM© Muhamed Mudawar – slide 31 Fetch instruction Compute address of next instruction Generate control signals for instruction Read operands from registers Compute result value Writeback result in a register Fetch - Execute Cycle Instruction Decode Instruction Fetch Execute Writeback Result Infinite Cycle implemented in Hardware Memory Access Read or write memory (load/store)

IntroductionCOE 301 – Computer Organization - KFUPM© Muhamed Mudawar – slide 32 Clocking Operation of digital hardware is governed by a clock Clock period: duration of a clock cycle e.g., 250 ps = 0.25 ns = 0.25 ×10 –9 sec Clock frequency (rate) = 1 / clock period e.g., 1/ 0.25 ×10 –9 sec = 4.0×10 9 Hz = 4.0 GHz Clock (cycles) Data transfer and computation Update state Clock period

IntroductionCOE 301 – Computer Organization - KFUPM© Muhamed Mudawar – slide 33 Next...  Welcome to COE 301  Assembly-, Machine-, and High-Level Languages  Components of a Computer System  Chip Manufacturing Process  Technology Improvements  Programmer's View of a Computer System

IntroductionCOE 301 – Computer Organization - KFUPM© Muhamed Mudawar – slide 34 Chip Manufacturing Process Silicon ingot Slicer Blank wafers 20 to 40 processing steps 8-12 in diameter in long < 0.1 in thick Patterned wafer Dicer Individual dies Die Tester Tested dies Bond die to package Packaged dies Part Tester Tested Packaged dies Ship to Customers

IntroductionCOE 301 – Computer Organization - KFUPM© Muhamed Mudawar – slide 35 Wafer of Pentium 4 Processors  8 inches (20 cm) in diameter  Die area is 250 mm 2  About 16 mm per side  55 million transistors per die  0.18 μm technology  Size of smallest transistor  Improved technology uses  0.13 μm and 0.09 μm  Dies per wafer = 169  When yield = 100%  Number is reduced after testing  Rounded dies at boundary are useless

IntroductionCOE 301 – Computer Organization - KFUPM© Muhamed Mudawar – slide 36 Dramatic decrease in yield with larger dies Yield = (Number of Good Dies) / (Total Number of Dies) Effect of Die Size on Yield Defective Die Good Die (1 + (Defect per area  Die area / 2)) 2 1 Yield = Die Cost = (Wafer Cost) / (Dies per Wafer  Yield)

IntroductionCOE 301 – Computer Organization - KFUPM© Muhamed Mudawar – slide 37 Inside a Multicore Processor Chip AMD Barcelona: 4 Processor Cores 3 Levels of Caches

IntroductionCOE 301 – Computer Organization - KFUPM© Muhamed Mudawar – slide 38 Next...  Welcome to COE 301  Assembly-, Machine-, and High-Level Languages  Components of a Computer System  Chip Manufacturing Process  Technology Improvements  Programmer's View of a Computer System

IntroductionCOE 301 – Computer Organization - KFUPM© Muhamed Mudawar – slide 39 Technology Improvements  Processor transistor count: about 30% to 40% per year  Memory capacity: about 60% per year (4x every 3 years)  Disk capacity: about 60% per year  Opportunities for new applications  Better organizations and designs YearTechnologyRelative performance/cost 1951Vacuum tube1 1965Transistor Integrated circuit (IC) Very large scale IC (VLSI)2,400, Ultra large scale IC6,200,000,000

IntroductionCOE 301 – Computer Organization - KFUPM© Muhamed Mudawar – slide 40 Growth of Capacity per DRAM Chip  DRAM capacity quadrupled almost every 3 years  60% increase per year, for 20 years

IntroductionCOE 301 – Computer Organization - KFUPM© Muhamed Mudawar – slide 41 Processor Performance Almost 10000x improvement between 1978 and 2005 Slowed down by power and memory latency

IntroductionCOE 301 – Computer Organization - KFUPM© Muhamed Mudawar – slide 42 Classes of Computers  Desktop / Notebook Computers  General purpose, variety of software  Subject to cost/performance tradeoff  Server Computers  Network based  High capacity, performance, reliability  Range from small servers to building sized  Embedded Computers  Hidden as components of systems  Stringent power/performance/cost constraints

IntroductionCOE 301 – Computer Organization - KFUPM© Muhamed Mudawar – slide 43 Computer Sales

IntroductionCOE 301 – Computer Organization - KFUPM© Muhamed Mudawar – slide 44 Microprocessor Sales  ARM processor sales exceeded Intel IA-32 processors, which came second  ARM processors are used mostly in cellular phones  Most processors today are embedded in cell phones, digital TVs, video games, and a variety of consumer devices

IntroductionCOE 301 – Computer Organization - KFUPM© Muhamed Mudawar – slide 45 The Processor Market Millions of Units

IntroductionCOE 301 – Computer Organization - KFUPM© Muhamed Mudawar – slide 46 Next...  Welcome to COE 301  Assembly-, Machine-, and High-Level Languages  Components of a Computer System  Chip Manufacturing Process  Technology Improvements  Programmer's View of a Computer System

IntroductionCOE 301 – Computer Organization - KFUPM© Muhamed Mudawar – slide 47 Programmer’s View of a Computer System Application Programs High-Level Language Assembly Language Operating System Instruction Set Architecture Microarchitecture Physical Design Level 0 Level 1 Level 2 Level 3 Level 4 Level 5 Increased level of abstraction Each level hides the details of the level below it Software Hardware Interface SW & HW

IntroductionCOE 301 – Computer Organization - KFUPM© Muhamed Mudawar – slide 48 Programmer's View – 2  Application Programs (Level 5)  Written in high-level programming languages  Such as Java, C++, Pascal, Visual Basic...  Programs compile into assembly language level (Level 4)  Assembly Language (Level 4)  Instruction mnemonics are used  Have one-to-one correspondence to machine language  Calls functions written at the operating system level (Level 3)  Programs are translated into machine language (Level 2)  Operating System (Level 3)  Provides services to level 4 and 5 programs  Translated to run at the machine instruction level (Level 2)

IntroductionCOE 301 – Computer Organization - KFUPM© Muhamed Mudawar – slide 49 Programmer's View – 3  Instruction Set Architecture (Level 2)  Interface between software and hardware  Specifies how a processor functions  Machine instructions, registers, and memory are exposed  Machine language is executed by Level 1 (microarchitecture)  Microarchitecture (Level 1)  Controls the execution of machine instructions (Level 2)  Implemented by digital logic  Physical Design (Level 0)  Implements the microarchitecture  Physical layout of circuits on a chip