Introduction To Embedded Systems
Introduction To Embedded Systems
Embedded Systems
Gaurav Sharma
C-DAC HYD
AGENDA
• Embedded Systems
• µP vs µC
• Processor Architecture
• Memories
• I/O
• BUSES
Why Learn ES
– Lot of hype
• No formal definition
• Generally accepted to be a type of computer designed to
solve a specific problem or task
• A combination of hardware and software, and perhaps
additional mechanical or other parts, designed to
perform a dedicated function.
• In some cases, embedded systems are part of a larger
system or product
EMBEDDED SYSTEM
➢ An embedded system is some combination of computer hardware
and software, either fixed in capability or programmable, that is
designed for a specific function or for specific functions.
HARDWARE HARDWARE
Typical embedded
General purpose system
computer System
Embedded Market
vivekn@cdac.in
Design Consideration
Cost Memory
Requirement
Embedded
System
S/W Performance
Reliability & flexibility
Development
Time
General Framework
• Embedded systems typically use a processor combined
with other hardware and software to solve a specific
computing problem.
• The processors range from simple (by today’s standards)
8-bit microprocessor/microcontrollers to the worlds
fastest and most sophisticated 64-bit microcontrollers.
• Embedded system software ranges from a small
executive to a large real-time operating system (RTOS)
with a graphical user interface (GUI).
• Embedded systems range from large computers such as
an air traffic control system to small computers.
Embedded System looks like . .
Memory
CPU chips
Serial
Digital I/O
Analog I/O
LAN
I/O controller chips
CPUs
• CPUs can be
– Microprocessors or Micro controllers
Princeton Harvard
• Contains 2 separate memory
• Single Main Memory holding spaces- code & data
both program and Data
RISC CISC
Memory Management
F2 D2 E2 W2
Instruction 1 Instruction 2
• 2 instructions take 4ns each
• A stage is used once every 4ns
• The resultant throughput is 4 cycles per instruction (CPI)
Pipeline Example
• Each stage is 1ns 2ns 3ns 4ns 5ns 6ns 7ns 8ns
utilized at every F1 D1 E1 W1
clock cycle. F2 D2 E2 W2
F3 D3 E3 W3
• 5 Instructions F4 D4 E4 W4
are executed in
F5 D5 E5 W5
8ns
F6 D6 E6
• Resultant F7 D7
throughput is 1 F8
instruction per
Instruction 1
cycle
Instruction 2
Instruction 3
Instruction 4
Instruction 5
Big Endian Little Endian
• Stores the most significant part Stores the least significant part
first
first e.g.: Intel
• e.g.: Motorola
e.g.: consider data 0x4567 at
location 0x5050
45
67
67
45
Memory Mapped IO IO Mapped IO
• IO devices are treated as like • IO devices are separately
interfaced.
memory . • Separate instruction set
• Memory related instructions available .
should be used to access IO .
memory memory
Input
CPU
Input memory
CPU output
output
Memory
NVRAM EEPROM
General components of a Microcontroller
• CPU – Heart of the controller. Composed of registers,
ALU, instruction decoder and the control circuitry.
• On Chip Memory – Used to store information
Memory
RAM (Volatile)
ROM(Non Volatile)
1.SRAM
1.PROM
2.DRAM
2.UV-EPROM
3.NV-RAM
3.EEPROM
4.FLASH
General components of a Microcontroller
• I/O Ports
– Used to interface with the peripheral devices and the
controller.
– Analog I/O and Digital I/O
• Timer/Counter
– For keeping Time and/or calculating the amount of
time between events
– For counting the events
– Baud rate generation
FLASH MEMORY
• Flash is believed to be close to perfect memory
• Advantages
– Fast read speeds
– Long-term data retention at much lower cost
• Drawbacks
– Doesn’t allow random bytes to be updated on the fly
– Limitations on number of times it can be re-written
Types of Flash Memory
NOR NAND
NOR vs NAND
• The arrangement of these cells
• The parallel interconnection of is significantly more compact
than in NOR.
the memory cells helps account
• The select gates allow higher
programming and erase
for their fast random read
voltages to be used without
disturbing the charge stored in
accessibility.
unselected cells.
• fast programming and erase
times
• Poor random read
performance
The winner is . . .
• NOR provides faster reads and allows random byte
access
• NAND writes and erases data faster, costs less per Mb
and uses less power than NOR.