Date post: | 01-Apr-2015 |
Category: |
Documents |
Upload: | chris-pennings |
View: | 217 times |
Download: | 0 times |
Designing Embedded Hardware01. Introduction of Computer Architecture
Yonam Institute of Digital Technology
OverviewIntroduction of Computer
Architecture
2
Computer?
What is the difference between desktop computer
and embedded computer?
Basic ConceptsBasic Concepts
What is Computer?
4
Computer is a machine for
processing, storing, and retrieving data.
1) processor, memory, devices and so on.2) firmware, bootloader, operating system, application
Computer is composed of
hardware1) and software2)
Introduction of Computer Architecture
•Software Layers
5
Introduction of Computer Architecture
Basic System Architecture
6
Introduction of Computer Architecture
•Processor? Or Controller?1)
7
ControlUnit
ArithmeticUnit
RegisterUnit
Auxiliary MemoryUnit
Main MemoryUnit
OutputUnit
InputUnit Interrupt
Handler
DMAHandler
ParallelIO Port
SerialIO Port
ROM
RAMTimer/Counter
AD/DAConverter
CPUCore
1) The figures on this slide are cited from http://sjlee.sch.ac.kr/lecture/mp/06-mp-mpintro-1.pdf
Introduction of Computer Architecture
•Data Flow (Instruction vs. Data)
CPU Memory CPU MemoryRead
Read
Write
Instructions Data
8
Introduction of Computer Architecture
•von Neumann vs. Harvard
CPU
ProgramandData
Memory
von Neumann Architecture
DataMemory
CPUProgramMemory
Harvard Architecture
9
Introduction of Computer Architecture
•How to Access I/O Device
10
Introduction of Computer Architecture
•Bus▫A physical group of signal lines that have a
related function▫Makes it possible to transfer information from
one device to another
11
3-Bus System
Introduction of Computer Architecture
•Processor Operations
12
Writing data to memory and IO device Reading data from memory and IO device Reading instruction from memory Manipulating data within processor internally
Introduction of Computer Architecture
•ALU (Arithmetic Logic Unit)▫performs the mathematical operations of data
within processor addition, subtraction, NOT, AND, OR, shift,
rotate, and so on
13
register
registeror
memory
registeror
memory
Introduction of Computer Architecture
Interrupt
•Interrupts (traps or exceptions)▫A technique of diverting the processor from the
execution of the current programs so that it may deal with some event that has occurred.
•Types of Interrupts▫Hardware interrupts▫Software interrupts
14
Introduction of Computer Architecture
•Polling vs. Interrupt
15
Start
Return
Device 0Flag set?
Device 1Flag set?
Service Device 0
Return
Return
Service Device 1
yes
yes
no
no
Introduction of Computer Architecture
•Interrupt Handling
16
Introduction of Computer Architecture
CISC vs. RISCCISC1) RISC2)
# of instructions A few hundreds A few tens
Instruction Length Variable (1 ~ 17 bytes) Fixed (4 bytes)
Instruction execution time
Variable (1 ~ 300 clks / inst.)
Fixed (1 clk/inst.)
Pipelining Not efficient Efficient
# of registers Small (about 8) Large (32 ~ 200)
Data memory access Memory Operands Load, store only
Design effort 5 – 10 X 600 (m/y) 1 X 60 (m/y)
17
1) CISC: Complex Instruction Set Computer2) RISC: Reduced Instruction Set Computer
Introduction of Computer Architecture
•Pipeline
18
Fetch: Instruction fetch & increase PC Decode: Instruction decode & register read Execute: ALU operation or address calculation Memory: Data cache access Write: Register write-back
Introduction of Computer Architecture
Digital Signal Processor (DSP)
•Supports instruction sets and architectures optimized for numerical processing of array data.
•Extends the Harvard architecture to separate data and code spaces.
•Commonly used in embedded applications
19
Introduction of Computer Architecture
MemoryMemory
Memory Organization
21
Introduction of Computer Architecture
Random Access Memory: RAM•Working memory with volatility
22
SRAM
StrengthsHigh Speed
DrawbacksLow Density
High CostSRAM Size of > 10MB is not practical
Used in L2 on-chip Cache & L3 off-chip
Cache
DRAM
StrengthsLow Cost
High Density
DrawbacksLow Speed
Used in Main Memory
Introduction of Computer Architecture
Read-Only Memory: ROM
• Nonvolatile memory▫ Can be read from▫ Can not be written to
• To hold the code that needs at power-up▫ Firmware, bootloader or application
• Variations▫ OTP ROM (One-Time Programmable ROM)▫ EPROM (Erasable Programmable ROM)▫ E2PROM (Electrically EPROM)▫ Flash
23
Introduction of Computer Architecture
Input/OutputInput/Output
Device Communication
•I/O devices▫Used by the processor to communicate with
external world Serial: keyboard, mouse, modem, etc Parallel: disk-drive controller, video and audio
controller, …•How to exchange data
▫Programmed I/O▫Interrupt-driven I/O▫Direct Memory Access (DMA)
25
Introduction of Computer Architecture
26
Start
Check status of disk
Disk ready?
Send data from memory to disk or
from disk to memory
Done?
End
yes
no
yes
no
Start
Issue read or write request to disk
Do other processing until disk issues an interrupt
Transfer data between disk and memory
Done?
yes
no
End
Programmed I/O Interrupt-Driven I/O
Introduction of Computer Architecture
Direct Memory Access
27
DMA types Standard block transfer Demand-mode transfer Fly-by transfer Data-chaining transfer
Introduction of Computer Architecture
Parallel andParallel andDistributedDistributedComputersComputers
Single-Instruction Multiple-Data (SIMD)
29
All PEs execute synchronously the same instructions using private data Instructions are broadcast globally by a single control unit Single control thread, single programControl Unit
Processor
Memory
PE0
Processor
Memory
PE1
Processor
Memory
PE2
Processor
Memory
PEn-1
Interconnection Network
……
Introduction of Computer Architecture
Multiple-Instruction Multiple-Data (MIMD)
30
Processor
Memory
PE0
Processor
Memory
PE1
Processor
Memory
PE2
Processor
Memory
PEn-1
Interconnection Network
……
Each PE executes asynchronously its own instructions using private data Multiple control thread, multiple collaborating programs
Introduction of Computer Architecture
Shared Memory Computer
31
Introduction of Computer Architecture
Message-Passing Computer
32
Introduction of Computer Architecture
Embedded Computer Architecture
33
Block Diagram of an Generic Computer
Introduction of Computer Architecture
34
Block Diagram of an Embedded Computer
Introduction of Computer Architecture