1
Lecture 01: Introduction
Textbook:
The 68000 Microprocessor: Hardware and Software Principles and
Applications, by James Antonakos, 5th Edition, Prentice Hall, 2004.
Excerpted from lecture notes prepared by Jie Hu, Assistant Professor, Electrical and Computer EngineeringNewark College of EngineeringNew Jersey Institute of Technology
Topics
v Evolution of computers
v Microprocessor based systems
v Microprocessor operation
v Historic perspective: the Macintosh PC
v Programming languages
v Developing software for 68000 microprocessor
Evolution of Computers
v 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
v 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
v Third generation (integrated circuit), 1965-1970Ø Robert Noyce of Fairchild Corporation and Jack Kilby of Texas
Instruments independently discovered integrated circuits
v 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
v 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.
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
v 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
2
The First Integrated Circuit (IC)
v 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
2300 transistors13.5 mm2108k Hz
Intel 4004 Microprocessor (10000 nm) 1971
2nd Generation (32-bit) Motorola 68000
v 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
v First implementation in 1979
Ø 68,000 transistors
Ø < 1 MIPS (Million Instructions Per Second)
v Used in
Ø Apple Mac
Ø Sun , Silicon Graphics, & Apollo workstations
IBM Power PC 970 (130nm) 2003
1.8 Ghz58 M118 mm2
Apple Power G5, the fastestPC in 2003, has dual PPC 970CPU
Sun Niagara I (Ultra SPARC T1)(90nm), 14 Nov. 2005
v 8 Processor Cores
v Each SMT core running 4 threads à total 32 threads
v Each core at 1.2GHz
v 300M transistors
v Die size: 380mm2
Intel Core2 Quad Processors (65nm), Jan. 2007
v 4 Cores on 2 separate dies on the same package
v 2.66GHz
v 291Mx2 transistors
v Die size: 143mm2x2
3
Microprocessor based Systems
Parallel I/O Serial I/OInterruptCircuitry
CPUTiming Memory
System Bus
Microprocessor based Systems
v CPU (central processing unit)
Ø microprocessor
Ø logic circuitry for communicating with the system bus: data/address bus driver, bus controller
v Timing unit
Ø generates clock signals and is responsible for the proper operation of all system hardware
Ø crystal oscillator and timing circuitry
v Memory
Ø stores both program code and data
Ø ROM (read-only memory), RAM (random access memory)
v Interrupt circuitry
Ø mechanism for the processor to respond to special external events
v I/O, peripherals
Ø monitor, keyboard, mouse, printer, …
Microprocessor based Systems
Microprocessor, by-itself, completely useless – must have external peripherals to Interact with outside world
Microprocessor Vs Microcontroller
No matter what is the system size, the most important component
is still the processor
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.
Contin…
v Fetch cycle:
during it, processor loads an instruction from memory into its internal instruction register
v Decode cycle:
during it, microprocessor determines what type of instruction has been fetched
v Execute cycle:
may need to read more data from memory or write results to memory
v Also monitors other signals such as WAIT, HOLD, or READY inputs
4
Macintosh PCs based on 68000
v Macintosh 512K introduced 1984 at $3300, discontinued 1986
v CPU: 8MHz 68000
v Performance: 0.7 MIPS(Million instruction
per second)
v ROM: 64KB
v RAM: 512KB, expandable to 4MB
v Display: 9” B&W screen, 512X342 pixels
v Keyboard, mouse
v Serial port: DB-9 modem and printer ports
v Floppy disk driver: floppy 400KB single side
*Most of the electronics were contained on motherboard.
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
SpeakerVideo
display
Control
signals
Modem PrinterMouse Keyboard
System bus
Disk drive
Program the Computer Systems
v Software manages hardware resources and instructs hardware how to perform a task
Ø Device drivers
Ø System software: operating systems
Ø Application software
v A general process for problem solving
ProblemData structures
& algorithmsfor solution
pseudo code
programming Programcode in HLL or Assembly
Machinecode
Run the codetranslatingload
Results
Compilation, Assembly, and Linking
HLL compiler assemblyassemblerHLLHLL assemblyassembly
code
linkerexecutableloader
assemblyassemblyobject
code
Programming Languages
v Natural languages: English, Chinese, French, …
Ø e.g., “please print out ‘Hello!’ on the display screen.”
v High-level programming languages: C/C++/C#, Java, Pascal, Fortran, …
§ Syntax of a high-level language is similar to English
§ A translator is required to translate the program written in a high-level language into object code -- done by a compiler.
§ There are cross compilers that run on one onecomputer but translate programs into machine instructions to be executed on a computer with a different instruction set.
§ Main drawback is slower execution speed of the machine code obtained after compiling an HLL program.
Programming Languages
§ However, C language has been extensively used in microcontroller programming in industry
v Assembly languages: 68000 assembly language, …Ø e.g.,
ORG $8000 ;starting address of data
HMSG DC.B ‘Hello!’ ;message characters
DC.B 0 ;end-of-message marker
ORG $8100 ;starting address of program
START MOVEA.L #HMSG,A3 ;load A3 with message address
TRAP #3 ;output message
TRAP #9 ;return to command processor
END START
main() {
printf(“%s”, “Hello!”);
}
5
Programming Languages
§ An assembly program consists of assembly instructions§ An assembly instruction is a mnemonic representation of
a machine instruction e.g. MUL may stand for “multiply”§ Assembly programs must be translated into object code
before it can be executed -- translated by an assembler.§ Assemblers can be of two types: cross assembler and
native assembler.§ Cross assembler runs on one computer and generates
machine instructions that will be executed by another computer that has different instruction set, e.g.freeware ASM68K.
§ Native assembler runs and generates instructions for the same computer.
§ Drawbacks of assembly programs are:dependent on hardware organisation, difficult to understand long programs, low programmer productivity
Programming Languages
v Machine languages: recognized and executed by the hardware
Ø e.g.,
008000
008000 4865 6C6C 6F21
008006 00
008100
008100 267C 0000 8000
008106 4E43
008108 4E49
00810A
ORG $8000
HMSG DC.B ‘Hello!’
DC.B 0
ORG $8100
START MOVEA.L #HMSG,A3
TRAP #3
TRAP #9
END START
memory address
binary code shown in Hex
Hard to understand for human being
Jie Hu, ECE/NJIT, Fall 2008ECE252 L01-Introduction.27
Programming Tools for 68000
v 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.monroeccc.edu/ckelly/EASy68K.htm
v or DOS based 68000 toolsØ com68k: 68000 C compiler (from the CD with the text book)
Ø asm68k: 68000 assembler
Ø emu68k: 68000 emulator
EASy68K Development System
v EASy68K includes
Ø Edit68K for editing and assembling 68000 assembly code
Ø and Sim68K for running 68000 programs
v Start Edit68K from Windows XPØ Start menu à All Programs à EASy68K à Edit68K
Edit 68000 Assembly Code in Edit68K
v First 68000 assembly program: Hello.X68
Assemble 68000 Code in Edit68K
v After save source code Hello.X68, click “Assemble Active Source” button to assemble the code
6
Assemble 68000 Code in Edit68K
v After assembling, two more files will be created in the same directory of Hello.X68: Hello.L68 and Hello.S68
Simulating 68000 Code after Assembling
v Click “Execute” button in the Popup window to invoke Sim68K to run the code
Simulating 68000 Code after Assembling Check the Simulation Results