January 25th, 2011 Kim, DooHwan
description
Transcript of January 25th, 2011 Kim, DooHwan
![Page 1: January 25th, 2011 Kim, DooHwan](https://reader035.fdocuments.net/reader035/viewer/2022062520/5681637f550346895dd4612c/html5/thumbnails/1.jpg)
Chungbuk National University Software Engineering Lab.
A Power Consumption Analysis Technique using UML-BasedDesign Models in Embedded Software Development
SOFSEM 2011
January 25th, 2011Kim, DooHwan
![Page 2: January 25th, 2011 Kim, DooHwan](https://reader035.fdocuments.net/reader035/viewer/2022062520/5681637f550346895dd4612c/html5/thumbnails/2.jpg)
2
Introduction
UML Model-Based Energy Estimation
Experiment
Conclusion
![Page 3: January 25th, 2011 Kim, DooHwan](https://reader035.fdocuments.net/reader035/viewer/2022062520/5681637f550346895dd4612c/html5/thumbnails/3.jpg)
3
Importance of Power Analysis In portable embedded system
There are limitations of resources such as Memory, CPU, Bat-tery, etc
Specially, these systems are operated with limited energy source (a battery)
The necessity of the research for low power software is is-sued
![Page 4: January 25th, 2011 Kim, DooHwan](https://reader035.fdocuments.net/reader035/viewer/2022062520/5681637f550346895dd4612c/html5/thumbnails/4.jpg)
4
Power analysis efficiency at abstraction levels[T. K. Tan, 2003]
Advantages of model-based software power analysis Higher power saving Fast estimation time
Hardware Software
Design modellevel
Instructionlevel
Program-codelevel
Design modellevel
Instructionlevel
Program-codelevel
Behavior level
RT level
Logic level
Transistor level
Behavior level
RT level
Logic level
Transistor level
minutes
hours
days
10X
2X
20%
5%
Hig
her p
ower
sav
inig
s
Fast
er e
stim
atio
n/fe
edba
ck
![Page 5: January 25th, 2011 Kim, DooHwan](https://reader035.fdocuments.net/reader035/viewer/2022062520/5681637f550346895dd4612c/html5/thumbnails/5.jpg)
5
Power Estimation of Embedded Software
Our motivation Seamless process support in energy-efficient embedded
software development Low feedback cost Fast estimation
Code-BasedPower Estimation
Model-BasedPower Estimation
Requirements SW Analysis/ Design Implementation System Integration
/ Testing Target installation
HW Configuration
![Page 6: January 25th, 2011 Kim, DooHwan](https://reader035.fdocuments.net/reader035/viewer/2022062520/5681637f550346895dd4612c/html5/thumbnails/6.jpg)
6
Proposed Estimation Process
UML design models
Transform UML models to CFG EBU detection Power consump-
tion of the EBUAccumulation of the consumption
Energy Li-brary
No more
EBU in CFG
Estimated energy con-
sumption
Yes
No
![Page 7: January 25th, 2011 Kim, DooHwan](https://reader035.fdocuments.net/reader035/viewer/2022062520/5681637f550346895dd4612c/html5/thumbnails/7.jpg)
7
Building Energy Library (1/4) Underlying component built up prior to analysis
Energy Library
• E is a set of EBUs• V is a set of virtual instructions• is a set of mapping actions such that
EBU (Energy Behavioral Unit)• The basic unit derived from the behavior analysis of UML models
Diagrams EBUs
SDMessage (send, receive), MessageSort (SynchCall, AsynchCall, Signal),InteractionOperator (alt, opt, loop, par)
IOD Fork, Join (wait), Invocation (Create), InterruptableActivityRegion
ALBitwise Operator (+, -, *, /, %, <<, |, !, ==, &&, >=, etc.),Function Operator (read, write, malloc, etc.)
![Page 8: January 25th, 2011 Kim, DooHwan](https://reader035.fdocuments.net/reader035/viewer/2022062520/5681637f550346895dd4612c/html5/thumbnails/8.jpg)
8
Building Energy Library (2/4) VI (Virtual Instruction) [Bammie, 2000]
• A set of generalized instructions• Defined to estimate power consumption caused by a program
execution
Types Instructions
VPI load, store, add, sub, call divide, call module, mult, compare, convertType, branch, bit-NOT, bitAND, bitOR, bitXOR, bitShiftLeft, bitShiftRight
VSF
Process Manager fork(), waitpid(), wait(), signal()
IPC msgsnd(), msgrcv(), msgget(), msgctl(), semget(), semctl(), se-mop(), pipe(), pipe open(), pipe write()
File System fileopen(), fileclose(), fileread(), filewrite()
Memory Manager shmget(), shmat(), shmdt(), shmctl()
![Page 9: January 25th, 2011 Kim, DooHwan](https://reader035.fdocuments.net/reader035/viewer/2022062520/5681637f550346895dd4612c/html5/thumbnails/9.jpg)
9
Building Energy Library (3/4) Some of energy profiling for the VI
VPI Type Energy(nJ) VSF Parameters Macro-model (nJ)
load
char 14.1 fork() - 132202.6short 28.1 waitpid() - 25077.3int 13.0 wait() - 24986.6
float 13.0 signal() - 9460.6double 13.7 File open() - 17886.6
store
char 13.2 File close() - 8262.2short 26.4 File read() χ bytes 5.1χ +49308.5int 12.5 File write() χ bytes 5.6χ +32022.3
float 12.8 shmget() - 126358.8double 13.2 shmat() - 11599.9
c.f : http://selab.cbnu.ac.kr/projects/esuml/index.html
![Page 10: January 25th, 2011 Kim, DooHwan](https://reader035.fdocuments.net/reader035/viewer/2022062520/5681637f550346895dd4612c/html5/thumbnails/10.jpg)
10
Building Energy Library (4/4) Mapping VIs into EBUs
• An EBU can be mapped with 1 or more VIs– read mapped with file read()– Sync mapped with store and branch
VPI Type Energy(nJ)
store
char10.1905short
intfloat 13.0162double
branch n/a 1.91309
VSF Type Energy(nJ)
file read x bytes 5.1x + 49308.5
… … …
![Page 11: January 25th, 2011 Kim, DooHwan](https://reader035.fdocuments.net/reader035/viewer/2022062520/5681637f550346895dd4612c/html5/thumbnails/11.jpg)
11
Proposed Estimation Process (revisited)
UML design models
Transform UML models to CFG EBU detection Power consump-
tion of the EBUAccumulation of the consumption
Energy Li-brary
No more
EBU in CFG
Estimated energy con-
sumption
Yes
No
![Page 12: January 25th, 2011 Kim, DooHwan](https://reader035.fdocuments.net/reader035/viewer/2022062520/5681637f550346895dd4612c/html5/thumbnails/12.jpg)
12
Transform UML Model to Control Flow Graph (1/2) The reasons of transformation
• CFG has strong expressiveness for behavioral sequence of software function
• Using CFG is easier to identify power consuming factors than UML models directly
Transform
:P :Q :Rm1
m2
m3
sd A
n1 n2
n3n4
n5 n6
CFG
al1
n23
![Page 13: January 25th, 2011 Kim, DooHwan](https://reader035.fdocuments.net/reader035/viewer/2022062520/5681637f550346895dd4612c/html5/thumbnails/13.jpg)
13
Transform UML Model to Control Flow Graph (2/2) A node structure of CFG
Struct CFG_NODE {Node id := node identifier;Predecessor_Node := node identifiersSuccessor_Node := node identifiers;BelongTo := diagram_name.objectname;Guard_Cond := condition clause to control the behaviors alt, loop, etc, apeared in SD.Node_Type := UML element node type;Node_Type_Start := boolean;Node_Type_End := boolean;
// to represent method call or action language appeared in SDIncluded_Category := {FuncCall, ActionLang}Included_Token_Set := a lined list of terms, appeared in FunCall or ActionLang;
} End_Struct
![Page 14: January 25th, 2011 Kim, DooHwan](https://reader035.fdocuments.net/reader035/viewer/2022062520/5681637f550346895dd4612c/html5/thumbnails/14.jpg)
14
EBU Detection
![Page 15: January 25th, 2011 Kim, DooHwan](https://reader035.fdocuments.net/reader035/viewer/2022062520/5681637f550346895dd4612c/html5/thumbnails/15.jpg)
15
Power Consumption of EBU If detected an EBU, the simulator calculates energy con-
sumption of the EBU by using the energy values of mapped VIs from energy library
Total Energy Consumption Total energy of model TEC is
![Page 16: January 25th, 2011 Kim, DooHwan](https://reader035.fdocuments.net/reader035/viewer/2022062520/5681637f550346895dd4612c/html5/thumbnails/16.jpg)
16
Issues of our experiment How about accuracy How much speed-up How to apply this technique
EnvironmentsESUML-EA
• Power analysis tool we developed with• Java Eclipse 3.2• EMF, GEF, and RCP are used plug-ins
EMSIM 2.0
• Code-based power analysis tool developed by T. K. Tan• It aims platform that configured with StrongArm on SA1100 ar-
chitecture with Embedded Linux
![Page 17: January 25th, 2011 Kim, DooHwan](https://reader035.fdocuments.net/reader035/viewer/2022062520/5681637f550346895dd4612c/html5/thumbnails/17.jpg)
17
Accuracy of model-based analysis (1/2) UML sequence diagram for Huffman Encoding
![Page 18: January 25th, 2011 Kim, DooHwan](https://reader035.fdocuments.net/reader035/viewer/2022062520/5681637f550346895dd4612c/html5/thumbnails/18.jpg)
18
Accuracy of model-based analysis (2/2) App. 1 : Data retrieval App. 2 : Shortest path selection App. 3 : Image translation App. 4 : Encoding (Huffman code)
Target Module
Input Data(Bytes)
Estimated Energy Consumption (nJ) Deviation (%)Code-based Model-based
App. 1 80 113203.6 103936.8 8.91
App. 2 288 136982.1 135419.3 1.15
App. 3 262144 11143678.6 10168948.7 9.58
App. 4 31323 190584749.8 183144624.3 3.91
![Page 19: January 25th, 2011 Kim, DooHwan](https://reader035.fdocuments.net/reader035/viewer/2022062520/5681637f550346895dd4612c/html5/thumbnails/19.jpg)
19
Elapsed time for analysis (1/2) Comparison of the elapsed time for 4 applications
App. 1 App. 2 App. 3 App. 40
5
10
15
20
25
30
35
Sorce code-based Model-based
Elea
psed
Tim
e (S
ec)
![Page 20: January 25th, 2011 Kim, DooHwan](https://reader035.fdocuments.net/reader035/viewer/2022062520/5681637f550346895dd4612c/html5/thumbnails/20.jpg)
20
Elapsed time for analysis (2/2) Comparison of the elapsed time by data size in App. 4
1 2 3 40
1000000
2000000
3000000
4000000
5000000
6000000
0
4
8
12
16
20
24Data SizeElapsed Time
Experiment ID
Inpu
t D
ata
Size
(KB
)
Elap
sed
Tim
e(Se
c)
![Page 21: January 25th, 2011 Kim, DooHwan](https://reader035.fdocuments.net/reader035/viewer/2022062520/5681637f550346895dd4612c/html5/thumbnails/21.jpg)
21
Application of model-based analysis result Results are provided by unit of diagrams or objects
• Therefore, We could identify which diagram or object consumes a lot of power from the report
![Page 22: January 25th, 2011 Kim, DooHwan](https://reader035.fdocuments.net/reader035/viewer/2022062520/5681637f550346895dd4612c/html5/thumbnails/22.jpg)
22
Proposed model-based power consumption analysis technique Power analysis by
• CFG generation from UML design models• EBU elicitation from UML models• Energy Library for those EBUs
Benefits• Early feedback• Fast estimation• Seamless process support in energy-efficient embedded software
development
Future work Power consumption analysis for MPSoC architecture using cur-
rent proposed technique
![Page 23: January 25th, 2011 Kim, DooHwan](https://reader035.fdocuments.net/reader035/viewer/2022062520/5681637f550346895dd4612c/html5/thumbnails/23.jpg)
23
THANK YOU