x86 Processor Architecture

Slides:



Advertisements
Similar presentations
Computer Organization and Assembly Languages Yung-Yu Chuang
Advertisements

Khaled A. Al-Utaibi  Computers are Every Where  What is Computer Engineering?  Design Levels  Computer Engineering Fields  What.
IA-32 Processor Architecture
Assembly Language for Intel-Based Computers, 4 th Edition Chapter 2: IA-32 Processor Architecture (c) Pearson Education, All rights reserved. You.
1 Hardware and Software Architecture Chapter 2 n The Intel Processor Architecture n History of PC Memory Usage (Real Mode)
Assembly Language for Intel-Based Computers, 4 th Edition Chapter 2: IA-32 Processor Architecture (c) Pearson Education, All rights reserved. You.
© 2006 Pearson Education, Upper Saddle River, NJ All Rights Reserved.Brey: The Intel Microprocessors, 7e Chapter 2 The Microprocessor and its Architecture.
Assembly Language for Intel-Based Computers, 5 th Edition Chapter 2: IA-32 Processor Architecture (c) Pearson Education, All rights reserved.
Assembly Language for Intel-Based Computers Chapter 2: IA-32 Processor Architecture Kip Irvine.
Assembly Language Basic Concepts IA-32 Processor Architecture.
ICS312 Set 3 Pentium Registers. Intel 8086 Family of Microprocessors All of the Intel chips from the 8086 to the latest pentium, have similar architectures.
Assembly Language for x86 Processors 6 th Edition Chapter 2: x86 Processor Architecture (c) Pearson Education, All rights reserved. You may modify.
An Introduction to IA-32 Processor Architecture Eddie Lopez CSCI 6303 Oct 6, 2008.
Assembly Language for Intel-Based Computers, 5th Edition
Assembly Language for Intel-Based Computers, 5 th Edition Chapter 2: IA-32 Processor Architecture (c) Pearson Education, All rights reserved.
Assembly Language for x86 Processors 6th Edition
Irvine, Kip R. Assembly Language for x86 Processors 6/e, IA-32 Processor Architecture Modes of operation Basic execution environment Floating-point.
Chapter 2: IA-32 Processor Architecture. Chapter Overview General Concepts IA-32 Processor Architecture IA-32 Memory Management Components of an IA-32.
Assembly Language for Intel-Based Computers, 5 th Edition Chapter 2: IA-32 Processor Architecture (c) Pearson Education, All rights reserved.
Chapter 2: IA-32 Processor Architecture (c) Pearson Education, All rights reserved. You may modify and copy this slide show for your personal.
Assembly Language for Intel-Based Computers, 4 th Edition Chapter 2: IA-32 Processor Architecture (c) Pearson Education, All rights reserved. You.
Basic Microcomputer Design. Inside the CPU Registers – storage locations Control Unit (CU) – coordinates the sequencing of steps involved in executing.
Chapter 2: x86 Processor Architecture
Assembly Language for x86 Processors 7th Edition
Chapter 2 The CPU and the Main Board  2.1 Components of the CPU 2.1 Components of the CPU 2.1 Components of the CPU  2.2Performance and Instruction Sets.
1 Fundamental of Computer Suthida Chaichomchuen : SCC
Intel Pentium II Processor Brent Perry Pat Reagan Brian Davis Umesh Vemuri.
Fall 2012 Chapter 2: x86 Processor Architecture. Irvine, Kip R. Assembly Language for x86 Processors 6/e, Chapter Overview General Concepts IA-32.
Assembly Language for x86 Processors 7th Edition
Assembly Language for x86 Processors 6 th Edition Chapter 2: x86 Processor Architecture (c) Pearson Education, All rights reserved. You may modify.
Chapter 2 Parts of a Computer System. 2.1 PC Hardware: Memory.
Computers organization & Assembly Language Chapter 1 THE 80x86 MICROPROCESSOR.
Sahar Mosleh California State University San MarcosPage 1 Intel IA-32 Architecture This lecture describes the architecture of the Intel IA-32 processor.
1 Basic Processor Architecture. 2 Building Blocks of Processor Systems CPU.
Introduction to Intel IA-32 and IA-64 Instruction Set Architectures.
What is a processor ? A “Processor," is a small chip that resides in computers and other electronic devices. It also called “Brain ” of a computer. It.
Assembly Language for Intel-Based Computers, 4 th Edition Chapter 2: IA-32 Processor Architecture (c) Pearson Education, All rights reserved. You.
1 Chapter 2: IA-32 Processor Architecture Assembly Language for Intel-Based Computers, 5th edition Kip R. Irvine 2/21/07.
The 8085A is a general-purpose microprocessor with low hardware overhead requirements. Within the 8085A are contained the functions of clock generation,
Assembly Language for x86 Processors 6th Edition
Chapter Overview General Concepts IA-32 Processor Architecture
Unit Microprocessor.
COURSE OUTCOMES OF Microprocessor and programming
Assembly language.
Computer Hardware – System Unit
Assembly Language for Intel-Based Computers, 5th Edition
Introduction to microprocessor (Continued) Unit 1 Lecture 2
ASSEMBLY LANGUAGE FOR INTEL-BASED COMPUTERS,
Computer Organization & Assembly Language Chapter 3
Assembly Language for Intel-Based Computers, 5th Edition
Introduction of microprocessor
Basic Microprocessor Architecture
Homework Reading Continue work on mp1
Microcomputer Architecture
Assembly Language for Intel-Based Computers, 4th Edition
Basic of Computer Organization
COAL Chapter 1,2,3.
Introduction of microprpcessor
Number Representations and Basic Processor Architecture
University of Gujrat Department of Computer Science
Computer Organization and Assembly Languages Yung-Yu Chuang 2005/10/6
Microprocessor & Assembly Language
Morgan Kaufmann Publishers Computer Organization and Assembly Language
Introduction to Intel IA-32 and IA-64 Instruction Set Architectures
CS 301 Fall 2002 Computer Organization
The Microprocessor & Its Architecture
Assembly Language (CSW 353)
Computer Architecture CST 250
Introduction of microprpcessor
Register sets The register section/array consists completely of circuitry used to temporarily store data or program codes until they are sent to the.
Presentation transcript:

x86 Processor Architecture

Microcomputer Motherboard contains the main components Microprocessor (the computational core) Memory (DRAM) Support chips (memory controller, audio, IO …) Slots for peripheral components (video, …) Input/output ports

Intel D850MD Motherboard mouse, keyboard, parallel, serial, and USB connectors Video Audio chip PCI slots memory controller hub Pentium 4 socket AGP slot dynamic RAM Firmware hub I/O Controller Speaker Power connector Battery Diskette connector Source: Intel® Desktop Board D850MD/D850MV Technical Product Specification IDE drive connectors Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2015.

Microprocessor Central Processing Unit (CPU) Arithmetic Logic Unit (ALU) Performs the actual computations Control Unit (CU) Controls the sequence of instruction execution Clock Manages the timing of instruction execution Cache Memory Helps speed program execution Registers Localized storage of operands and data Speeds execution by avoiding (much slower) memory access

Basic Microcomputer Design clock synchronizes CPU operations control unit (CU) coordinates sequence of execution steps ALU performs arithmetic and bitwise processing buses carry multi-bit words representing memory addresses, data, or control information typically 64 bits wide, 32 bits in older machines Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2015. Modified, John Carelli

Clock Synchronizes all CPU and BUS operations Machine cycle (or clock cycle) measures time of a single operation Clock is used to trigger events Continuously running (normally) Generated with a motherboard-mounted quartz crystal Typically over 1Ghz (1 billion cycles per second) Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2015. Modified, John Carelli

Instruction Execution Cycle Fetch Load the next program instruction from the code cache Code Cache: section of memory storing the program Location of the next instruction is stored in the “instruction pointer” Decode Interpret the instruction bit pattern (opcode) to determine the operation to perform (this is “machine Language”) Fetch operands (if any) Retrieve any needed data from registers or memory Execute Store the output (if necessary) Update the “instruction pointer” to the next instruction and go to step 1.

Execution Cycle vs. Machine Cycles Some instructions take multiple clock cycles (or machine cycles) to execute Actual number depends on source and destination of the data (register or memory), computer components and architecture … Register based operations are faster than operations requiring memory access Because registers are located right in the CPU No need to go to external memory to get data

x86 Family of Processors Register Memory Machines CISC architecture Complex Instruction Set Computer Supports both 32 and 64 bit operation* Register Memory Machines Operands can be in either registers or memory But operations using registers are faster *This course will concentrate on 32 Bit Operation

x86 Overview Supports multiple modes of operation: Protected mode* native mode (Windows, Linux) Others: Real-address mode (native MS-DOS) System management mode (power management, system security, diagnostics) Virtual-8086 mode (variant of Protected) *This course will concentrate on Protected Mode

32 Bit Operation The basic (default) sizes of the following are all 32 bits: CPU registers Data Memory addresses 32 bit memory addresses implies up to 4GB of addressable memory (232 is approximately 4x109)

Registers, an overview Located in the CPU Registers provide rapid, direct access to operands in an instruction (like adding, comparing, …) Avoid accessing system bus and memory Some registers are general purpose … but others are dedicated to particular tasks Assembly language programs make extensive use of registers Registers are accessed by name in assembly language programs

General-Purpose Registers Named storage locations inside the CPU, optimized for speed. Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2015.

Accessing Parts of Registers Use 8-bit name, 16-bit name, or 32-bit name Applies to EAX, EBX, ECX, and EDX Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2015.

Index and Base Registers Some registers have only a 16-bit name for their lower half*: * can’t access at the byte level Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2015 Modified John Carelli

Some Specialized Register Uses (1 of 2) General-Purpose Registers EAX – accumulator (multiplication/division) ECX – loop counter ESP – stack pointer ESI, EDI – index registers (high speed memory transfer) EBP – extended frame pointer (stack) Segment Registers (used for pointers) CS – code segment DS – data segment SS – stack segment ES, FS, GS - additional segments Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2015. Modified, John Carelli

Some Specialized Register Uses (2 of 2) EIP – instruction pointer Contains the address of the next instruction to be executed EFLAGS status and control flags each flag is a single binary bit Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2015.

Status Flags Carry Overflow Sign Zero Auxiliary Carry Parity unsigned arithmetic out of range Overflow signed arithmetic out of range Sign result is negative Zero result is zero Auxiliary Carry carry from bit 3 to bit 4 Parity sum of 1 bits is an even number Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2015.

Floating-Point, MMX, XMM Registers Eight 80-bit floating-point data registers ST(0), ST(1), . . . , ST(7) arranged in a stack used for all floating-point arithmetic Eight 64-bit MMX registers Eight 128-bit XMM registers for single-instruction multiple-data (SIMD) operations Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2015.

Levels of Input-Output Level 3: High-level language function examples: C++, Java portable, convenient, not always the fastest Level 2: Operating system Application Programming Interface (API) extended capabilities, lots of details to master Level 1: BIOS drivers that communicate directly with devices OS security may prevent application-level code from working at this level Programs in this course will use Level-3 I/O functions provided in a library that come with the textbook Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2015. Modified, John Carelli

Displaying a String of Characters When a HLL program displays a string of characters, the following steps take place: Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2015.

Programming levels Assembly language programs can perform input-output at each of the following levels: Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2015.