350 likes | 550 Views
PEOPLE Power Estimation Toolset. CEFRIEL Via Fucini, 2 – Milano, Italy. Outline. Software Power Estimation Motivations Problems Overview of the TOSCA Toolset Methodology Models A Tutorial Example Results and Conclusions Accuracy Effectiveness. Sw Power Estimation: Motivations.
E N D
PEOPLEPower Estimation Toolset CEFRIEL Via Fucini, 2 – Milano, Italy
Outline • Software Power Estimation • Motivations • Problems • Overview of the TOSCA Toolset • Methodology • Models • A Tutorial Example • Results and Conclusions • Accuracy • Effectiveness PEOPLE - Software Power Estimation
Sw Power Estimation: Motivations • Power aware design is becoming mandatory • Software-related power is becoming a significant component of the overall power budget • Fast design space exploration allows • Simulation of the specifications, possibly in conjunction with hardware-bound parts of the system • Analysis of the power consumption at different levels of abstraction, to tradeoff accuracy and simulation speed • Comparison of alternative software codings • Comparison of different microprocessors PEOPLE - Software Power Estimation
Sw Power Estimation: Problems • Measures • Lack of detailed data from processor vendors • Strongly processor dependent • Complex environment setup • Costly measurement equipment • Time consuming measurement activity • Measurements results must be completed with • Static issues • Single-instruction data dependency • Dynamic issues • Data dependent execution flow • Caching, pipelining and processor status effects PEOPLE - Software Power Estimation
Sw Power Estimation: Levels • Source Level (OCCAM) • Preliminary analysis for fast design space exploration • General high-level model • Implementation for OCCAM language available • Porting to C in progress • Intermediate Level (VIS) • General model to allow easy retargeting • Specific enough to guarantee good accuracy • Assembly Level • Accuracy comparable to vendor specific ISS • Possible alternative to costly emulation platforms PEOPLE - Software Power Estimation
Overview of the toolset: Languages • OCCAM Offers • Processes • Parallelism • Channeled communication • Native arbitering mechanism • The language has been modified to • Support constraints definition • Focus on a limited subset of constructs • OCCAM suitable for • Control-dominated embedded system specification • Mixed hardware / software system architectures PEOPLE - Software Power Estimation
Overview of the toolset: Languages • VIS is an assembly-like Virtual Instruction Set • VIS characteristics • Captures the most common features of a wide variety of commercial assembly languages • Is close enough to a real assembly to make the translation simple and effective • VIS Virtual Architecture characteristics • Load / Store (34 opcode, 5 addressing modes) • Configurable register file size (4 ...) • Memory mapped I/O • No cache and pipeline PEOPLE - Software Power Estimation
opp oste sta2dyn vcomp vis2occ vlink vsim sta2dyn visanno libmake asm2vis vmap asmanno Overview of the toolset: Flow Back-AnnotationFlow Compilation Flow Simulation DynamicEstimation occam occam.dba occam.sba occam.pro occam.out vis.dba vis vis.pro vis.sba visvis.ref vis.sa Libraries asm.sa asmasm.ref Static Estimation PEOPLE - Software Power Estimation
Overview of the toolset: Tools • Graphical interfaces • guimain Project Manager • guivsim Simulator / Debugger • guiflow Flow Manager • Compilation • vcomp OCCFAM to VIS compiler • vopt VIS optimizer • vlink VIS linker • vmap VIS to assembly mapping • Simulation • oste OCCAM functional / timing simulator • vsim VIS simulator, debugger, profiler PEOPLE - Software Power Estimation
Overview of the toolset: Tools • Estimation • asmanno Assembly power (and timing) annotator • visanno VIS power (and timing) annotator • occanno OCCAM power (and timing) annotator • Back-annotation & data analysis • asm2vis assembly to VIS back-annotator • vis2occ VIS to OCCAM back-annotator • analyse Multi-level data analysis tool • Libraries • libmake Library development support utility • libquery Library management utility PEOPLE - Software Power Estimation
Overview of the toolset: Libraries • VIS to Assembly Mapping Libraries (ARM, MC68k) • Single VIS instruction granularity • Rule-based • Standard C code with support macros (gcc) • VIS Annotation Libraries (ARM, MC68k) • Single assembly instruction granularity • Plain text table • Assembly Annotation Libraries (ARM, MC68k) • Single assembly instruction granularity • Based on lexical analysis • Standard lexical analyzer format (lex) PEOPLE - Software Power Estimation
Methodology • Specify an heterogeneous system with hardware and software partitions • Capture area, timing and power constraints • Configure architecture parameters (technology, number of cores, bus width, interconnection topology, etc.) • Execution of the specification at different levels to validate both functionality and design goals • Design space exploration varying: • Procedure granularity Hardware / software partitioning • Number, type and connection topology of processor cores PEOPLE - Software Power Estimation
Models • Power consumption estimation models have been developed at three different levels of abstraction: • Source Level • Intermediate Level • Assembly Level • Models are supported by: • Theoretical analysis • Experimental validation • Models have been conceived to be: • General: to cover different development frameworks • Decoupled: to be used also separately PEOPLE - Software Power Estimation
Models: Assembly Level • The model is based on: • Generic processor functional decomposition • Power measurements available in literature • The identified functionalities are: • Fetch & Decode • Branch • Write Register • Arithmetic & Logic • Load & Store • This choice results from principal component analysis on available data PEOPLE - Software Power Estimation
Models: Assembly Level • Intra-processor generalization • Capability to cope with incomplete instruction set power characterization Intel i80486DX2 – Estimation Error PEOPLE - Software Power Estimation
Models: Assembly Level • Inter-processor generalization • Capability to predict power characteristics of a processor based on the data of other processors and their instruction set Intel i80486DX2 Cross-estimation (SparcLite and ARM7TDMI) PEOPLE - Software Power Estimation
Models: VIS Level • VIS instructions translation • Has a fixed assembly code structure • Depends on the operands, due to the level of orthogonality of different target processors • Model definition strategy • Exhaustive analysis of mapping rules • Power figures collected at assembly level combined according to four methods: • Different figures only • Different translation only • Complete uniform • Complete weighted PEOPLE - Software Power Estimation
Models: VIS Level • Results on benchmarks • Results on a 16-Channel Link Controller design PEOPLE - Software Power Estimation
Models: Source Level • The assembly translation of a source statement • Has a fairly processor-independent skeleton • Depends on the specific assembly language • Source code is translated using 5 operations • Move, Load, Store, Arithmetic, Branch • Upper and lower bounds are derived • Assigning minimum and maximum costs to the 5 operations by comparison with the target assembly • Estimating the cost as: PEOPLE - Software Power Estimation
Tutorial: Installation • The complete package is distributed in a single tar file • A graphical installation utility is included • Each tool can be installed separately • The variable TOSCA must be set to the desired installation path PEOPLE - Software Power Estimation
Tutorial: Installation • The directory structure is organized as follows: • $TOSCA/bin Binaries • $TOSCA/lib Libraries • $TOSCA/doc Documentation and man pages • $TOSCA/help On-line help • $TOSCA/techlib Technology libraries • $TOSCA/gui Graphical interfaces • $TOSCA/defaults Configuration files • $TOSCA/tmp Temporary storage directory PEOPLE - Software Power Estimation
Tutorial: Installation • The toolset requires • Tcl/Tk 8.0 / 8.1 • Tix 4.1 • sh or csh • GNU make 3.74 • GNU bison and flex • GNU gcc, as, ld (only to build new technology libraries) • The toolset has been ported for • Solaris 5 / 7 • Linux RedHat 5.1 / 6.1 PEOPLE - Software Power Estimation
Tutorial: Project definition • A project is structured as follows • <prj-path>/project • <prj-path>/Main/occam • <prj-path>/<proc-name>/occam • The project path <prj-path> must be pointed by the environment variable TOSCAPROJECT • The source files occam may be coded • Manually • Through the Graphical editor • All files related to a given procedure will be stored in the path <prj-path>/<proc-name> PEOPLE - Software Power Estimation
Tutorial: Project definition Textview GraphicalEditor PROC Main() INT a: INT b: SEQ a := 616 b := 21 WHILE ( a <> b ) IF a > b a := a - b a < b b := b - a : PEOPLE - Software Power Estimation
Tutorial: The main interface • Allows • Loading a project • Setting defaults • Command-line use • Displays • Project structure • Command log • Code at all levels • Gives access to • VIS simulator • Flow Manager PEOPLE - Software Power Estimation
Tutorial: Compiling to VIS • Compilation can be performed • With command-line interface • With graphical interface • Compilation options can be set interactively PEOPLE - Software Power Estimation
Tutorial: Linking and simulating VIS • Linking • All procedures • User libraries • VIS OS • Simulation • Breakpoints • Step execution • Register traces • Memory traces • VIS OCCAM highlighting PEOPLE - Software Power Estimation
Tutorial: Mapping to assembly • Mapping can be performed • With command-line interface • With graphical interface • Mapping options can be set interactively • The specific mapping library is necessary • A mapping library is • A collection of mapping rules • Template-based • New libraries can be developed with the help some utilities described later on PEOPLE - Software Power Estimation
Tutorial: Assembly annotation • Annotating the Assembly can be performed • With command-line interface • With graphical interface • Annotated data file Assembly code Reference Annotated data asm.ref asm.sa asm 022 000 022 000 022 000 023 000 023 000 023 000 024 000 028 000 029 003 034 003 034 003 4.00; 4.00; 12.07; 2.00 8.00; 1.00 19.00; 12.07; 2.00 8.00; 1.00 19.00; 12.07; 2.00; 1.00; 10.27; 2.00; 1.00; 0.00; 2.00; 1.00; 0.00; 2.00; 1.00; 8.83; 2.00; 0.00; 0.00; 4.00; 4.00; 12.07; 2.00; 1.00; 10.27; 4.00; 4.00; 12.07; LSL r0, r0, #24 ASR r0, r0, #24 CMP r0, r5 BEQ OSLD_00_0 BL OSLD_00 OSLD_00_0 NOP BL stop OSLD_03 MOV r1, #26 _Main_0 NOP MOV r5, #0 PUSH { r5 } PEOPLE - Software Power Estimation
Tutorial: Back-annotation to VIS vis vis.ref vis.sba 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 %BLOCKSTART Cif -- -- INST_105 CMP.B +11(BP) #0 -- Beq INST_112 -- -- INST_104 ADD.B #128 +10(BP) -- MOVE.B #2 -- +24(BP) %BLOCKEND Cif -- -- %BLOCKSTART Cif -- -- INST_112 MOVE.B +13(BP) -- R0 MOVE.B +12(BP) -- R1 XOR.B R1 R0 -- CMP.B R0 #0 -- Bne INST_115 -- -- BRA INST_93 -- -- INST_115 XOR.B +10(BP) #8 -- XOR.B +9(BP) #132 -- MOVE.B #2 -- +33(BP) BRA INST_106 -- -- %BLOCKEND Cif -- -- 00030 00031 00031 00032 00030 00030 00035 00036 00036 00036 00036 00036 00035 00038 00039 00035 00035 00035 0 clk – 0 mA 10 clk - 315 mA 10 clk - 400 mA 15 clk - 415 mA 10 clk – 405 ma 0 clk - 0 mA 0 clk - 0 mA 12 clk - 505 mA 12 clk - 505 mA 4 clk – 314 mA 8 clk – 290 mA 10 clk - 400 mA 10 clk - 400 mA 13 clk – 460 mA 13 clk – 460 mA 10 clk – 405 mA 10 clk - 400 mA 0 clk - 0 mA ... Back-annotation Mapping asm asm.ref asm.sa 127 128 129 130 131 132 133 134 135 136 137 138 139 140 ... INST_105 CMP.B #0,11(A0) Beq INST_112 INST_104 ADD.B #128,10(A0) MOVE.B #2,24(A0) INST_112 MOVE.B 13(A0),D0 MOVE.B 12(A0),D1 XOR.B D1,D0 CMP.B #0,D0 Bne INST_115 BRA INST_93 INST_115 XOR.B #8,10(A0) XOR.B #132,9(A0) MOVE.B #2,33(A0) BRA INST_106 .... 00119 00120 00121 00122 00125 00126 00127 00128 00129 00130 00131 00132 00133 00134 ... Power Annotation 10 clk - 315 mA 10 clk - 400 mA 15 clk - 415 mA 10 clk – 405 mA 12 clk - 505 mA 12 clk - 505 mA 4 clk – 314 mA 8 clk – 290 mA 10 clk - 400 mA 10 clk - 400 mA 13 clk – 460 mA 13 clk – 460 mA 10 clk – 405 mA 10 clk - 400 mA .... PEOPLE - Software Power Estimation
Tutorial: Back-annotation to OCCAM occam occam.sba 001 ... 028 029 030 031 032 033 034 035 036 037 038 039 ... PROC computeCRC (BYTE CRCHi; BYTE CRCLow; VAL BYTE data) .... IF (tempCRC_HI) MyCRC_LOW := MyCRC_LOW + remainder TRUE SKIP IF (tempData >< tempCRC_LOW) PAR MyCRC_LOW := (MyCRC_LOW >< generator_LSB) MyCRC_HI := (MyCRC_HI >< generator_MSB) TRUE SKIP .... 10 clk – 405 mA ... 10 clk – 405 mA 20 clk - 357 mA 15 clk - 415 mA 0 clk - 0 mA 0 clk - 0 mA 30 clk - 402 mA 42 clk - 469 mA 0 clk - 0 mA 13 clk – 460 mA 13 clk – 460 mA 0 clk - 0 mA ... Compilation Back-annotation vis vis.ref vis.sba 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 %BLOCKSTART Cif -- -- INST_105 CMP.B +11(BP) #0 -- Beq INST_112 -- -- INST_104 ADD.B #128 +10(BP) -- MOVE.B #2 -- +24(BP) %BLOCKEND Cif -- -- %BLOCKSTART Cif -- -- INST_112 MOVE.B +13(BP) -- R0 MOVE.B +12(BP) -- R1 XOR.B R1 R0 -- CMP.B R0 #0 -- Bne INST_115 -- -- BRA INST_93 -- -- INST_115 XOR.B +10(BP) #8 -- XOR.B +9(BP) #132 -- MOVE.B #2 -- +33(BP) BRA INST_106 -- -- %BLOCKEND Cif -- -- 00030 00031 00031 00032 00030 00030 00035 00036 00036 00036 00036 00036 00035 00038 00039 00035 00035 00035 0 clk – 0 mA 10 clk - 315 mA 10 clk - 400 mA 15 clk - 415 mA 10 clk – 405 ma 0 clk - 0 mA 0 clk - 0 mA 12 clk - 505 mA 12 clk - 505 mA 4 clk – 314 mA 8 clk – 290 mA 10 clk - 400 mA 10 clk - 400 mA 13 clk – 460 mA 13 clk – 460 mA 10 clk – 405 mA 10 clk - 400 mA 0 clk - 0 mA Power Estimation PEOPLE - Software Power Estimation
Tutorial: VIS Estimation • Estimation at VIS level can be performed • With command-line interface • With graphical interface PEOPLE - Software Power Estimation
Tutorial: OCCAM Estimation • Settings • Data source • Min, Typ, Max data • Estimation mode • Static • Dynamic • OCCAM view • Hierarchical • Expand process • Collapse process PEOPLE - Software Power Estimation
Tutorial: Command-line usage • Tools provide • Command-line usage • On-line help • UNIX man pages • Simple scripting is possible combining • command-line tools • sh / csh script language • Makefiles #################################################### # GCD Demo Project Makefile #################################################### .PHONY: FORCE #################################################### # Makes the entire flow #################################################### all: @echo Makin GCD Project... opp $(TOSCAPROJECT)/Main/occam vcomp -exec vcomp.scr -quit vlink -exec vlink.scr -quit vmap -vis vis -library thumb -map -save -quit asmanno -a asm -lib thumb asm2vis -a asm -v vis vis2ref vis2occ -v vis -static -backanno @echo GCD Project completed. #################################################### # Clears the project #################################################### clean: FORCE @echo Cleaning... @rm -f $(TOSCAPROJECT)/asm* @rm -f $(TOSCAPROJECT)/vis* @rm -f $(TOSCAPROJECT)/Main/occam.* @echo Done. PEOPLE - Software Power Estimation
Results and Conclusions • Accuracy • Assembly-Level: Comparable to Vendor ISS • VIS-Level: Within 5% error • OCCAM-Level: Within 15% error • File Sizes • OCCAM: 2.400 lines • VIS: 45.000 lines • Assembly 87.000 lines • Run Times • Complete flow: 53 s • VIS estimation: 29 s PEOPLE - Software Power Estimation