Entities - Electrical and Computer Engineering

CprE 588
Embedded Computer Systems
Prof. Joseph Zambreno
Department of Electrical and Computer Engineering
Iowa State University
Lecture #8 – Architectural Specialization
Outline
• Motivation
• Related Work
• Design Flow
• Basic Concepts
• Multi-Metrics
• Experimental Results
• Conclusion
L. Cai, A. Gerstlauer, and D. Gajski, “Retargetable Profiling for Rapid, Early
System-Level Design Space Exploration”, In Proceedings of the Design
Automation Conference (DAC), 2004.
Mar 3-5, 2009
CprE 588 – Embedded Computer Systems
Lect-08.2
Motivation
SoC Complexity

Time-to-market

Higher levels
of abstraction
level n
Modeling
n+1
Verification
Mar 3-5, 2009
Exploration
Estimation
Refinement
CprE 588 – Embedded Computer Systems
Lect-08.3
System Level Estimation
• Fast
• Accurate  Fidelity
• Different abstraction levels
• Wide range of metrics
• Wide variety of target implementation
Mar 3-5, 2009
CprE 588 – Embedded Computer Systems
Lect-08.4
Related Work
•
Static analysis-based approaches
• Examples
• WCET (Y. Li), scheduling analysis (G. Buttazzo)
• Memory size estimation (Y. Zhao)
• Limitations
• Time-consuming, manual interference
• Dynamic simulation-based approaches
• Examples
• Profiling tools (GNU profiler)
• Instruction-set simulators
• Multi-processor, multi-level co-simulation (P. Gerin)
• Trace-based simulation (K. Lahir, P. Lieverse)
• Limitations
• A simulation is required for each design alternative
• Target/host machine-dependent characteristics
• Operation-related data
Mar 3-5, 2009
CprE 588 – Embedded Computer Systems
Lect-08.5
Design Flow
Refinement
Profiling
Spec
model
Estimation
GUI
Simulation
Profiling
Spec
characteristics
Mar 3-5, 2009
CprE 588 – Embedded Computer Systems
Lect-08.6
Design Flow (cont.)
Refinement
Profiling
Spec
model
Estimation
GUI
Simulation
Profiling
Spec
characteristics
Retargeting
Design
decision
Mar 3-5, 2009
Refining
Retargeting
Back
annotation
Implt
Characteristics
CprE 588 – Embedded Computer Systems
Lect-08.7
Design Flow (cont.)
Refinement
Profiling
Spec
model
Estimation
GUI
Instrumenting
Profiling
Spec
characteristics
Simulationestimation
Retargeting
Design
decision
Mar 3-5, 2009
Refining
Retargeting
Back
annotation
Refined
model
Implt
Characteristics
Simulation/
estimation
CprE 588 – Embedded Computer Systems
Implt.
Estimates
Lect-08.8
Explore and Trim
Exploration
Space Profiling
Implt
independent
simulation
One-time
retargeting
...
Implt
dependent
simulation
/estimation
...
Profiling
stage
Mar 3-5, 2009
Retargeting
stage
Simulationestimation
stage
CprE 588 – Embedded Computer Systems
Design
Time
Lect-08.9
Profiling
• Instrumentation-based
profiling
• Bb: The execution counts of
basic block b
• Cb,i,d: No. of computed
characteristics for item type i
and data type d in the block b
• Data type i: float, int, ..
• Item type d: metric dependant
• Ri,d = bC b,i,d Bb
• R = idRi,d
Mar 3-5, 2009
int b,c;
if( a = 0){
b++;
}
else{
b++;
c++;
}
B1 = 1
C1,++,int = 1
B3 = 3
C3,++,int = 2
R++,int=  i [ Bi * Ci,++,int ]
=1 x 1 + 3 x 2
=7
CprE 588 – Embedded Computer Systems
Lect-08.10
Retargeting
• Impl. characteristics
• Ri,d: Spec.
characteristics
• Wi,d : weights of
components which
the entity mapped to
B
R(B1)++,int= 7
B1
W(PE1)++,int= 1
PE1
c
v
B2
• Manual
• Simulation
• E = id(Ri,d X Wi,d )
• Time complexity:
O(n)
Mar 3-5, 2009
E(B1,PE1)++,int= 7 x 1 = 7
CprE 588 – Embedded Computer Systems
PE2
Mem
Lect-08.11
Challenges
• Separating dynamic and
static analysis
Mar 3-5, 2009
CprE 588 – Embedded Computer Systems
Lect-08.12
Challenges (cont.)
• Separating dynamic and
static analysis
• Supporting complex models
B
B1
c
v
B2
• Hierarchy
• Recursion
Mar 3-5, 2009
CprE 588 – Embedded Computer Systems
Lect-08.13
Challenges (cont.)
• Separating dynamic and
static analysis
• Supporting complex models
B
B1
c
v
B2
• Hierarchy
• Recursion
• Multi-dimensional analysis
Mar 3-5, 2009
CprE 588 – Embedded Computer Systems
Traditional approach
Lect-08.14
Challenges (cont.)
• Separating dynamic and
static analysis
• Supporting complex models
B
B1
c
v
B2
• Hierarchy
• Recursion
• Multi-dimensional analysis
• Multi-entities
• Behavior, channel, port,
variable
Mar 3-5, 2009
CprE 588 – Embedded Computer Systems
Entities
Lect-08.15
Challenges (cont.)
• Separating dynamic and
B
static analysis
• Supporting complex models
B1
c
v
B2
• Hierarchy
• Recursion
• Multi-dimensional analysis
• Multi-entities
• Behavior, channel, port,
variable
Entities
• Multi-metrics
• Operation, traffic, storage
• Static, dynamic
Mar 3-5, 2009
CprE 588 – Embedded Computer Systems
Metrics
Lect-08.16
Challenges (cont.)
• Separating dynamic and static
B
analysis
• Supporting complex models
B1
• Hierarchy
• Recursion
c
v
B2
• Multi-dimensional analysis
• Multi-entities
• Behavior, channel, port, variable
• Multi-metrics
• Operation, traffic, storage
• Static, dynamic
Entities
Levels
• Multi-levels
• Application, transaction, busfunctional
Mar 3-5, 2009
CprE 588 – Embedded Computer Systems
Metrics
Lect-08.17
Operation Metrics
•
•
Entities: behavior
Item types
•
•
•
Specification characteristics
Def.
Rep.
•
•
84 basic types: ‘+’.., ‘=‘.., ‘if’..
Special operation types: global function
Static
No. of operations in spec
Code complexity
Dynamic
No. of executed Oper. during simulation
Computational complexity
Mapping: behavior  PE
Implementation characteristics
Static
Rep.
Mar 3-5, 2009
Code Size:
Program memory size(SW)
Custom hardware controller(HW)
Dynamic
No. of executed clock cycles:
Execution time; power consumption
CprE 588 – Embedded Computer Systems
Lect-08.18
Traffic Metrics
•
•
•
Entities: port, variable, channel, behavior
Item types: in, out
Specification characteristics
Static
No. of connected ports
Connectivity complexity.
Def.
Rep.
•
Mapping:
•
•
•
Dynamic
No. of P/V/C accessed during simulation
Access complexity.
Port  PE
Variable/channel  bus
Implementation characteristics
Bus
Communication delay
Static
Sequential behaviors
PE
Data preparation time
Dyn.
Parallel behaviors
Application level
Traffic between behaviors.
Bus functional level
Fan-in/fan-out, bus capacity, traffic over pin
Mar 3-5, 2009
CprE 588 – Embedded Computer Systems
Lect-08.19
Deriving Traffic Metrics
•
Profiling for the hierarchically
instantiated behaviors and
recursively called functions
•
•
p1
A
p2
B
Main
A.p1  B.p2  B.F1.p3  B.F2.P4
F1(P2);
Beh1
Beh2
PE1
p3
F1
Different abstraction levels
F2(p3);
PE2
PE1
F2
p4
v1 = p4;
PE2
v1
•
Beh.port → Var
Mar 3-5, 2009
•
•
Beh.port → Chan
Chan in Chan
CprE 588 – Embedded Computer Systems
•
•
Beh.port → Pin
Chan.port  Chan
Lect-08.20
Storage Metrics
•
•
•
Entity: variable, behavior
Item types: local, global
Specification characteristics
Def.
Rep.
•
•
Static
No. of static variables
Static memory requirement
Dynamic
No. of dynamic allocated memory
Stack requirement (local)
Heap requirement (global)
Mapping:
• Variable  local/global memory
Implementation characteristics
Rep.
Mar 3-5, 2009
Static
Static memory size
Dynamic
Stack/heap size
CprE 588 – Embedded Computer Systems
Lect-08.21
Exp. Result: Vocoder Profiling
Floating –point not
required
Dedicated hardware
multipliers
HW
acceleration
Table 1: Computational complexity of top-level Vocoder behaviors
LP_Analysis Open_Loop Closed_Loop Codebook Update
377.0 MOp
337.1MOp
478.7 Mop
646.4 Mop 43.6 Mop
(x, int)
46.2%
Mar 3-5, 2009
Table 2: Codebook operation mix
(+, int)
(-, int)
(/,int)
33.5%
9.1%
7.1%
CprE 588 – Embedded Computer Systems
(others,int)
4.1%
Lect-08.22
Exp. Result: Vocoder Profiling (cont.)
8 behaviors  3 PEs
•
Total 38 =6561 design
alternatives
•
4500
Evaluation time: 3:15 hour
•
1 simulation (2.23s)
• 1 profiling (8.41s)
• 6561 retargeting (0.8s)
• 6561mapping (0.97s)
Mar 3-5, 2009
Time (ms)
•
3500
u
Timing constraint (2990)
B (73, 2980)
2500
1500
10
30
50
CprE 588 – Embedded Computer Systems
70
90
110
130
150
170
Cost
Lect-08.23
Exp. Result: JPEG Encoder
Implementation characteristics vs implementation estimates
Execution time (ms))
200
Estimates
150
Char.
100
50
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Design alternatives
•
•
Mar 3-5, 2009
Map 4 behaviors  2 PEs: 24 design alternatives
Accuracy: 12.5%, fidelity = 100%
CprE 588 – Embedded Computer Systems
Lect-08.24
Conclusion
• Dynamic profiling + static retargeting
• Profiling: helps completely comprehend the specification
• Retargeting: ultra-fast (linear time), enables initial,
exhaustive exploration of design space.
• Multi-dimensional analysis
• Multi-entities
• Behavior, channel, variable, port
• Multi-abstraction levels
• Application level, transaction level, bus-functional level
• Multi-metrics
• Operation, traffic, storage
• Static, dynamic
Mar 3-5, 2009
CprE 588 – Embedded Computer Systems
Lect-08.25