General Computing
Embedded Systems
Microprocessor Architecture
System Software and Tools
Microprocessor Systems
Introduction
University of Engineering and Technology Lahore
General Computing
Embedded Systems
Microprocessor Architecture
System Software and Tools
Contents
1 General Computing
2 Embedded Systems
3 Microprocessor Architecture
4 System Software and Tools
2/21
General Computing
Embedded Systems
Microprocessor Architecture
System Software and Tools
General Purpose Computer
Control
Unit
Arithmetic
Logic Unit
Input Unit
Output Unit
Registers
Main Memory
(e.g., RAM)
Secondary Memory
(e.g., Hard Disk)
3/21
General Computing
Embedded Systems
Microprocessor Architecture
System Software and Tools
An Embedded System
Bus
Embedded system
parameters
• Processing rate and
processor size
• Different types of I/O
devices that can be
interfaced
• Memory size (RAM
and ROM)
Microprocessor
Memory
Peripheral
Interfaces
Microcontroller
I/O devices
(Display,
keypad)
Electrical, mechanical,
optical, etc. devices
Embedded System
4/21
General Computing
Embedded Systems
Microprocessor Architecture
System Software and Tools
Embedded System Hierarchy
• Embedded
System:
Microcontroller,
sensors, actuators,
ASICs
• Microcontroller:
Microprocessor,
memory,
peripherals
Embedded System
Microcontroller
Microprocessor
5/21
General Computing
Embedded Systems
Microprocessor Architecture
System Software and Tools
The Microcontroller
Address Bus
Data Bus
Control Bus
Microprocessor
• Microprocessor
• Code and data
memories
• Peripherals for I/O
interfaces
• Bus system for
connectivity
Code
Memory
Data
Memory
Control & Timing
Interfaces
Digital
I/Os
Analog
I/Os
Communication
Interfaces
Microcontroller
6/21
General Computing
Embedded Systems
Microprocessor Architecture
System Software and Tools
Memory
Read only memory
• Programmable ROMs (PROMs)
• Erasable Programmable ROMs (EPROMs)
• Electrically Erasable PROMs (EEPROMs)
• Flash memory
Random access memory (Read write memory)
• Dynamic RAM (DRAM): Slower, high density, 2 transistors
and a capacitor
• Static RAM (SRAM): Faster, 4 to 6 transistors for each 1-bit
cell, low density
7/21
General Computing
Embedded Systems
Microprocessor Architecture
System Software and Tools
The Microprocessor
A microprocessor has five
basic components:
• arithmetic logic unit
(ALU),
• control unit,
• bank of registers,
• interconnection buses,
and
• timing unit.
Program Counter
Control Unit
Arithmetic Logic
Unit
Timing
Unit
Register File
8/21
General Computing
Embedded Systems
Microprocessor Architecture
System Software and Tools
Microprocessor Architecture
• Instruction set architecture
• Memory interface-based architecture
Microprocessor
Instruction Set
Architecture
Complexity based
Classification
Instruction Operand
based Classification
Memory Interface
based Classification
Harvard
Architecture
von Neuman
Architecture
9/21
General Computing
Embedded Systems
Microprocessor Architecture
System Software and Tools
Microprocessor Architecture Cont’d
Address Bus
Data Bus
Control Bus
Processor
Code
Memory
Data
Memory
Harvard Bus
Architecture
Address Bus
Data Bus
Control Bus
10/21
Code
General Computing
Embedded Systems
Microprocessor Architecture
Memory
Data
System Software and Tools
Memory
Harvard Bus
Microprocessor
Architecture Cont’d
Architecture
Address Bus
Data Bus
Control Bus
Processor
Code
Memory
von Neuman Bus
Architecture
Data
Memory
11/21
General Computing
Embedded Systems
Microprocessor Architecture
System Software and Tools
Microprocessor Architecture Cont’d
• Instruction set architecture classification based on complexity
• Complex instruction set computers (CISC)
• Reduced instruction set computers (RISC)
• Instruction set architecture classification based on instruction
operands
• Memory-memory: VAX processor
• Register-memory: x86, Motorola 68K
• Register-register: ARM, MIPS, Motorola PowerPC, RISC V
12/21
General Computing
Complex Instruction
Microprocessor Architecture
Set Compuetr
Embedded Systems
32-bit
von Ne
Archite
System Software and Tools
CISC vs RISC
RISC
Architecture
CISC
Architecture
Complex Tool
Development
Software Tools
Simplified Tool
Development
Simplified Hardware
Processor
Complex Hardware
13/21
General Computing
Embedded Systems
Microprocessor Architecture
System Software and Tools
CISC Features
• A single complex instruction can perform multiple operations
• Complex instructions, with varying instruction length, require
many processor clock cycles to complete
• A program running on a CISC architecture based machine
involves a relatively smaller number of complex instructions,
thus providing high code density
• In CISC the complexity is embedded in the processor
hardware, making the compilation tools design simpler
14/21
General Computing
Embedded Systems
Microprocessor Architecture
System Software and Tools
RISC Features
• Simplified instructions used by the architecture
• Each complex operation is broken into multiple simplified
operations e.g., load and store instructions are provided for
memory read and write operations. Other instructions cannot
access memory directly.
• RISC computer requires a relatively larger number of
simplified instructions and results in low code density
• An associated advantage is fewer memory addressing modes
resulting in reduced complexity
• The simplicity in the hardware architecture in RISC is
complemented by the increased complexity in the generation
of assembly code by the tools (compiler)
15/21
General Computing
Embedded Systems
Microprocessor Architecture
System Software and Tools
Software System
User
Application 1
User
Application k
Operating System Call Interface for
Application
System
Libraries
Operating System (OS) Core
Architecture Dependent OS
Components
Device
Drivers
Hardware
16/21
General Computing
Embedded Systems
Microprocessor Architecture
System Software and Tools
Compilation Process
Source code
(High level)
Compiler
User assembly
code
Low level
source code
Assembler
Assembler
Machine code
Machine code
17/21
General Computing
Embedded Systems
Microprocessor Architecture
System Software and Tools
Linking Process
Cofigurations
List file
Source code
(High level)
Source code
(High level)
Compiler
Compiler
Machine/
object code
Machine/
object code
Linker
Executable
Library
MAP file
18/21
General Computing
Embedded Systems
Microprocessor Architecture
System Software and Tools
Debugging Tools and Techniques
• Helps to reduce the system prototyping time,
• Facilitates to identify both hardware and software problems in
the prototype as well as the software application
• Can assist in the process of fine tuning certain parameters of
the system
19/21
General Computing
Embedded Systems
Microprocessor Architecture
System Software and Tools
Debugging Techniques
• Manual methods: Are not sophisticated but can be readily
used for locating and correcting the program errors, e.g., Print
statements, Status dumps
• Software-only : The tools are in the form of simulators and
monitors but do not have any hardware dependency, e.g.,
Software simulators, Monitors
• Software-hardware: Hardware dependent and spans a large
range from highly expensive in-circuit emulators to relatively
less expansive in-circuit debuggers, e.g., In-Circuit debuggers,
In-Circuit emulators
20/21
General Computing
Embedded Systems
Microprocessor Architecture
System Software and Tools
In-Circuit Debuggers
• ICD connectivity with hardware platform
User
Computer
Debug Communication
Interface
ICD Device
Microcontroller or
Target Platform
Serial Interface
(USB is most common)
21/21