80X86 Instructions
Download
Report
Transcript 80X86 Instructions
ECPE 4535
Microprocessor System Design
Introduction and Course Overview
Prof. A. L. Abbott E-Mail: [email protected]
What we expect of you . . .
• An understanding of the basics of
o
o
o
o
o
Combinational logic
Sequential logic
Binary representations and arithmetic
Assembly language
Computer organization
What we expect of you . . .
• To do some work:
o Laboratory assignments
Technical content
“Writing intensive” content
SEGMENT code
o Short quizzes
o 2 midsemester exams
o Final exam
• Access to a PC for lab assignments
• A desire to learn about microprocessors!
What you can expect of us . . .
Course Objectives
• Develop an in-depth understanding of the
operation and design of microprocessors
in general, to include:
o Hardware
o Software
o Integrated systems
Cont.
Course Objective
• Develop a thorough understanding of the
Motorola 68HC11 micro controller as a
learning vehicle
• Ultimate goal: be able to apply this
knowledge to more advanced
microprocessors
Common Computer Organization
Cont.
Common Computer Organization
Memory: Stores programs and data
CPU: Central Processing Unit
ALU: Arithmetic & Logic Unit
Control unit: Sequences data transfers and
other operations
I/O unit: Communicates with the “outside
world”
This classic computer organization is named
after von Neumann (1946)
o Store programs as codes that can be changed
easily, rather than using special wiring
o This made the machine “general-purpose”
o Instructions and data can share the same memory
space
o Normally programs are stored as sequences of
o instructions, and one instruction is executed at a
time
• A system's architecture is determined
by both its hardware and its software
• Pragmatically, the development of an
"architecture“ is the process of
deciding what functions are placed in
hardware instead of software
Hardware Design Levels
•Global (overall system structure)
o Processors
o Control
o Memory units
o I/O channels
•Processor
o Interfaces
o Instruction sets
o Data representation
Cont.
Hardware Design Levels
• Register
o Focus on the actual processing of information(words
or bytes)
How are instructions executed?
How is data moved through the system?
• Define the components of the ALU, control
unit, memory, etc.
Muxes, decoders, arithmetic units
Counters, registers, clocks
Cont.
Hardware Design Level
• Gate (logic)
o Process individual bits of information
o Gates are the primitive design elements
Software Design Levels
• Applications programs
o User “runs” an existing software package
o Examples: Excel, Netscape, Word, . . .
o Limited flexibility (none?) outside intended
application
• High-level language (HLL)
o
o
o
o
User writes programs to perform task(s)
Very flexible, easy to use (once language is learned!)
Applications programs are portable
Examples: C, C++, Java, Fortran
Cont…
Software Design Level
• Assembly language
o Harder to use than HLLs
o Machine and configuration dependent
o Requires detailed knowledge of the microprocessor itself and
its instruction set
o Still used where extremely high performance or short
programs are required
• Machine code
o Native language of the processor itself
o Programs are the actual bytes as stored in memory
o Not intended for human consumption
Microprocessor History
• 4 decades of development and evolution
o Intel 4004 (introduced in early 1970s)
4-bit words, 4 KB memory address space
2,000 transistors
Clock speed < 1 MHz
o Alpha 21264 (late 90’s)
15.2 million transistors
Clock speed near 700 MHz
o Pentium III (late 90’s)
64-bit data with gigabit memories
28 million transistors
Clock speeds up to 1 GHz
Performance vs. Functionality
o Microprocessors have evolved in two directions
Cont.
Performance vs. Functionality
Cont.
Performance vs. Functionality
• Microprocessors: high performance, general purpose
“brains” for PCs and workstations
o Instruction decode and control, arithmetic/logic
operations, registers, timing, external control
o Typical cost: $75 -- $500
o Annual demand: 10s of millions
Cont.
Performance vs. Functionality
• Microcontrollers: devices with high levels of
integration for embedded control
o Microprocessor functions plus on-chip memory and
peripheral functions (e.g. ports, timers)
o "Swiss army knife" of microprocessor technology
o Typical cost: $1-- $25
o Annual demand: billions!
Microprocessor vs. Microcontroller
• Not always a clear distinction
o Today’s microprocessor may be tomorrow’s
microcontroller
• Microprocessor
o Includes memory management unit
o Lots of cache
o Performance is most important feature (cost is
important, but secondary)
o Used mainly in desktop machines
Send.
Microprocessor vs. Microcontroller
• Microcontroller
o
o
o
o
o
o
Integrated RAM and ROM
No cache
Includes lots of peripherals
Used mainly in “embedded” applications
Often involves real-time control
Important features include
Low cost
Low power consumption
Number of integrated peripherals
Interrupt response time
Amount of RAM and ROM
Some Microcontroller Applications
• When we sell it we have no idea whether it will
end up in a toaster or the space shuttle”
[‘Invisible Computers,’ Financial World, 1995]
o Pocket pagers (low-power, interprets characters, user
interface)
o Cameras (low-power, exposure and focus control, user
interface)
o "Level-meter“ (measures angle, audible and visual user
interface)
o Keyboard controllers (scanning, de-bounce, auto-repeat,
diagnostics)
o Modems (one for data transmission, on for command
processing)
Cont.
Some Microcontroller Applications
o Plotters (command interpretation, encoders, motor control)
o Color copiers (paper positioning, color exposure, sensors)
o Charge card pay phones (card reading, dialing, carrier access)
o Lawn sprinkler controller (timer, valve control, user interface)
o Instrumentation (user interface, GPIB interface, compute values)
o Closed-loop engine control (fuel/air mixture, ignition, pressure
sensing, etc.)
o Antilock braking system control (monitors traction, controls
brake)
o Dynamic ride control (adjusts suspension)
Figure 1.4 Block diagram of a typical microcontroller single chip mode)
Figure 1.5 Block diagram of typical microcontroller (expanded mode)
Higher-level view
The instruction cycle (“fetch/execute cycle”)
• Fetch
o Control unit gets next instruction
from memory
• Execute
o Control unit decodes the instruction
(figures out which instruction it has)
o Control unit carries out the
instruction by transferring data
to/from appropriate places, possibly
specifying ALU microoperations and
possibly involving I/O hardware
NEXT
• 68HC11 hardware (next class period)
• 68HC11 software (next 3+ weeks)