You are on page 1of 36

MCT3235 Microprocessors Based Design

Lecture 01: Introduction

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

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

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

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.

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.
Facts:
5000 simple adds/subs per second
Power: 150KW
Weight: 30 tons
Size: 1800 sq. ft (167 m2)

Courtesy of the Computer History Museum.

Contained 17,468 vacuum tubes,


7,200 crystal diodes, 1,500 relays,
70,000 resistors, 10,000 capacitors
and around 5 million handsoldered joints.

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.

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

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

Intel 4004 Microprocessor (10000 nm) 1971

2300 transistors
13.5 mm2
108k Hz
PMOS Technology

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

IBM Power PC 970 (130nm) 2003

1.8 Ghz
58 M
118 mm2
Apple Power G5, the fastest
PC in 2003, has dual PPC 970
CPU

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

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


4 Cores on 2
separate dies
on the same
package
2.66GHz
291Mx2
transistors
Die size:
143mm2x2

Intel i7

Graph of Moores 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.

11/01/2008

Graph of Moores Law

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

IC Design Process

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

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

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

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

Microprocessor based Systems

Parallel I/O

Serial I/O

Interrupt
Circuitry

CPU

Memory

System Bus

Timing

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,

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

Reset

1.Output inst. address on address bus


2. Read inst. pattern from memory onto data bus

Fetch

3. Increment inst. pointer (program counter)

Decode

Determine what type of instruction was fetched

1. If necessary, read data from memory

Execute

2. Execute instruction
3. if necessary, write results to memory

Repeat this process until power is turned off or the


processor is halted.

Pipelined Datapath of a Simple Microprocessor

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.

Block Diagram of Macintosh 512K Motherboard


Mouse

Processor
68000

Keyboard

I/O Interface
6522

Modem Printer
Realtime
clock

Serial I/O
8530

Disk drive

Floppy disk
controller

System bus
System
ROM

RAM buffers
and Mux

Dynamic
RAM
512KB

PAL
decoders

Sound
logic

Video
logic
Speaker

Control
signals

Video
display

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


pseudo code
Problem

Results

Data structures
& algorithms
for solution

Run the code

programming

load

Program
code in HLL
or Assembly

Machine
code

translating

Compilation, Assembly, and Linking

HLL
HLL
HLL

compiler

assembly
assembly
assembly
code

assembler

object
assembly
assembly
code
loader

executable

linker

Programming Languages
print out Hello! on the display screen.

High-level programming languages: C/C++/C#, Java, Pascal,


Fortran,
e.g.,
main() {
printf(%s, Hello!);
}

Assembly languages: 68000 assembly language

Programming Languages
Machine languages: recognized and executed by the
hardware
e.g.,
00008000
00008000
00008006
00008100
00008100
00008106
0000810A
0000810A
0000810C
00008110
00008112
memory
address

48 65 6C 6C 6F 21
00
227C 00008000
103C 000E
4E4F
103C 0009
4E4F

binary code
shown in Hex

ORG
$8000
HMSG
DC.B
'Hello!'
DC.B
0
ORG
$8100
START MOVEA.L #HMSG,A1
MOVE.B #14, D0
TRAP
MOVE.B
TRAP
END

#15
#9,D0
#15
START

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

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

Edit 68000 Assembly Code in Edit68K


First 68000 assembly program: Hello.X68

After-Class Practice
Install Easy68K IDE tool
Repeat the HELLO.X68 program

Next Lecture and Reminders


Next Lecture: 68000 Architecture
Reading: BK 2-17

You might also like