Computers and Microprocessors. Lecture 34 PHYS3360/AEP3630

Similar documents
Assembly Language for Intel-Based Computers, 4 th Edition. Chapter 2: IA-32 Processor Architecture. Chapter Overview.

Assembly Language for Intel-Based Computers, 4 th Edition. Kip R. Irvine. Chapter 2: IA-32 Processor Architecture

IA-32 Architecture. Computer Organization and Assembly Languages Yung-Yu Chuang 2005/10/6. with slides by Kip Irvine and Keith Van Rhein

Assembly Language for x86 Processors 7 th Edition. Chapter 2: x86 Processor Architecture

CS 16: Assembly Language Programming for the IBM PC and Compatibles

Computer Organization (II) IA-32 Processor Architecture. Pu-Jen Cheng

CREATED BY M BILAL & Arslan Ahmad Shaad Visit:

Assembly Language. Lecture 2 - x86 Processor Architecture. Ahmed Sallam

Assembly Language. Lecture 2 x86 Processor Architecture

Computer Architecture 2/26/01 Lecture #

machine cycle, the CPU: (a) Fetches an instruction, (b) Decodes the instruction, (c) Executes the instruction, and (d) Stores the result.

Basics of Microprocessor

IA-32 Architecture COE 205. Computer Organization and Assembly Language. Computer Engineering Department

CS 101, Mock Computer Architecture

Chapter 4 The Components of the System Unit

Computer Organization and Assembly Language (CS-506)

Introduction to Microprocessor

Computers Are Your Future

Technology in Action

PC I/O. May 7, Howard Huang 1

FUNCTIONS OF COMPONENTS OF A PERSONAL COMPUTER

MICROPROCESSOR MICROPROCESSOR. From the above description, we can draw the following block diagram to represent a microprocessor based system: Output

5 Computer Organization

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

SAE5C Computer Organization and Architecture. Unit : I - V

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

Hardware and Software Architecture. Chapter 2

Computer Maintenance. Unit Subtitle: Motherboards. Copyright Texas Education Agency, All rights reserved. 1

Digital System Design

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

Chapter 4 The Components of the System Unit

1 PC Hardware Basics Microprocessors (A) PC Hardware Basics Fal 2004 Hadassah College Dr. Martin Land

Processing Unit CS206T

Computer Systems Organization

1. INTRODUCTION TO MICROPROCESSOR AND MICROCOMPUTER ARCHITECTURE:

Computers in Business: Concepts in Hardware and Software

Introduction To Computer Hardware. Hafijur Rahman

7/28/ Prentice-Hall, Inc Prentice-Hall, Inc Prentice-Hall, Inc Prentice-Hall, Inc Prentice-Hall, Inc.

3.1 Description of Microprocessor. 3.2 History of Microprocessor

HARDWARE AND OPERATING SYSTEMS


General purpose registers These are memory units within the CPU designed to hold temporary data.

Computer Architecture

Chapter 9: A Closer Look at System Hardware

Chapter 9: A Closer Look at System Hardware 4

Chapter One. Introduction to Computer System

EE 3170 Microcontroller Applications

CS 31: Intro to Systems Digital Logic. Kevin Webb Swarthmore College February 3, 2015

The functional block diagram of 8085A is shown in fig.4.1.

Experiment #0. PC Hardware and Operating Systems

THE MICROCOMPUTER SYSTEM CHAPTER - 2

Segment 1A. Introduction to Microcomputer and Microprocessor

Components of a personal computer

MSc-IT 1st Semester Fall 2016, Course Instructor M. Imran khalil 1

ECE 2300 Digital Logic & Computer Organization. Caches

OS And Hardware. Computer Hardware Review PROCESSORS. CPU Registers. CPU Registers 02/04/2013

Q1. Describe C.P.U and its subunits with the help of diagram?

MICROPROCESSOR AND MICROCONTROLLER BASED SYSTEMS

Computer Organization

QUESTION BANK. EE 6502 / Microprocessor and Microcontroller. Unit I Processor. PART-A (2-Marks)

Microprocessors/Microcontrollers

Introduction to Computers - Chapter 4

About the Presentations

INTRODUCTION TO INFORMATION & COMMUNICATION TECHNOLOGY (ICT) LECTURE 2 : WEEK 2 CSC-111-T

A+ Guide to Hardware: Managing, Maintaining, and Troubleshooting, 5e. Chapter 1 Introducing Hardware

COA. Prepared By: Dhaval R. Patel Page 1. Q.1 Define MBR.

Presentation to Linux Users of Victoria Beginner's Workshop. August 20, Dedicated to Christopher Espinosa

Hardware Design I Chap. 10 Design of microprocessor

Introduction to the Personal Computer

3 Computer Architecture and Assembly Language

Mother Board And Its Components By :- IMRAN QURESHI

Control Unit: The control unit provides the necessary timing and control Microprocessor resembles a CPU exactly.

MICROPROCESSOR B.Tech. th ECE

address ALU the operation opcode ACC Acc memory address

Summary of Computer Architecture

CHAPTER 4 MARIE: An Introduction to a Simple Computer

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

1. Internal Architecture of 8085 Microprocessor

Unit 2: Technology Systems. Computer and technology systems

CHAPTER 5 : Introduction to Intel 8085 Microprocessor Hardware BENG 2223 MICROPROCESSOR TECHNOLOGY

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

Architecture of 8085 microprocessor

System Unit Components Chapter2

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

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

Homeschool Enrichment. The System Unit: Processing & Memory

Chapter No. 1. Motherboard & its Components

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

The Components of the System Unit

The Central Processing Unit

Computer Architecture

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

Chapter 1: Motherboard & Its Components

Pin Description, Status & Control Signals of 8085 Microprocessor

VISUAL SUMMARY. The System Unit

The Memory Hierarchy 10/25/16

CS Basics 2) Architecture

Summer 2003 Lecture 1 06/09/03

Advanced Parallel Architecture Lesson 3. Annalisa Massini /2015

Verizon Next Step Program Course Outline. Telecommunications Technology: Verizon

Transcription:

Computers and Microprocessors Lecture 34 PHYS3360/AEP3630 1

Contents Computer architecture / experiment control Microprocessor organization Basic computer components Memory modes for x86 series of microprocessors 2

Laboratory computers Many experiments utilize computers interfaced to the physical world via transducers (previous lecture) This allows control of experiment conditions and data acquisition not otherwise possible (e.g. nonlinear control of a measured parameter, various feedback/readout loops, setup procedures) Computers can be either standalone or embedded (sometimes also called controllers) 3

Computer Abstraction Layers Basic Computer Organization Has several abstraction layers that hide implementation details OS & applications: a gateway for human interaction kernel: mandatory part of OS common to all software; CPU tasks, memory, interrupts; drivers for various devices assembler: turns assembly language instr. into opcodes (binary stream of commands that CPU understands) 4

Computer Abstraction Layers (2) firmware: a low-level program embedded into a hardware that enables its functionality; hardware specific. Ex: Basic Input/Output System Microcode hardware: microprocessors, buses, memory, input/output devices, ports, etc. 5

Computer Organization control unit (CU): controls operation timing / sequencing arithmetic logic unit (ALU): performs all math & logic operations, receives command sequence from CU clock: synchronizes CPU operation data bus registers Central Processor Unit (CPU) Memory Storage Unit Device #1 Device #2 ALU CU clock control bus address bus 6

Central Processing Unit (CPU) CPU = ALU + CU + registers Registers: arrays of D flip-flops for storage of operands, addresses, and instructions, characterized by quick access Microprocessor: CPU on a single chip registers general addressing control ALU control & timing bus interface unit data bus address bus control bus timing interrupt requests 7

Buses Bus: a group of wires that transfer data from one part to another (data, address, control) Data bus: bi-directional (read/write) 8, 16, 32-bit wide common (same as word size ) Address bus: specifies memory location in RAM/ROM/interface device to be accessed; monodirectional address space: 16-bit wide 2 16 = 64 2 10 = 64KB 32-bit wide 2 32 = 4GB Control bus: carries commands from the CPU and returns status signals from the devices 8

one cycle Clock 1 0 all CPU and bus operations are synchronized to the clock machine cycle (clock) measures time for a single operation e.g. 2 GHz clock cycle 0.5 ns CPU frequency is not necessarily indicative of the execution speed; e.g. floating pt. operation of multiplication may take ~10 to ~100 cycles depending on the processor FLOPS: floating operations per second, a useful measure for (super)computers dedicated to extensive computations 10

Instruction execution cycle program counter instruction queue memory op1 op2 write PC program I-1 I-2 I-3 I-4 read write registers flags (output) fetch registers ALU execute I-1 decode instruction register Fetch Decode Fetch operands Execute Store output 11

Simple microcomputer DATA BUS IR ACC B MEMORY PORT DECODE PC ALU CONTROL AND SEQUENCING FLAG ADDRESS BUS CLOCK CONTROL BUS 12

Control signals (e.g. 20 in total) WR RD WR RD DATA BUS RD WR IR ACC B MEMORY PORT RD DECODE WR RD INC PC ALU OP WR CONTROL AND SEQUENCING FLAG RD OP ADDRESS BUS WR RD WR RD CLOCK CONTROL BUS 13

Example of execution sequence LDA assembler mnemonic for load accumulator register, e.g. for performing arithmetic operation, etc. 14

LDA (execution cycle 1): IR RD DATA BUS RD IR ACC B MEMORY PORT DECODE PC ALU CONTROL AND SEQUENCING FLAG ADDRESS BUS CLOCK CONTROL BUS 15

LDA (execution cycle 2): MEM RD DATA BUS IR ACC B MEMORY PORT DECODE PC ALU CONTROL AND SEQUENCING FLAG ADDRESS BUS RD CLOCK CONTROL BUS 16

LDA (execution cycle 3): ACC WR WR DATA BUS IR ACC B MEMORY PORT DECODE PC ALU CONTROL AND SEQUENCING FLAG ADDRESS BUS CLOCK CONTROL BUS 17

Example of execution sequence ADD adds a number (ALU function) to one already stored in ACC 18

ADD (execution cycle 1): IR RD DATA BUS RD IR ACC B MEMORY PORT DECODE PC ALU CONTROL AND SEQUENCING FLAG ADDRESS BUS CLOCK CONTROL BUS 19

ADD (execution cycle 2): MEM RD DATA BUS IR ACC B MEMORY PORT DECODE PC ALU CONTROL AND SEQUENCING FLAG ADDRESS BUS RD CLOCK CONTROL BUS 20

ADD (execution cycle 3): B WR WR DATA BUS IR ACC B MEMORY PORT DECODE PC ALU CONTROL AND SEQUENCING FLAG ADDRESS BUS RD CLOCK CONTROL BUS 21

ADD (execution cycle 4): ALU 10, ACC WR WR DATA BUS IR ACC B MEMORY PORT DECODE PC ALU CONTROL AND SEQUENCING FLAG ADDRESS BUS RD CLOCK CONTROL BUS 22

Example of execution sequence JMP jump to another command (aka GOTO) 23

JMP (execution cycle 1): IR RD DATA BUS RD IR ACC B MEMORY PORT DECODE PC ALU CONTROL AND SEQUENCING FLAG ADDRESS BUS CLOCK CONTROL BUS 24

JMP (execution cycle 2): PC WR DATA BUS IR ACC B MEMORY PORT DECODE WR PC ALU CONTROL AND SEQUENCING FLAG ADDRESS BUS CLOCK CONTROL BUS 25

Intel Architecture 32 (IA-32) Instruction set for CPUs from 386 to the latest 32-bit processor, also known as x86-32 From programmer s point of view, IA-32 has not changed all that much except for the introduction of high-performance instructions Now being succeeded by IA-64 and AMD-64 (but not everything needs a bleeding-edge speed, memory, etc. so many applications / embedded controllers are just fine with 32-bit, 16-bit or even 8-bit processors) 26

Basic hardware constituents Chassis Controller board / Motherboard Peripheries: video, disk, etc. optional Memory ports 27

Motherboard / controller board CPU socket External cache memory slots Main memory slots BIOS chips Video/sound synthesizer chip (optional) ports and bus standards: Integrated Drive Electronics (IDE), parallel, serial, Universal Serial Bus, (video, keyboard, network, and mouse connectors) Peripheral Component Interconnect bus connectors (expansion cards) Other bus standards such as VMEbus 28

Intel D850MD Motherboard Video Audio chip mouse, keyboard, parallel, serial, and USB connectors PCI slots AGP slot memory controller hub Intel 486 socket dynamic RAM Firmware hub Controller Speaker Battery Source: Intel Desktop Board D850MD/D850MV Technical Product Specification IDE drive connectors Power connector Diskette connector 29

VME Controller Board & Chassis 30

Memory Dynamic RAM (DRAM) stores each bit of data on tiny capacitors on IC inexpensive, but must be refreshed constantly Static RAM (SRAM) uses RS or JK latches expensive; used for cache memory; no refresh required Video RAM (VRAM) dual ported (multiple read/writes occurring at the same time); optimized for constant video refresh CMOS RAM refreshed by a battery system setup information 31

Reading from memory Multiple machine cycles are required when reading from memory, because it responds much more slowly than the CPU. The steps are: address placed on address bus Read Line (RD) set low CPU waits one cycle for memory to respond Read Line (RD) goes to 1, indicating that the data is on the data bus Cycle 1 Cycle 2 Cycle 3 Cycle 4 CLK ADDR Address RD DATA Data 32

Cache memory High-speed expensive static RAM both inside and outside the CPU. Level-1 cache: inside the CPU Level-2 cache: outside the CPU Cache hit: when data to be read is already in cache memory Cache miss: when data to be read is not in cache memory Main design problem: minimize cache misses at a reasonable cost (compulsory, capacity, conflict) 33

Memory access: real mode 1 MB RAM maximum addressable (20-bit address) Application programs can access any area of memory Early µ-processors; single tasking; supported by MS-DOS operating system 34

Memory access: protected mode 4 GB addressable RAM (32-bit address) (00000000 to FFFFFFFF H ) Each program assigned a memory partition which is protected from other programs Designed for multitasking; supported by Linux & Windows 35

Multi-segment model Each program has a local descriptor table (LDT) holds descriptor for each segment used by the program RAM Local Descriptor Table multiplied by 1000h base limit access 00026000 0010 00008000 000A 00003000 0002 26000 8000 3000 36

Labs this week Learn about CPU operations by inspecting a simple assembler program execution Control USB device with digital inputs/outputs (C++ code with National Instruments driver for Windows XP/Vista) LTspice experiment: encryption/decryption of digital information using a pseudo-random number generator 37