embedded computing from theory to practice november 2008 ustc suzhou
Post on 21-Dec-2015
221 Views
Preview:
TRANSCRIPT
Embedded Computing
From Theory to Practice
November 2008USTC Suzhou
11/2008 © Xiaoning Nie 2
FAQs
How useful is theory in practice?
How hard is reality ?
Some example to illustrate
what way of thinking is expected in practice.
11/2008 © Xiaoning Nie 3
Embedded Systems
Specific applications– Communications: mobile phone, DSL home gateway– Automotive: engine & brake control, …– Consumer, Aerospace, Medical …
Embedded computing hardware– EDA tools– Performance, cost, power, size
Embedded software– Correct functions and realtime-ness– Performance, cost, power
11/2008 © Xiaoning Nie 4
Example 1: Automotive Trend
11/2008 © Xiaoning Nie 5
Example 2: Mobile Phone Trend
11/2008 © Xiaoning Nie 6
Very Large Integration Trend
11/2008 © Xiaoning Nie 7
Computing Architecture Trend
Intel Tera-Scale architecture with 80 Cores*Intel Technology Journal Issue 3, 2007
11/2008 © Xiaoning Nie 8
Theory & Practice
A Hardware Case
11/2008 © Xiaoning Nie 9
Hardware fundamentals
Processor architecture– RISC: 16bit, 32bit, 64bit – Pipeline: for high clock frequency– Cache: L1, L2, etc
Memory Bus & IO Accelerator
Embedded Computing Platform
11/2008 © Xiaoning Nie 10
Processor performance
MIPS = Million Instructions Per Second– Important measure of CPU performance
Theory– RISC processor– IPC: One instruction per cycleIPC = 1.0– Clock frequency F = 100 MHzMIPS = F * IPC = 100
11/2008 © Xiaoning Nie 11
Design practice ( I )
Application– Run code and measure instructions executed– Assume 1000 M I P S
Taking 2 x 500 MHz ARM core ? – 10 % branches: 3 x 100 Mio cycles – 20 % load/store: 10 x 200 Mio cycles
Additional MHz needed– 2 x 100 MHz for branches– 9 x 200 MHz for loads/stores
11/2008 © Xiaoning Nie 12
Design practice ( II )
Add 4 x 500 MHz cores. IPC = ? How can I get in all the instructions ?
– 1000 M I P S– Bus / DRAM clock: 266 MHz– Instruction words 266 per second– Solution 4 x width = 128 bit
To consider inst. reuse and cache miss– more than 1000 Mio. instructions per second
All these need to be considered in your design.
11/2008 © Xiaoning Nie 13
Theory & Practice
A Software Case
11/2008 © Xiaoning Nie 14
Programming fundamentals
Data structure– Array e.g.
int a[100], b[100];
– Pointer e.g.int *p = malloc( 100*sizeof(int) );
– Linked liststruct list {list *pre; list *suc; int member;} *mylist;
11/2008 © Xiaoning Nie 15
Software design practice ( I )
What does malloc( ) do ?– System dependent– Library function of OS– May differ 1000% in performance
malloc( ) Optimization
0
5000
10000
15000
normal optimized
Cyc
le Reihe1
11/2008 © Xiaoning Nie 16
Software design practice ( II )
Data assignment
for (i=0; i<100; i++) a[i] = b[i] ;
How many memory accesses?– 0?– 100 ?– 200 ?
Impact on– speed and power consumption
11/2008 © Xiaoning Nie 17
Software design practice ( III )
Data assignment
for (i=0; i<100; i++) { a[i] = mylist ->member; mylist = mylist -> suc; }
How many memory accesses?– 100 ?– 200 ?– 300 ? ….
11/2008 © Xiaoning Nie 18
Conclusions
Examples from real project
Way of thinking– I have a solution.– I have a working solution.– I have a optimally working solution.
The latter is paid more
top related