EE360 Embedded Systems: Omputer Rganization and Esign
EE360 Embedded Systems: Omputer Rganization and Esign
Edition
The Hardware/Software Interface
EE360
EMBEDDED SYSTEMS
Slides stolen copied adapted from the original slides provided in the
instructor resources for the text
About us
• Ribhu [email protected]
____________________
• Akankhya Sarmah [email protected]
• Biplab Sengyung [email protected]
• Soumendu Ghosh [email protected]
15%
10%
45%
30%
CHAPTER 1
Computer Abstractions and Technology
The Three Great Revolutions
Agricultural
Industrial
Computer
Chapter 1 — Computer Abstractions and Technology — 11
§1.1 Introduction
The Computer Revolution
• Progress in computer technology
• Underpinned by Moore’s Law
• Every 10 fold decrease in the costs opens up new
applications
• Makes novel applications feasible
• Computers in automobiles
• Cell phones/ Smart Phones
• Human genome project
• World Wide Web
• Server computers
• Network based
• High capacity, performance, reliability
• Range from small servers to building sized
Cell Phones
Tablets
• Battery operated
• Connects to the Internet
• A Few thousand rupees
• IoT
• Smart phones, tablets, electronic glasses
Cloud computing
Hierarchy of memories
System software
• Compiler: translates HLL code
to machine code
• Operating System: service code
• Handling input/output
• Managing memory and
storage
• Scheduling tasks & sharing
resources
Hardware
• Processor, memory, I/O
controllers
• High-level language
• Level of abstraction closer to
problem domain
• Provides for productivity and
portability
• Assembly language
• Textual representation of
instructions
• Hardware representation
• Binary digits (bits)
• Encoded instructions and data
Chapter 1 — Computer Abstractions and
Technology — 22
§1.4 Under the Covers
Components of a Computer
•Same components for
The BIG Picture
all kinds of computer
• Desktop, server,
embedded
•Input/output includes
• User-interface devices
• Display, keyboard, mouse
• Storage devices
• Hard disk, CD/DVD, flash
• Network adapters
• For communicating with other
computers
Chapter 1 — Computer Abstractions and
Technology — 23
Chapter 1 — Computer Abstractions and Technology — 24
Through the Looking Glass
• LCD screen: picture elements (pixels)
• Mirrors content of frame buffer memory
Chapter 1 — Computer
Abstractions and Technology
— 29
Abstractions
The BIG Picture
•Abstraction helps us deal with complexity
•Hide lower-level detail
•The hardware software interface is called the
instruction set architecture (ISA)
•Application binary interface
•The ISA plus system software interface
•Implementation
•The details underlying and interface
Chapter 1 — Computer Abstractions and
Technology — 30
Memory
•Volatile main memory
•Loses instructions and data when
power off
•Non-volatile secondary
memory
•Magnetic disk
•Flash memory (Limited
Read/Write Capability)
•Silicon:semiconductor
•Add materials to transform
properties:
•Conductors
•Insulators
•Switch
Yield
1
=
(1 + (Defects per 𝑢𝑛𝑖𝑡 area × Die area/2))2
BAC/Sud BAC/Sud
Concorde Concorde
Douglas DC- Douglas DC-
8-50 8-50
BAC/Sud BAC/Sud
Concorde Concorde
Douglas DC- Douglas DC-
8-50 8-50
•Throughput
• Total work done per unit time
• e.g., tasks/transactions/… per hour
Clock (cycles)
Data transfer
and computation
Update state
B I 600ps 1.2
CPU Time
CPU Time I 500ps
A
Chapter 1 — Computer Abstractions and
Technology — 50
More CPI
• If different instruction classes take different numbers of cycles
n
Clock Cycles (CPIi Instruction Count i )
i1
Relative frequency
Chapter 1 — Computer Abstractions and
Technology — 51
Example(Algorithm Design)
• Alternative compiled code sequences using
instructions in classes A, B, C
Class A B C
IC in sequence 1 2 1 2
IC in sequence 2 4 1 1
Sequence 2: IC = 6
Clock Cycles
= 4×1 + 1×2 + 1×3
=9
Avg. CPI = 9/6 = 1.5
Chapter 1 — Computer Abstractions and
Technology — 54
Performance Summary
The BIG Picture
• Performance depends on
• Algorithm: affects IC, possibly CPI (IC is direct, however we
may prefer lighter instructions over the heavier ones =m, FFT
has a lower CPI than DFT)
• Programming language: affects IC, CPI
• Compiler: affects IC, CPI
• Instruction set architecture: affects IC, CPI, Tc
1 2
𝑃 = 𝐶𝑉 𝑓
2
• Leakage currents
• Hard to do
• Programming for performance
• Load balancing
• Optimizing communication and synchronization
• SPEC CPU2006
• Elapsed time to execute a selection of programs
• Negligible I/O, so focuses on CPU performance
• Normalize relative to reference machine
• Summarize as geometric mean of performance ratios
• CINT2006 (integer) and CFP2006 (floating-point)
n
n
Execution time ratio
i1
i
10 10
Overall ssj_ops per Watt ssj_ops i poweri
i 0 i 0
Taf f ected
Timprov ed Tunaf f ected
improvemen t factor
Example: multiply accounts for 80s/100s
How much improvement in multiply performance to
get 5× overall?
80 Can’t be done!
20 20
n
Corollary: make the common case fast
Chapter 1 — Computer Abstractions and
Technology — 66
Fallacy: Low Power at Idle
• Look back at i7 power benchmark
• At 100% load: 258W
• At 50% load: 170W (66%)
• At 10% load: 121W (47%)
Instructio n count
MIPS
Execution time 10 6
Instructio n count Clock rate
Instructio n count CPI CPI 10 6
10 6
Clock rate