You are on page 1of 27

BENM 2423 MICROPROCESSOR

TECHNOLOGY

Chapter 1: Introduction to Microprocessor


Definition of microprocessor
 Microprocessor (abbreviated µP)
• The word comes from the combination micro and processor.
• Micro is the term used to represent the size of the circuit that form this
solid state device. (micro = 10-6)
• Thick of human hair = 100 micron.
• Processor means a device that processes numbers, specifically binary
numbers, 0’s and 1’s.

MOSFET structure with L = 1 micron


Microprocessor
 A digital electronic component with miniaturized transistors
on a single semiconductor integrated circuit (IC).

 The microprocessor is a programmable device that takes in


numbers, performs on them arithmetic or logical operations
according to the program stored in memory and then
produces other numbers as a result.

Layout of an IC
Microprocessor: What is it used for?
 Microprocessors are used for general
purpose computing systems such as
• Personal Computer (PC) – computer on your desk
• Laptop – portable computer you can put on your
lap
• Mainframe – powerful computers for high
performance task
• Personal Digital Assistant (PDA) - hand-sized
computer

 Microprocessor is also used for embedded


system An embedded system is
some combination of
computer hardware and
• General-purpose microprocessors are also used in software, either fixed in
embedded systems, but generally require more capability or programmable,
support circuitry than microcontrollers. Electronic that is specifically designed
for a particular function.
devices/gadgets that have the capability like computer
• Computing systems embedded within electronic
devices designed to perform a specific function
Microprocessor: What is it used for? (cont..)
Eg: (micro-p as embedded system)
Type of embedded system Example
Portable devices digital watches, PDAs, digital cameras,
GPS units and MP3 players.
Larger systems traffic lights, systems controlling power
plants and factory controllers.
Telecommunications systems also use several embedded systems
from telephone switches to mobile
phones.
Consumer electronics video game consoles, DVD players and
printers.
House hold appliances microwave ovens, washing machines
and dishwashers use embedded
processors as well.
Microprocessors in the market
Microprocessor vs microcontroller
Microprocessor Microcontroller
• Designed for general tasks and specific • Designed for specific tasks. Specific –
tasks. applications where the relationship of input
and output is defined.
• an IC which has only the CPU inside them. • CPU, RAM, ROM, I/O ports is embedded on
It don’t have RAM, ROM and other a single chip (compact)
peripherals (add them externally). → Reduces size and cost
→ costly
• The clock speed of the Microprocessor is • operate from a few MHz to 30 to 50 MHz
quite high as compared to the
microcontroller
→ >1GHz
Application: Desktop PC’s, laptops, notepads, Application: digital camera, pendrive, remote,
etc. microwave, cars, bikes, telephone, mobiles,
watches, etc.
Microprocessor find applications where tasks
are unspecific like developing software, games,
websites, photo editing, creating documents
etc.
Evolution of microprocessor

68k uses CISC architecture


Evolution of ARM processor
ARM microprocessors are the most widely used processors in the world today - 1.66 billion ARM processor
units were shipped in 2005! Arguably among the most advanced systems in their class, ARM processors are a
Cambridge success story. The ARM processor architecture will be used to provide concrete examples of how
the theory is implemented in the real world.

ARM7TDMI was designed in 1998. It uses RISC architecture


Comparison between Havard and Von
Neumann Computer Architecture
• Basically, there are 2 types of digital computers namely Von Neumann and
Havard.
• Havard comes later than Von Neumann with more advance features.

Von Neumann Havard


 Same memory holds data, instructions  Separate memories for storing data and
program (instructions).
 A single set of address/data buses
 Two sets of address/data buses between
between CPU and memory CPU and memory
 Processor needs two clock cycles to  Processor can complete an instruction
complete an instruction. Pipelining the in one cycle if appropriate pipelining
instructions is not possible with this strategies are implemented.
architecture.
address address address

Data Program
control control control
Memory Processor Memory Processor Memory
(RAM) (ROM)
Instructions/data data instruction

→ Most of the modern computing architectures are based on Harvard architecture. But the
number of stages in the pipeline varies from system to system.
What is pipelining?
Pipelining, a standard feature in RISC processors, is much like an assembly line. The
processor works on different steps of instruction at the same time that results in
shorter period of time. Eg: Laundry analogy

Without pipelining With pipelining


 A smarter approach would be to put the
 4 loads of dirty laundry need to be washed, 2nd load of dirty laundry into the washer
dry and folded. after the 1st load was already clean and
 We could put the 1st load in the washer whirling happily in the dryer.
(30 min), dry (40 min) and fold.  Then, while the 1st load is being folded, the
 Repeat for 2nd, 3rd and 4th load. 2nd load would dry, and the 3rd load could
be added to the pipeline laundry.
 If we start at 6pm, we would still be doing
laundry until midnight.  Using this method, the laundry would be
finished by 9.30pm.

Wash, dry, fold


Wash, dry, fold
Wash, dry, fold

Wash, dry, fold


Types of instruction set
Complex Instruction Set Computer Reduced Instruction Set Computer
(CISC) (RISC)
Many addressing modes Fewer addressing modes
Long instructions Compact, uniform instructions
Variable length instructions Fixed length instruction
Fewer line of code More lines of code → large memory
footprint
Pipelining is difficult Pipelining is easy

Each instruction is
Each instruction in fixed length
can be in variable
length
What is the difference between CISC and
RISC?
 CISC – Complex Instruction Set Computer
 RISC – Reduced Instruction Set Computer

 Example:

Which one is faster?


Basic Architecture of Microprocessor-based
System
▪ Microprocessor itself is completely useless – must have
supporting devices to be a complete computer system.
▪ Essential elements
• Microprocessor (or CPU)
• Memory
• Input/output
▪ Connected by system bus (lines)
Basic Architecture of Microprocessor-based
System (cont.)
Initially, the system designers need to decide what instructions they need to use according to their design.

How do CPU access data from memory or input port?


✓CPU will request instruction from memory.
✓Instructions and data are stored in memory in specific locations determine by the program.
Data can also be obtained from input port.
✓Each location in memory has a unique address associated with it.
✓Instructions are obtained by the CPU by placing an address on the address bus.
✓Instructions are transferred via the data bus as they are requested by CPU.
✓CPU executes the instructions, store the modified data back in memory.
✓The control bus will coordinate all of these operations.
CPU operation (How CPU communicates
with memory?)
Microprocessors are controlled by
programs, which are simply lists of
simple instructions.
Microprocessors can execute
millions of these instructions
every second.
 Most processors operate according to
von Neumann sequence/cycle.
 In the EXECUTE step, results are
returned to registers and memory.
What is memory?
 Memory consists of electronic components that store instructions and
data (binary) waiting to be executed by the processor.
 Memory stores three basic categories of items:
 OS and System software
 Application program
 Processed data
 Types of memory:
 Random Access Memories – SRAM, DRAM
 Read Only Memories –ROM, PRO , EPROM, EEPROM, Flash
 Storage – floppy disk, hard disk, CD, DVD, Blue-ray CD, tape.
Memory system in microprocessor based
(cont.)

Data bus is bidirectional


Write – data units are stored into
specified address in memory
Read – data unit comes out from
specified address in memory
Accessing memory in microprocessor based
system
Read data from a memory into a
microprocessor
• Set address of the memory location
where intended data is stored.
• Set the Read control signal
• Data is read.

Write data from a microprocessor


into a memory
• Set address of the memory location
where processed data will be stored.
• Set the Write control signal
• Data is written/stored

Is this memory a RAM or ROM


type??
Volatile vs nonvolatile memory
 Volatile memory
 When the computer power is turned off, the contents lost
 Example: RAM
 RAM is a read/write memory in which data can be written
into or read from any selected address.
 Nonvolatile memory
 Data are stored permanently.
 Does not lose its contents when power is removed from
computer
 Example: ROM, flash memory
 Data can be read from a ROM, but there is no read/write
operation as in the RAM.
RAM

Function of RAM in modern computer architecture


Memory map in microprocessor-based
system

Refer to the datasheet of ARM processor to know the


exact memory location
Input/Output peripherals
 Input/output devices are electronic circuits/equipment
used to enter information and instructions into a
computer for storage or processing
 Input devices – keyboard,mouse, scanner
 Output devices – printer, monitor
Software
 Once you have a working prototype, you can put away
the soldering iron because all operational changes can
then be made with software.
 Areas such as address decoding, chip enables, instruction
timing and hardware interfacing become important when
programming microprocessors.
 Eg: Basic I/O operation
To route the data from the input switches to the output LEDs, the data from the
input port must first be read into the microprocessor before they can be sent to
the output port.

The software used to drive microprocessor-based


systems is called assembly language.
Software (cont.)

Closer to human language

English-like terms
representing binary
code

Binary code (1s and


0s)

•CPU
•Memory (RAM, ROM)
•Disk drives
•Input/Output
Software (cont.)
Assembly language
 To avoid using 1s and 0s strings, english-like terms called mnemonics or opcodes
are used.
 Each microprocessor have its own mnemonic instructions.
 Mnemonic instruction for a given processor is called instruction set.
 Assembly program for Motorola processors will not work on Intel processors.
Even if the processors are within the same family, the assembly program are also
different.

Then, why do you need to use assembly language?


 Teach how a computer works at the machine level
 Consume small memory
 Fast
Assembly language
 Why do you need to learn assembly language?
 Software engineers who create compilers will need good
understanding of the machine including its architecture,
instruction set(s) and programmer’s model.
 Application engineers, or any engineer writing hand optimized
routines for performance reasons, will need to understand
assembly.
 Certain features of processors can only be accessed using
native instructions of the hardware. Eg: saturated maths
operation or access to coprocessors.
 Hardware engineers who design the next generation of
microprocessors and microcontrollers will need to understand
how they work at the lowest level.

You might also like