Lecture 01dd

36
MCT3235 Microprocessors Based Design Lecture 01: Introduction

description

ggfg

Transcript of Lecture 01dd

Page 1: Lecture 01dd

MCT3235 Microprocessors Based Design

Lecture 01: Introduction

Page 2: Lecture 01dd

Course Contents Introduction to microprocessor organization and assembly language

programming Microprocessor architecture, programming model, addressing modes,

instruction set architecture, assembly language and programming, exception/interrupt processing, subroutine and parameter handling, memory system, I/O interfacing, a single board computer.

Course Goals Ability to (assembly) program for microprocessors and peripheral

devices, and to design and implement memory subsystem, I/O subsystem and a working single board computer

Page 3: Lecture 01dd

Course Administration Instructor: Yasir Mohd Mustafah

Textbook: The 68000 Microprocessor: Hardware and Software Principles and Applications, by James Antonakos, 5th

Edition, Prentice Hall, 2004.

Slides: Posted on course webpage after the lecture

Page 4: Lecture 01dd

Background from Previous course Number systems

binary, octal, hexadecimal, decimal numbers signed numbers base conversion

Design of combinational and sequential logic boolean algebra, truth table, expression simplification, adder,

decoder, encoder/priority encoder, multiplexer, state table, state diagram, latch, flip-flop, register, counter

Basic concepts of computer systems, software engineering, algorithm design, programming languages and data abstraction

Page 5: Lecture 01dd

Evolution of Computers First generation (vacuum tubes), 1946-1958

features huge, slow, expensive, and undependable Examples:

ENIAC (Electronic Numerical Integrator and Computer), 1946 EDVAC (Electronic Discrete Variable Automatic Computer), 1947 UNIVAC I (UNIVersal Automatic Computer), 1951

Second generation (transistor), 1959-1964 In 1947, John Bardeen, William Shockley, and Walter Brattain working

at AT&T's Bell Labs invented transistor Transistors conduct electricity faster and better than vacuum tubes,

were also much smaller and gave off virtually no heat compared to vacuum tubes

Third generation (integrated circuit), 1965-1970 Robert Noyce of Fairchild Corporation and Jack Kilby of Texas

Instruments independently discovered integrated circuits Fourth generation (LSI/VLSI, Microprocessor), 1971-present

By putting millions of transistors onto one single chip more calculation and faster speeds could be reached by computers.

Page 6: Lecture 01dd

Evolution of Computers

ENIAC (Electronic Numerical Integrator and Computer), 1946, UPenn

Fine-tuning ENIAC. J. Presper Eckert (the man in the foreground turning a knob) served and John Mauchly (center) designed ENIAC to calculate the trajectory of artillery shells. The machine didn't debut until February 1946, after the end of World War II, but it did launch the computer revolution.

Courtesy of the Computer History Museum.

Facts:5000 simple adds/subs per secondPower: 150KWWeight: 30 tonsSize: 1800 sq. ft (167 m2)

Contained 17,468 vacuum tubes, 7,200 crystal diodes, 1,500 relays, 70,000 resistors, 10,000 capacitors and around 5 million hand-soldered joints.

Page 7: Lecture 01dd

ENIAC Vacuum Tubes

Vacuum tubes act like an amplifier and a switch.  Without any moving parts, vacuum tubes could take very weak signals and make the signal stronger (amplify it).  Vacuum tubes could also stop and start the flow of electricity instantly (switch).  These two properties made the ENIAC computer possible.

Page 8: Lecture 01dd

The First Transistor

Modern-day electronics began with the invention in 1947 of the transfer resistor, also known as the bi-polar transistor by Bardeen et.al at Bell Laboratories

Page 9: Lecture 01dd

The First Integrated Circuit (IC)

In 1958 the integrated circuit was born when Jack Kilby at Texas Instruments successfully interconnected, by hand, several transistors, resistors and capacitors on a single substrate

Page 10: Lecture 01dd

2300 transistors13.5 mm2108k Hz

PMOS Technology

Intel 4004 Microprocessor (10000 nm) 1971

Page 11: Lecture 01dd

2nd Generation (32-bit) Motorola 68000

Major architectural step in microprocessors: First 32-bit architecture

initial 16-bit implementation First flat 32-bit address

Support for paging General-purpose register

architecture Loosely based on PDP-11

minicomputer First implementation in 1979

68,000 transistors < 1 MIPS (Million Instructions

Per Second) Used in

Apple Mac Sun , Silicon Graphics, & Apollo

workstations

Page 12: Lecture 01dd

IBM Power PC 970 (130nm) 2003

1.8 Ghz58 M118 mm2

Apple Power G5, the fastestPC in 2003, has dual PPC 970CPU

Page 13: Lecture 01dd

Sun Niagara I (Ultra SPARC T1)(90nm), 14 Nov. 2005

8 Processor Cores

Each SMT core running 4 threads total 32 threads

Each core at 1.2GHz

300M transistors

Die size: 380mm2

Page 14: Lecture 01dd

Intel Core2 Quad Processors (65nm), Jan. 2007

4 Cores on 2 separate dies on the same package

2.66GHz 291Mx2

transistors Die size:

143mm2x2

Page 15: Lecture 01dd

Intel i7

Page 16: Lecture 01dd

11/01/2008

Graph of Moore’s Law

Moore's law is the observation that, over the history of computing hardware, the number of transistors on integrated circuits doubles approximately every two years.

Page 17: Lecture 01dd

Graph of Moore’s Law

Page 18: Lecture 01dd

IC Evolutionhttps://www.youtube.com/watch?v=AjE_wGSL1VA

Page 19: Lecture 01dd

IC Design Process

https://www.youtube.com/watch?v=GdqbLmdKgw4

https://www.youtube.com/watch?v=qm67wbB5GmI

Page 20: Lecture 01dd

Microcomputer vs Microcontroller vs Microprocessor

Microprocessor :- A CPU that combine ALU and control unit in a single IC

Microcontroller :- Chip or device that contain MPU, memory and I/O circuitry.

Microcomputer :- A computing device that utilizes microprocessor as its CPU

Page 21: Lecture 01dd

Hardware, Software and Firmware Hardware – electrical, mechanical and magnetic devices Software – program direct activities of the computer

system Application Software System Software

Firmware – System software that reside on ROM

Page 22: Lecture 01dd

Microprocessor based Systems

Parallel I/O Serial I/O Interrupt Circuitry

CPUTiming Memory

System Bus

Page 23: Lecture 01dd

Microprocessor based Systems CPU (central processing unit)

microprocessor logic circuitry for communicating with the system bus: data/address bus

driver, bus controller Timing unit

generates clock signals and is responsible for the proper operation of all system hardware

crystal oscillator and timing circuitry Memory

stores both program code and data ROM (read-only memory), RAM (random access memory)

Interrupt circuitry mechanism for the processor to respond to special external events

I/O, peripherals monitor, keyboard, mouse, printer, …

Page 24: Lecture 01dd

Microprocessor Operation

Reset

Fetch

Decode

Execute

Start here at power-on or when a reset signal is received

1.Output inst. address on address bus

2. Read inst. pattern from memory onto data bus

3. Increment inst. pointer (program counter)

Determine what type of instruction was fetched

1. If necessary, read data from memory

2. Execute instruction

3. if necessary, write results to memory

Repeat this process until power is turned off or the processor is halted.

Page 25: Lecture 01dd

Pipelined Datapath of a Simple Microprocessor

Page 26: Lecture 01dd

Macintosh PCs based on 68000

Macintosh 512K introduced 1984 at $3300, discontinued 1986

CPU: 8MHz 68000 Performance: 0.7 MIPS ROM: 64KB RAM: 512KB, expandable to 4MB Display: 9” B&W screen, 512X342 pixels Keyboard, mouse Serial port: DB-9 modem and printer ports Floppy disk driver: floppy 400KB single side

*Most of the electronics were contained on motherboard.

Page 27: Lecture 01dd

Block Diagram of Macintosh 512K Motherboard

Processor68000

I/O Interface6522

Real-timeclock

Serial I/O8530

Floppy diskcontroller

SystemROM

RAM buffersand Mux

PALdecoders

DynamicRAM

512KB

Soundlogic

Videologic

Speaker Video display

Controlsignals

Modem PrinterMouse Keyboard

System bus

Disk drive

Page 28: Lecture 01dd

Program the Computer Systems

Software manages hardware resources and instructs hardware how to perform a task Device drivers System software: operating systems Application software

A general process for problem solving

ProblemData structures

& algorithmsfor solution

pseudo code

programming Programcode in HLL or Assembly

MachinecodeRun the code

translatingloadResults

Page 29: Lecture 01dd

Compilation, Assembly, and Linking

HLL compiler assembly assemblerHLLHLL assemblyassemblycode

linkerexecutableloader

assemblyassemblyobjectcode

Page 30: Lecture 01dd

Programming Languages print out “Hello!” on the display screen. High-level programming languages: C/C++/C#, Java, Pascal,

Fortran, … e.g.,

Assembly languages: 68000 assembly language

main() { printf(“%s”, “Hello!”);}

Page 31: Lecture 01dd

Programming Languages

Machine languages: recognized and executed by the hardware e.g.,

00008000 00008000 48 65 6C 6C 6F 2100008006 0000008100 00008100 227C 0000800000008106 103C 000E 0000810A 0000810A 4E4F 0000810C 103C 0009 00008110 4E4F 00008112

ORG $8000HMSG DC.B 'Hello!'

DC.B 0ORG $8100

START MOVEA.L #HMSG,A1MOVE.B #14, D0

TRAP #15MOVE.B #9,D0TRAP #15END START

memory address

binary code shown in Hex

Page 32: Lecture 01dd

Programming Tools for 68000 EASy68K (preferred for this course)

EASy68K is a 68000 Structured Assembly Language IDE. EASy68K allows you to edit, assemble and run 68000 programs on a Windows PC.

download from http://www.easy68k.com

Page 33: Lecture 01dd

EASy68K Development System

EASy68K includes Edit68K for editing and assembling 68000 assembly code and Sim68K for running 68000 programs

Start Edit68K from Windows XP Start menu All Programs EASy68K Edit68K

Page 34: Lecture 01dd

Edit 68000 Assembly Code in Edit68K

First 68000 assembly program: Hello.X68

Page 35: Lecture 01dd

After-Class Practice

Install Easy68K IDE tool Repeat the HELLO.X68 program

Page 36: Lecture 01dd

Next Lecture and Reminders

Next Lecture: 68000 Architecture

Reading: BK 2-17