Chapter 1-v3 ARM - 3
Chapter 1-v3 ARM - 3
Chapter 1-v3 ARM - 3
TECHNOLOGY
Layout of an IC
3
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
6
Components of a
microprocessor/controller
CPU: Central Processing Unit
I/O: Input /Output
Bus: Address bus & Data bus
Memory: RAM & ROM
Timer
Interrupt
Serial Port
Parallel Port
7
General-purpose microprocessor
(older version)
E.g: Motorola 68000
CPU for Computers (general purpose application)
Commonly no RAM, ROM, I/O on CPU chip itself
8
Microcontroller :
A single-chip computer
On-chip RAM, ROM, I/O ports...
Meant for special purpose application (cannot be used for general
purpose)
Example:Motorola’s 6811, Intel’s 8051, Zilog’s Z8 and PIC 16X
9
Microprocessor vs. Microcontroller (older version)
Microprocessor Microcontroller
CPU is stand-alone, RAM, • CPU, RAM, ROM, I/O and timer
ROM, I/O, timer are separate are all on a single chip
designer can decide on the • fixed amount of on-chip ROM,
amount of ROM, RAM and RAM, I/O ports
I/O ports. • for applications in which cost,
expensive power and space are critical
versatility
• single-purpose (control-oriented)
general-purpose
• Low processing power
High processing power
• Low power consumption
High power consumption
• Bit-level operations
Instruction sets focus on
processing-intensive • Instruction sets focus on control
operations and bit-level operations
Typically 32/64 – bit • Typically 8/16 bit
Typically deep pipeline (5-20 • Typically single-cycle/two-stage
stages) pipeline
10
Newer version of microprocessor:
The architecture is just like microcontroller: everything in
one chip (RAM, ROM, I/O…) – known as system-on-chip.
Can be used for general purpose and special purpose
application.
Newer version of microcontroller remains for special
purpose application: Arduino.
11
Evolution of microprocessor
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.
14
15
16
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
18
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
19
What is the difference between CISC and
RISC?
CISC – Complex Instruction Set Computer
RISC – Reduced Instruction Set Computer
Example:
20
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)
21
Basic Architecture of Microprocessor-based
System (cont.)
Initially, the system designers need to decide what instructions they need to use according to their design.
23
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.
24
Memory system in microprocessor based
(cont.)
25
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.
26
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.
27
RAM
28
Memory map in microprocessor-based
system
29
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
30
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.
31
Software (cont.)
English-like terms
representing binary
code
•CPU
•Memory (RAM, ROM)
•Disk drives
•Input/Output
32
Applications for each language
Applications for Machine Language
Virtually, no one programs in machine language because it wastes human time and is
difficult to document
An assembler costs is very little and greatly reduces the programming time.
Applications for Assembly language
Limited data processing
Short to moderate-sized programs
High volume applications
Real-time control applications
Applications involving more input/output or control than computation
Applications for High-Level Language
Long programs
Low volume applications
Programs which are expected to undergo many changes
Compatibility with similar applications using larger computers
Applications involving more computation than input/output or control
Applications where the amount of memory required is already very large
Availability of a specific program in a high-level language which can be used in the
application.
33
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.
34
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.
35