ECSE 426 Microprocessor Systems

Similar documents
Chapter 2 Lecture 1 Computer Systems Organization

COMPUTER SYSTEMS ORGANIZATION

Computer Systems. Binary Representation. Binary Representation. Logical Computation: Boolean Algebra

Alternate definition: Instruction Set Architecture (ISA) What is Computer Architecture? Computer Organization. Computer structure: Von Neumann model

Computer Architecture 2/26/01 Lecture #

Computers and Microprocessors. Lecture 34 PHYS3360/AEP3630

Introduction. Computer System Organization. Languages, Levels, Virtual Machines. A multilevel machine. Sarjana Magister Program

Computer Organization

Computer Architecture Dr. Charles Kim Howard University

Computer Architecture. Fall Dongkun Shin, SKKU

Computer Systems Architecture

Computer Architecture Computer Architecture. Computer Architecture. What is Computer Architecture? Grading

Computer Architecture

Computer Architecture

COSC 122 Computer Fluency. Computer Organization. Dr. Ramon Lawrence University of British Columbia Okanagan

Latches. IT 3123 Hardware and Software Concepts. Registers. The Little Man has Registers. Data Registers. Program Counter

Computer Architecture Dr. Charles Kim Howard University

Full file at

CC312: Computer Organization

Chapter 08: The Memory System. Lesson 01: Basic Concepts

Introduction to a Typical PC. Freedom High School

COURSE DESCRIPTION. CS 232 Course Title Computer Organization. Course Coordinators

CS 101, Mock Computer Architecture

5 Computer Organization

ELC4438: Embedded System Design Embedded Processor

5 Computer Organization

Introduction to Computer Systems

IT 252 Computer Organization and Architecture. Introduction. Chia-Chi Teng

Computer Architecture. Introduction. Lynn Choi Korea University

Computer Organization + DIGITAL DESIGN

Computer Architecture and Assembly Language. Spring

Computers Are Your Future

Lecture 1. Course Overview and The 8051 Architecture

CS Computer Architecture

Basic Concepts COE 205. Computer Organization and Assembly Language Dr. Aiman El-Maleh

Instruction Register. Instruction Decoder. Control Unit (Combinational Circuit) Control Signals (These signals go to register) The bus and the ALU

IB Computer Science Topic.2-

Chapter 2 Data Manipulation

Computer Architecture

How What When Why CSC3501 FALL07 CSC3501 FALL07. Louisiana State University 1- Introduction - 1. Louisiana State University 1- Introduction - 2

Chapter 2: Instructions How we talk to the computer

Computer Architecture

Homeschool Enrichment. The System Unit: Processing & Memory

Computers Are Your Future

Computer Organization

PC I/O. May 7, Howard Huang 1

Show how to connect three Full Adders to implement a 3-bit ripple-carry adder

Introduction to Microcontrollers

INTRODUCTION TO COMPUTERS

Introduction to Computer Systems

Chapter 2. Prepared By: Humeyra Saracoglu

Computer Organization and Programming

TUTORIAL Describe the circumstances that would prompt you to use a microprocessorbased design solution instead of a hard-wired IC logic design.

Chapter One. Introduction to Computer System

x86 Architectures; Assembly Language Basics of Assembly language for the x86 and x86_64 architectures

Chapter 1: Introduction. Oregon State University School of Electrical Engineering and Computer Science

Chapter 5 12/2/2013. Objectives. Computer Systems Organization. Objectives. Objectives (continued) Introduction. INVITATION TO Computer Science 1

Chapter 4 The Components of the System Unit

Week 1. Introduction to Microcomputers and Microprocessors, Computer Codes, Programming, and Operating Systems

Course Outline. Introduction. Intro Computer Organization. Computer Science Dept Va Tech January McQuain & Ribbens

Summary of Computer Architecture

address ALU the operation opcode ACC Acc memory address

COMPUTER ORGANISATION CHAPTER 1 BASIC STRUCTURE OF COMPUTERS

Lecture Objectives. Introduction to Computing Chapter 0. Topics. Numbering Systems 04/09/2017

A Review of Chapter 5 and. CSc 2010 Spring 2012 Instructor: Qian Hu

CPU ARCHITECTURE. QUESTION 1 Explain how the width of the data bus and system clock speed affect the performance of a computer system.

14:332:331. Lecture 1

Computer Organization

Handouts. (CSC-3501) Lecture 1 (15 Jan 2008) Seung-Jong Park (Jay) Class information. Schedule (check online frequently)

CSC 170 Introduction to Computers and Their Applications. Computers

Microprocessor Architecture Dr. Charles Kim Howard University

CS 31: Intro to Systems Digital Logic. Kevin Webb Swarthmore College February 2, 2016

1.3 Data processing; data storage; data movement; and control.

Three-box Model: These three boxes need interconnecting (usually done by wiring known as a bus. 1. Processor CPU e.g. Pentium 4 2.

Figure 1-1. A multilevel machine.

CS311 Lecture: CPU Implementation: The Register Transfer Level, the Register Set, Data Paths, and the ALU

Introduction to Computer Systems

Department of Industrial Engineering. Sharif University of Technology. Operational and enterprises systems. Exciting directions in systems

Computer Architecture

In this lecture, we will look at how storage (or memory) works with processor in a computer system. This is in preparation for the next lecture, in

Processing Unit CS206T

2/15/2008. Announcements. Programming. Instruction Execution Engines. Following Instructions. Instruction Execution Engines. Anatomy of a Computer

Chapter 1 Introduction. Jin-Fu Li Department of Electrical Engineering National Central University Jungli, Taiwan

Microprocessor. Dr. Rabie A. Ramadan. Al-Azhar University Lecture 1

Microprocessor (COM 9323)

CS 333 Introduction to Operating Systems. Class 1 - Introduction to OS-related Hardware and Software

3.1 Description of Microprocessor. 3.2 History of Microprocessor

EECS2021. EECS2021 Computer Organization. EECS2021 Computer Organization. Morgan Kaufmann Publishers September 14, 2016

COMPUTER ARCHITECTURE AND OPERATING SYSTEMS (CS31702)

ECE 468 Computer Architecture and Organization Lecture 1

Computer and Hardware Architecture I. Benny Thörnberg Associate Professor in Electronics

Course Description: This course includes concepts of instruction set architecture,

ECE2049 E17 Lecture 4 MSP430 Architecture & Intro to Digital I/O

CPE300: Digital System Architecture and Design

COMP3221: Microprocessors and. and Embedded Systems. Instruction Set Architecture (ISA) What makes an ISA? #1: Memory Models. What makes an ISA?

Problem Set 1 Solutions

Defining Computers. Defining Computers. Understanding Essential Computer Concepts

CPE300: Digital System Architecture and Design

Chapter 13 Reduced Instruction Set Computers

Robotic Systems ECE 401RB Fall 2006

Transcription:

ECSE 426 Zeljko Zilic Room 536 McConnell Building zeljko@ece.mcgill.ca www.macs.ece.mcgill.ca/~zeljko Microprocessors Enabling technology for general purpose computers and embedded systems Really, lots&lots of things nowadays Foundation for software-intensive systems Data processor - arithmetic, logical, symbolic or application-specific operations Architectural view: ALUs, registers, etc. Circuit view: registers, interfaces, buses Programmer s view: assembler instructions 1

Computer System Types Computers and Applications Deciding factors: Cost Size Power Quantity 2

Embedded System Importance Ubiquitous processor-based control systems Development easier than with alternative technologies Makes products competitive: features AND price Enabling technology for many new products Likely source of jobs for ECE graduates Embedded Systems They are just about everywhere From toothbrush to space shuttle Incarnations of generic computer systems Sometimes, specialized Input/Output Processor Input keys Input interface EMBEDDED PROCESSOR CHIP Door open ROM Magnetron Displays RAM Output interface Bus Fan Light Speaker What is this diagram showing? Microwave Oven 3

Another Example - Camera Computer system with: Image control Hardware (lenses, motors) Interfaces Added sophistication to consumer electronics Expandability (of functions) Connectivity Lens User switches Image storage Optical sensors A/D conversion System controller LCD screen Motor Flash unit Computer interface Cable to PC Supercomputers: Earth Simulator 35.86 Tflop/s (#4), Footprint 34,000 ft 2 (4 tennis courts x 3 floors) 10.0 MW! Diameter Processors Switches Disks Cable Floor AC Floor Crossbar Interconnection Network 83000 Copper Cables 1800 Miles of Cable http://www.es.jamstec.go.jp/esc/eng/index.html High Interprocessor Latency (11 in = 1ns) 4

Views of Computer Systems Levels of abstraction Logic Level - Circuits Logic functions implemented by gates Architectural Level - Microarchitecture Operations performed by resources Instruction Set Level - Instructions Program execution Operating System Level - Complete system System operation Layered Computer Architecture Concept necessary for complex systems e.g., networking, large software systems etc. 5

Layered Computer Systems Includes hardware and software User programs Operating system Instruction Set Architecture Hardware Computer History WWII effort UK (USA) Post-WWII Commercial development IBM DEC Cray Sun 6

Von Neumann Machine Princeton IAS 40-bit memory word 20-bit instruction word Loads left and right instruction at once Computer Organization Processor Microprocessor Memory Peripherals Common Bus 7

Example: PC Platform Driving modern technologies economy of scale Hardware Processors Buses Memory Peripherals Software OS s Applications Basic Parts Processor, memory & IO Arithmetic and logic Input Memory Control Output Processor I/O 8

Common Processors Still Von Neumann architecture Arithmeticlogic unit Registers Auxiliary registers Processor Execution - Java code public class Interp { static int PC; // program counter holds address of next instr static int AC; // the accumulator, a register for doing arithmetic static int instr; // a holding register for the current instruction static int instr_type; // the instruction type (opcode) static int data_loc; // the address of the data, or -1 if none static int data; // holds the current operand static boolean run_bit = true; // a bit that can be turned off to halt the ma public static void interpret(int memory[ ], int starting_address) { PC = starting_address; while (runbit) { instr = memory[pc]; // fetch next instruction into instr PC = PC + 1; / / increment program counter instr_type = get_instr_type(instr); // determine instruction type data_loc = find_data(instr, instr_type);// locate data (-1 if none) if (data_loc >= 0) // if data_loc is -1, there is no operand data = memory[data_loc]; // fetch the data execute(instr_type, data); //execute instruction } } private static int get_instr_type(int addr) {... } private static int find_data(int instr, int type) {... } private static void execute(int type, int data){... } } 9

Basic Concepts - Pipelining Makes processor run at high clock rate But might take more clock cycles Trick: overlap execution Some overhead first few instructions Other Speedups Multiple Units Bottlenecks execution in single pipeline units ALU, especially floating point Resolution provide multiple units 10

Superscalar Processors Common solution for modern processors Multiple execution units Memory Hierarchy of memory units Speed vs. size Solutions Caching Virtual memory 11

The Memory Latency Wall Microprocessor Clock Clock 2000 2000 1.0 1.0 GHz GHz 2001 2001 1.6 1.6 GHz GHz 2002 2002 2.6 2.6 GHz GHz 2003 2003 4.1 4.1 GHz GHz 2004 2004 10.1 10.1 GHz GHz 2005 2005 16.2 16.2 GHz GHz Actual Actual 2005 2005 3+ 3+ GHz GHz Challenges: Performance at Scale Advanced simulation and modeling apps Memory Wall Conquering Terascale problems of today Petascale Challenges Beware being eaten alive by the petascale problems of tomorrow. Drawing Drawing by by Thomas Thomas Zacharia Zacharia (ORNL) (ORNL) 12

Performance at Scale Advanced simulation and modeling apps Memory Wall Conquering Terascale problems of today The The memory wall wall (von (von Neumann Beware bottleneck) being eaten the the disparity between alive by the petascale problems of tomorrow. Processor Processor clock clock rates rates and and memory memory cycle cycle times times ( locally ) ( locally ) Remote Remote access access latencies latencies seen seen system system wide wide Petascale Challenges Drawing Drawing by by Thomas Thomas Zacharia Zacharia (ORNL) (ORNL) Memory Organization Computer Word Basic unit of acces The same memory can be accessed in different ways 13

Little Endian vs. Big Endian Matter of preference Significant implications for compatibility Some processors can have both Standardization ASCII set Standardized way to use bits for encoding Characters Display Communication File 14

Software Build and Load Typical flow for desktop computer Compiler Assembler Run-Time Library: Object Files Linker Executable Image File Loader Read-Write Memory (RAM) Operating System Image: Boot Process Example Program Creation & Run Register file CPU PC ALU System bus Memory bus Bus interface I/O bridge Main memory USB controller Graphics adapter I/O bus Disk controller Mouse Keyboard Display Disk Expansion slots for other devices such as network adapters hello executable stored on disk 15

Reading Hello Command Register file CPU PC ALU System bus Memory bus Bus interface I/O bridge Main memory USB controller Graphics adapter I/O bus Disk controller Mouse Keyboard Display Disk 3-Jan-06 User types "hello" ECSE 426 Expansion slots for other devices such as network adapters hello executable stored on disk Loading Hello Program Register file CPU PC ALU System bus Memory bus Bus interface I/O bridge Main memory "hello,world\n" hello code USB controller Graphics adapter I/O bus Disk controller Mouse Keyboard Display Disk Expansion slots for other devices such as network adapters hello executable stored on disk 16

Finally -Program Running Register file CPU PC ALU System bus Memory bus Bus interface I/O bridge Main memory "hello,world\n" hello code USB controller Graphics adapter I/O bus Disk controller "hello,world\n" Mouse Keyboard Display Disk Expansion slots for other devices such as network adapters hello executable stored on disk Embedded Systems - Languages Recent Statistics 90.0% 80.0% 70.0% 60.0% 50.0% 1998-1999 1999-2000 40.0% 30.0% 20.0% 10.0% 0.0% Assembly C C++ Java Other 17

Course Overview Background Computer Arch. Basics Microprocessors Commercial: Pentium, Sparc; Potential: Java Embedded Processors TI MSP430, ARM, PowerPC Embedded System Design HW and SW techniques Real Time Systems Techniques and Tools Course Objectives Understand microprocessor-based systems Get familiar with basic tools Skills in machine interfacing, assembler and embedded C programming Design a sizeable embedded system Previous projects: Music player, file swapping system, PDAs (with handwriting recognition), wireless data collection systems Build teamwork skills 18

Reference Books Reference A. Tanenbaum, Structured Computer Organization, 4th edition, Prentice-Hall, 1999. C. Nagy, Embedded Systems Design Using the TI MSP430 Series, Elsevier Science, 2003 B. Shriver and B. Smith, The Anatomy of a High- Performance Microprocessor - A Systems Perspective, IEEE Computer Society Press, 1998. C. Hamacher, Z. Vranesic and S. Zaky, Computer Organization, 5th edition, McGraw-Hill, 2002. Academic Integrity McGill University values academic integrity. Therefore all students must understand the meaning and consequences of cheating, plagiarism and other academic offences under the Code of Student Conduct and Disciplinary Procedures (see http://www.mcgill.ca/integrity for more information). 19

Finally: Grading Scheme 12% participation - 4 quizzes Schedule will be announced 38% laboratories 40% project Assessment Evaluations Contribution to Final Grade Experiment 1 18 Demo 10 Report 8 Experiment 2 15 Demo 10 Lab Notes 5 Experiment 3 15 Demo 10 Lab Notes 5 Project 40 Demo 1 13 Final Demo 15 Report 12 Quizzes 12 12 20