1 chapter 7 function-architecture codesign paradigm
TRANSCRIPT
![Page 1: 1 Chapter 7 Function-Architecture Codesign Paradigm](https://reader035.vdocument.in/reader035/viewer/2022062314/56649ed95503460f94be7f3c/html5/thumbnails/1.jpg)
1
Chapter 7 Function-Architecture Codesign Paradigm
![Page 2: 1 Chapter 7 Function-Architecture Codesign Paradigm](https://reader035.vdocument.in/reader035/viewer/2022062314/56649ed95503460f94be7f3c/html5/thumbnails/2.jpg)
2
Function Architecture Co-design Methodology
System Level design methodology
Top-down (synthesis)
Bottom-up (constraint-driven)
![Page 3: 1 Chapter 7 Function-Architecture Codesign Paradigm](https://reader035.vdocument.in/reader035/viewer/2022062314/56649ed95503460f94be7f3c/html5/thumbnails/3.jpg)
3
Ref
inem
ent
Synthesis Verification
Function Architecture
HW SW
Mapping
Trade-off
Trade-off
Abs
trac
tion
Co-design Process Methodology
![Page 4: 1 Chapter 7 Function-Architecture Codesign Paradigm](https://reader035.vdocument.in/reader035/viewer/2022062314/56649ed95503460f94be7f3c/html5/thumbnails/4.jpg)
4
System Level Design Vision
Functioncasts a shadow
Abstraction
Refinement
Architecturesheds light
Constrained Optimization Constrained Optimization
and Co-designand Co-design
![Page 5: 1 Chapter 7 Function-Architecture Codesign Paradigm](https://reader035.vdocument.in/reader035/viewer/2022062314/56649ed95503460f94be7f3c/html5/thumbnails/5.jpg)
5
Main Concepts
Decomposition
Abstraction and successive refinement
Target architectural exploration and estimation
![Page 6: 1 Chapter 7 Function-Architecture Codesign Paradigm](https://reader035.vdocument.in/reader035/viewer/2022062314/56649ed95503460f94be7f3c/html5/thumbnails/6.jpg)
6
Decomposition
Top-down flow Find an optimal match between the application
function and architectural application constraints (size, power, performance).
Use separation of concerns approach to decompose a function into architectural units.
![Page 7: 1 Chapter 7 Function-Architecture Codesign Paradigm](https://reader035.vdocument.in/reader035/viewer/2022062314/56649ed95503460f94be7f3c/html5/thumbnails/7.jpg)
7
Abstraction & Successive Refinement
Function/Architecture formal trade-off is applied for mapping function onto architecture
Co-design and trade-off evaluation from the highest level down to the lower levels
Successive refinement to add details to the earlier abstraction level
![Page 8: 1 Chapter 7 Function-Architecture Codesign Paradigm](https://reader035.vdocument.in/reader035/viewer/2022062314/56649ed95503460f94be7f3c/html5/thumbnails/8.jpg)
8
Target Architectural Exploration and Estimation
Synthesized target architecture is analyzed and estimated
Architecture constraints are derived An adequate model of target architecture is built
![Page 9: 1 Chapter 7 Function-Architecture Codesign Paradigm](https://reader035.vdocument.in/reader035/viewer/2022062314/56649ed95503460f94be7f3c/html5/thumbnails/9.jpg)
9
Architectural Exploration in POLIS
![Page 10: 1 Chapter 7 Function-Architecture Codesign Paradigm](https://reader035.vdocument.in/reader035/viewer/2022062314/56649ed95503460f94be7f3c/html5/thumbnails/10.jpg)
10
Main Steps in Co-design and Synthesis
Function architecture co-design and trade-off– Fully synthesize the architecture?– Co-simulation in trade-off evaluation
• Functional debugging • Constraint satisfaction and missed deadlines• Processor utilization and task scheduling charts• Cost of implementation
Mapping function on the architecture– Architecture organization can be a pre-designed collection of components
with various degrees of flexibilities– Matching the optimal function to the best architecture
![Page 11: 1 Chapter 7 Function-Architecture Codesign Paradigm](https://reader035.vdocument.in/reader035/viewer/2022062314/56649ed95503460f94be7f3c/html5/thumbnails/11.jpg)
11
Function/ Architecture Co-design vs. HW/SW Co-design
Design problem over-simplified Must use Fun./Arch. Optimization & Co-design to
match the optimal Function to the best Architecture1. Fun./Arch. Co-design and Trade-off
2. Mapping Function Onto Architecture
![Page 12: 1 Chapter 7 Function-Architecture Codesign Paradigm](https://reader035.vdocument.in/reader035/viewer/2022062314/56649ed95503460f94be7f3c/html5/thumbnails/12.jpg)
12
Reactive System Co-synthesis(1)
Control-dominated Design
EFSM Representati
on
CDFG Representati
on
HW/SW
Decompose Map
Map
EFSM: Extended Finite State Machines
CDFG: Control Data Flow directed acyclic Graph
![Page 13: 1 Chapter 7 Function-Architecture Codesign Paradigm](https://reader035.vdocument.in/reader035/viewer/2022062314/56649ed95503460f94be7f3c/html5/thumbnails/13.jpg)
13
Reactive System Co-synthesis(2)
CDFG is suitable for describing EFSM reactive behavior but
Some of the control flow is hiddenData cannot be propagated
S1a:= a + 1
S0a:= 5
S2
a
EFSM
Mapping
a := 5a := 5
state := S1
state := S1
Case (state)Case (state)
BEGINBEGIN
ENDEND
S1
a := a + 1
a := a + 1
state := S2
state := S2
emit(a)emit(a)
S2
CDFG
S0
![Page 14: 1 Chapter 7 Function-Architecture Codesign Paradigm](https://reader035.vdocument.in/reader035/viewer/2022062314/56649ed95503460f94be7f3c/html5/thumbnails/14.jpg)
14
S1
S0
S2
EFSMRepresentation
a
a:= 5
a:= a + 1a:= 6
a
Optimized EFSMRepresentation
Data Flow Optimization
![Page 15: 1 Chapter 7 Function-Architecture Codesign Paradigm](https://reader035.vdocument.in/reader035/viewer/2022062314/56649ed95503460f94be7f3c/html5/thumbnails/15.jpg)
15
Optimization and Co-design Approach
Architecture-independent phase
– Task function is considered solely and control data flow analysis is performed
– Removing redundant information and computations
Architecture-dependent phase
– Rely on architectural information to perform additional guided optimizations tuned to the target platform
![Page 16: 1 Chapter 7 Function-Architecture Codesign Paradigm](https://reader035.vdocument.in/reader035/viewer/2022062314/56649ed95503460f94be7f3c/html5/thumbnails/16.jpg)
16
Graphical EFSM Esterel
ReactiveVHDL Specification
FFGFFG
AUXModeling
Function Architecture
AFFGAFFG
SHIFT(CFSM Network)
FunctionalOptimization
Macro-levelOptimization
Micro-levelOptimization
ResourcePool
Est
imat
ion
and
Val
idat
ion
BehavioralOptimization
Cost-guidedOptimization
HW/SWRTOS/InterfaceCo-synthesis
Decomposition
Constraints
SW Partition HW Partition
Processor
BU
S
Inte
rfac
e
Inte
rfac
e
HW1
HW2
HW5
HW4HW3
RTOS
Concrete Co-design Flow
![Page 17: 1 Chapter 7 Function-Architecture Codesign Paradigm](https://reader035.vdocument.in/reader035/viewer/2022062314/56649ed95503460f94be7f3c/html5/thumbnails/17.jpg)
17
Design
Representation
Function/Architecture Co-Design
![Page 18: 1 Chapter 7 Function-Architecture Codesign Paradigm](https://reader035.vdocument.in/reader035/viewer/2022062314/56649ed95503460f94be7f3c/html5/thumbnails/18.jpg)
18
Function/ArchitectureOptimization and Co-design
Design
Application
Decomposition
controlcontrol
datadata
i/oi/o
ASICsASICsprocessorsprocessors
fsmfsmfsmfsmdata f.data f.data f.data f.II OO
IDR
SW Partition HW Partition
Processor
BU
S
Inte
rfac
e
Inte
rfac
e
HW1
HW2
HW5
HW4HW3
RTOS Hardware/Software Co-synthesis
Mapping
Abstract Co-design Flow
![Page 19: 1 Chapter 7 Function-Architecture Codesign Paradigm](https://reader035.vdocument.in/reader035/viewer/2022062314/56649ed95503460f94be7f3c/html5/thumbnails/19.jpg)
19
Design
IDRIDR
SW HW
Architecture Independent
Architecture Dependent Constraints
Unifying Intermediate Design Representation for Co-design
Intermediate Design Representation
Functional Decomposition
![Page 20: 1 Chapter 7 Function-Architecture Codesign Paradigm](https://reader035.vdocument.in/reader035/viewer/2022062314/56649ed95503460f94be7f3c/html5/thumbnails/20.jpg)
20
Architectural Space
Application Space
Application Instances
Platform Instance
System Platform
Platform Design Space Exploration
Platform Specification
Platform-Based Design
Source: ASV
![Page 21: 1 Chapter 7 Function-Architecture Codesign Paradigm](https://reader035.vdocument.in/reader035/viewer/2022062314/56649ed95503460f94be7f3c/html5/thumbnails/21.jpg)
21
Models and System
Models of computation
– Petri-net model (graphical language for system design)
– FSM (Finite-State Machine) models
– Hierarchical Concurrent FSM models
POLIS system
– CFSM (Co-design FSM)
– EFSM (Extended FSM): support for data handling and asynchronous communication
![Page 22: 1 Chapter 7 Function-Architecture Codesign Paradigm](https://reader035.vdocument.in/reader035/viewer/2022062314/56649ed95503460f94be7f3c/html5/thumbnails/22.jpg)
22
CFSM
Includes
– Finite state machine
– Data computation
– Locally synchronous behavior
– Globally asynchronous behavior
Semantics: GALS (Globally Asynchronous and Locally Synchronous communication model)
![Page 23: 1 Chapter 7 Function-Architecture Codesign Paradigm](https://reader035.vdocument.in/reader035/viewer/2022062314/56649ed95503460f94be7f3c/html5/thumbnails/23.jpg)
23
CFSM2
CFSM3
C=>G
CFSM1
C=>FB=>C
F^(G==1)
(A==0)=>B
C=>ACFSM1
CFSM2
C=>B
B
C=>G
C=>BA
C
C
G
F
CFSM Network MOC
MOC: Model of Computation
Communication between CFSMs by means of events
![Page 24: 1 Chapter 7 Function-Architecture Codesign Paradigm](https://reader035.vdocument.in/reader035/viewer/2022062314/56649ed95503460f94be7f3c/html5/thumbnails/24.jpg)
24
System Specification Language
“ Esterel”
– as “front-end” for functional specification
– Synchronous programming language for specifying reactive real-time systems
Reactive VHDL
Graphical EFSM
![Page 25: 1 Chapter 7 Function-Architecture Codesign Paradigm](https://reader035.vdocument.in/reader035/viewer/2022062314/56649ed95503460f94be7f3c/html5/thumbnails/25.jpg)
25
Intermediate Design Representation (IDR)
Most current optimization and synthesis are performed at the low abstraction level of a DAG (Direct Acyclic Graph).
Function Flow Graph (FFG) is an IDR having the notion of I/O semantics.
Textual interchange format of FFG is called C-Like Intermediate Format (CLIF).
FFG is generated from an EFSM description and can be in a Tree Form or a DAG Form.
![Page 26: 1 Chapter 7 Function-Architecture Codesign Paradigm](https://reader035.vdocument.in/reader035/viewer/2022062314/56649ed95503460f94be7f3c/html5/thumbnails/26.jpg)
26
Design
Functional Decomposition
FFGFFGI/O SemanticsI/O Semantics
SW HW
Architecture Independent
Architecture Dependent
Constraints EFSM SemanticsEFSM Semantics
AFFGAFFG
Refinement Restriction
(Architecture) Function Flow Graph
![Page 27: 1 Chapter 7 Function-Architecture Codesign Paradigm](https://reader035.vdocument.in/reader035/viewer/2022062314/56649ed95503460f94be7f3c/html5/thumbnails/27.jpg)
27
FFG/CLIF
Develop Function Flow Graph (FFG) / C-Like
Intermediate Format (CLIF) • Able to capture EFSM
• Suitable for control and data flow analysis
EFSM FFGOptimized
FFGCDFG
Data Flow/ControlOptimizations
![Page 28: 1 Chapter 7 Function-Architecture Codesign Paradigm](https://reader035.vdocument.in/reader035/viewer/2022062314/56649ed95503460f94be7f3c/html5/thumbnails/28.jpg)
28
Function Flow Graph (FFG)
– FFG is a triple G = (V, E, N0) where
• V is a finite set of nodes
• E = {(x,y)}, a subset of VV; (x,y) is an edge from x to y where x
Pred(y), the set of predecessor nodes of y.
• N0 V is the start node corresponding to the EFSM initial state.
• An unordered set of operations is associated with each node N.
• Operations consist of TESTs performed on the EFSM inputs and
internal variables, and ASSIGNs of computations on the input alphabet
(inputs/internal variables) to the EFSM output alphabet (outputs and
internal (state) variables)
![Page 29: 1 Chapter 7 Function-Architecture Codesign Paradigm](https://reader035.vdocument.in/reader035/viewer/2022062314/56649ed95503460f94be7f3c/html5/thumbnails/29.jpg)
29
C-Like Intermediate Format (CLIF)
Import/Export Function Flow Graph (FFG)
“Un-ordered” list of TEST and ASSIGN operations
– [if (condition)] goto label
– dest = op(src)
• op = {not, minus, …}
– dest = src1 op src2
• op = {+, *, /, ||, &&, |, &, …}
– dest = func(arg1, arg2, …)
![Page 30: 1 Chapter 7 Function-Architecture Codesign Paradigm](https://reader035.vdocument.in/reader035/viewer/2022062314/56649ed95503460f94be7f3c/html5/thumbnails/30.jpg)
30
Preserving I/O Semantics
input inp;
output outp;
int a = 0;
int CONST_0 = 0;
int T11 = 0;
int T13 = 0;
S1: goto S2;S2: a = inp; T13 = a + 1 CONST_0; T11 = a + a; outp = T11; goto S3;S3: outp = T13; goto S3;
![Page 31: 1 Chapter 7 Function-Architecture Codesign Paradigm](https://reader035.vdocument.in/reader035/viewer/2022062314/56649ed95503460f94be7f3c/html5/thumbnails/31.jpg)
31
FFG / CLIF Example
(cond2 == 0) / output(a)(cond2 == 1) / output(b)
Legend: Legend: constantconstant, , output flowoutput flow, , dead operationdead operationSS## = State, = State, SS##LL## = Label in State S# = Label in State S#
S1x=x+yx=x+ya= b+c
a=xcond1 = (y==cst1)cond2 = !cond1;
y = 1
FunctionFlow Graph
S1: x = x + y;x = x + y;a = b + c;a = x;cond1 = (y == cst1);cond2 = !cond1;if (cond2) goto S1L0output = a;goto S1; /* Loop */
output = b;goto S1;
S1L0:
CLIFTextual Representation
![Page 32: 1 Chapter 7 Function-Architecture Codesign Paradigm](https://reader035.vdocument.in/reader035/viewer/2022062314/56649ed95503460f94be7f3c/html5/thumbnails/32.jpg)
32
Tree-Form FFG
![Page 33: 1 Chapter 7 Function-Architecture Codesign Paradigm](https://reader035.vdocument.in/reader035/viewer/2022062314/56649ed95503460f94be7f3c/html5/thumbnails/33.jpg)
33
Function/Architecture Optimizations
Function/Architecture Co-Design
![Page 34: 1 Chapter 7 Function-Architecture Codesign Paradigm](https://reader035.vdocument.in/reader035/viewer/2022062314/56649ed95503460f94be7f3c/html5/thumbnails/34.jpg)
34
Function Optimization
Architecture-Independent optimization objective:
– Eliminate redundant information in the FFG.
– Represent the information in an optimized FFG that has a minimal number of nodes and associated operations.
![Page 35: 1 Chapter 7 Function-Architecture Codesign Paradigm](https://reader035.vdocument.in/reader035/viewer/2022062314/56649ed95503460f94be7f3c/html5/thumbnails/35.jpg)
35
FFG Optimization algorithm(G)
begin
while changes to FFG do
Variable Definition and Uses
FFG Build
Reachability Analysis
Normalization
Available Elimination
False Branch Pruning
Copy Propagation
Dead Operation Elimination
end while
end
FFG Optimization Algorithm
![Page 36: 1 Chapter 7 Function-Architecture Codesign Paradigm](https://reader035.vdocument.in/reader035/viewer/2022062314/56649ed95503460f94be7f3c/html5/thumbnails/36.jpg)
36
Optimization Approach
Develop optimizer for FFG (CLIF) intermediate design representation
Goal: Optimize for speed, and size by reducing
– ASSIGN operations
– TEST operations
– variables
Reach goal by solving sequence of data flow problems for analysis and information gathering using an underlying Data Flow Analysis Data Flow Analysis (DFA) framework(DFA) framework
Optimize by Optimize by information redundancy eliminationinformation redundancy elimination
![Page 37: 1 Chapter 7 Function-Architecture Codesign Paradigm](https://reader035.vdocument.in/reader035/viewer/2022062314/56649ed95503460f94be7f3c/html5/thumbnails/37.jpg)
37
Sample DFA ProblemAvailable Expressions Example
Goal is to eliminate re-computations– Formulate Available Expressions Problem
– Forward Flow (meet) Problem
AE = a+2}
AE = a+1, b+2}AE = a+1}AE = a+1}
AE = AE =
AE = Available Expression
S1
t:= a + 1
S3a := a * 5t3 = a + 2
S2t1:= a + 1t2:= b + 2
![Page 38: 1 Chapter 7 Function-Architecture Codesign Paradigm](https://reader035.vdocument.in/reader035/viewer/2022062314/56649ed95503460f94be7f3c/html5/thumbnails/38.jpg)
38
Data Flow Problem Instance
A particular (problem) instance of a monotone data flow analysis framework is a pair I = (G, M) where M: N F is a function that maps each node N in V of FFG G to a function in F on the node label semilattice L of the framework D.
![Page 39: 1 Chapter 7 Function-Architecture Codesign Paradigm](https://reader035.vdocument.in/reader035/viewer/2022062314/56649ed95503460f94be7f3c/html5/thumbnails/39.jpg)
39
Data Flow Analysis Framework
A monotone data flow analysis framework D = (L, , F) is used to manipulate the data flow information by interpreting the node labels on N in V of the FFG G as elements of an algebraic structure where
– L is a bounded semilattice with meet , and
– F is a monotone function space associated with L.
![Page 40: 1 Chapter 7 Function-Architecture Codesign Paradigm](https://reader035.vdocument.in/reader035/viewer/2022062314/56649ed95503460f94be7f3c/html5/thumbnails/40.jpg)
40
Data Flow Equations
Solving Data Flow Problems
AE = a+2}
AE = a+1, b+2}AE = a+1}AE = a+1}
AE = AE =
AE = Available Expression
S1
t:= a + 1
S3a := a * 5t3 = a + 2
S2t1:= a + 1t2:= b + 2
![Page 41: 1 Chapter 7 Function-Architecture Codesign Paradigm](https://reader035.vdocument.in/reader035/viewer/2022062314/56649ed95503460f94be7f3c/html5/thumbnails/41.jpg)
41
Solving Data Flow Problems
Solve data flow problems using the iterative method
– General: does not depend on the flow graph
– Optimal for a class of data flow problems Reaches fixpoint in polynomial time (O(n2))
![Page 42: 1 Chapter 7 Function-Architecture Codesign Paradigm](https://reader035.vdocument.in/reader035/viewer/2022062314/56649ed95503460f94be7f3c/html5/thumbnails/42.jpg)
42
FFG Optimization Algorithm
Solve following problems in order to improve design:
– Reaching Definitions and Uses
– Normalization
– Available Expression Computation
– Copy Propagation, and Constant Folding
– Reachability Analysis
– False Branch Pruning
Code Improvement techniques
– Dead Operation Elimination
– Computation sharing through normalization
Type text
![Page 43: 1 Chapter 7 Function-Architecture Codesign Paradigm](https://reader035.vdocument.in/reader035/viewer/2022062314/56649ed95503460f94be7f3c/html5/thumbnails/43.jpg)
43
Function/Architecture Co-design
![Page 44: 1 Chapter 7 Function-Architecture Codesign Paradigm](https://reader035.vdocument.in/reader035/viewer/2022062314/56649ed95503460f94be7f3c/html5/thumbnails/44.jpg)
44
Function Architecture Optimizations
Fun./Arch. Representation:
– Attributed Function Flow Graph (AFFG) is used to represent architectural constraints impressed upon the functional behavior of an EFSM task.
![Page 45: 1 Chapter 7 Function-Architecture Codesign Paradigm](https://reader035.vdocument.in/reader035/viewer/2022062314/56649ed95503460f94be7f3c/html5/thumbnails/45.jpg)
45
Architecture Dependent Optimizations
libArchitecturalInformation
EFSM FFG OFFG CDFGAFFG
ArchitectureIndependent
Sum
![Page 46: 1 Chapter 7 Function-Architecture Codesign Paradigm](https://reader035.vdocument.in/reader035/viewer/2022062314/56649ed95503460f94be7f3c/html5/thumbnails/46.jpg)
46
EFSM in AFFG (State Tree) Form
F0
F1
F2
F8
F7F6
F5
F4F3S0
S1
S2
![Page 47: 1 Chapter 7 Function-Architecture Codesign Paradigm](https://reader035.vdocument.in/reader035/viewer/2022062314/56649ed95503460f94be7f3c/html5/thumbnails/47.jpg)
47
Architecture Dependent Optimization Objective
Optimize the AFFG task representation for speed of execution and size given a set of architectural constrains
Size: area of hardware, code size of software
![Page 48: 1 Chapter 7 Function-Architecture Codesign Paradigm](https://reader035.vdocument.in/reader035/viewer/2022062314/56649ed95503460f94be7f3c/html5/thumbnails/48.jpg)
48
y = a + ba = cx = a + b
y = a + b
z = a + ba = c
y = a + b
x = a + b
1
2
3
6
7
54
88
99
10
ReactivityLoop
Motivating Example
Eliminate the redundant needless runtime re-evaluation of the a+b operation
![Page 49: 1 Chapter 7 Function-Architecture Codesign Paradigm](https://reader035.vdocument.in/reader035/viewer/2022062314/56649ed95503460f94be7f3c/html5/thumbnails/49.jpg)
49
Cost-guided Relaxed Operation Motion (ROM)
For performing safe and operation from heavily executed portions of a design task to less visited segments
Relaxed-Operation-Motion (ROM): begin
Data Flow and Control Optimization
Reverse Sweep (dead operation addition, Normalization and available operation elimination, dead operation elimination)
Forward Sweep (optional, minimize the lifetime)
Final Optimization Pass
end
![Page 50: 1 Chapter 7 Function-Architecture Codesign Paradigm](https://reader035.vdocument.in/reader035/viewer/2022062314/56649ed95503460f94be7f3c/html5/thumbnails/50.jpg)
50
Cost-Guided Operation Motion
Cost EstimationDesign
Optimization
User Input Profiling
InferenceEngine
AttributedFFG
Relaxed Relaxed Operation MotionOperation Motion
FFG(back-end)
![Page 51: 1 Chapter 7 Function-Architecture Codesign Paradigm](https://reader035.vdocument.in/reader035/viewer/2022062314/56649ed95503460f94be7f3c/html5/thumbnails/51.jpg)
51
Function Architecture Co-designin the Micro-Architecture
AFFGFFG fsmfsmfsmfsm data f.data f.data f.data f.
II OOcontrolcontrol
datadata
i/oi/o
ASICsASICsprocessorsprocessors
SystemConstraints
SystemSpecs
DecompositionDecomposition
t1= 3*bt2= t1+a
emit x(t2)
Operator Strength ReductionInstruction Selection
![Page 52: 1 Chapter 7 Function-Architecture Codesign Paradigm](https://reader035.vdocument.in/reader035/viewer/2022062314/56649ed95503460f94be7f3c/html5/thumbnails/52.jpg)
52
Operator Strength Reduction
t1= 3*b
t2=t1 + a
x=t2
expr1 = b + b;
t1 = expr1 + b;
t2 = t1 + a;
x = t2;
Reducing the multiplication operator
![Page 53: 1 Chapter 7 Function-Architecture Codesign Paradigm](https://reader035.vdocument.in/reader035/viewer/2022062314/56649ed95503460f94be7f3c/html5/thumbnails/53.jpg)
53
Architectural Optimization
Abstract Target Platform
– Macro-architectures of the HW or SW system design tasks
CFSM (Co-design FSM): FSM with reactive behavior
– A reactive block
– A set of combinational data-low functions
Software Hardware Intermediate Format (SHIFT)
– SHIFT = CFSMs + Functions
![Page 54: 1 Chapter 7 Function-Architecture Codesign Paradigm](https://reader035.vdocument.in/reader035/viewer/2022062314/56649ed95503460f94be7f3c/html5/thumbnails/54.jpg)
54
SW Partition HW Partition
ProcessorB
US
Inte
rfac
e
RTOS
Inte
rfac
e
HW1
HW2
HW5
HW4HW3
Macro-Architectural Organization
![Page 55: 1 Chapter 7 Function-Architecture Codesign Paradigm](https://reader035.vdocument.in/reader035/viewer/2022062314/56649ed95503460f94be7f3c/html5/thumbnails/55.jpg)
55
Architectural Organization of a Single CFSM Task
CFSM
![Page 56: 1 Chapter 7 Function-Architecture Codesign Paradigm](https://reader035.vdocument.in/reader035/viewer/2022062314/56649ed95503460f94be7f3c/html5/thumbnails/56.jpg)
56
Task Level Control and Data Flow Organization
Reactive ControllerEQ
1
RESET
INC
0
MUX
a
b
c
a
y
a_EQ_b
INC_a
RESET_a
s
![Page 57: 1 Chapter 7 Function-Architecture Codesign Paradigm](https://reader035.vdocument.in/reader035/viewer/2022062314/56649ed95503460f94be7f3c/html5/thumbnails/57.jpg)
57
CFSM Network Architecture
Software Hardware Intermediate FormaT (SHIFT) for describing a network of CFSMs
It is a hierarchical netlist of
– Co-design finite state machine
– Functions: state-less arithmetic, Boolean, or user-defined operations
![Page 58: 1 Chapter 7 Function-Architecture Codesign Paradigm](https://reader035.vdocument.in/reader035/viewer/2022062314/56649ed95503460f94be7f3c/html5/thumbnails/58.jpg)
58
SHIFT: CFSMs + Functions
![Page 59: 1 Chapter 7 Function-Architecture Codesign Paradigm](https://reader035.vdocument.in/reader035/viewer/2022062314/56649ed95503460f94be7f3c/html5/thumbnails/59.jpg)
59
Architectural Modeling
Using an AUXiliary specification (AUX)
AUX can describe the following information
– Signal and variable type-related information
– Definition of the value of constants
– Creation of hierarchical netlist, instantiating and interconnecting the CFSMs described in SHIFT
![Page 60: 1 Chapter 7 Function-Architecture Codesign Paradigm](https://reader035.vdocument.in/reader035/viewer/2022062314/56649ed95503460f94be7f3c/html5/thumbnails/60.jpg)
60
Mapping AFFG onto SHIFT Synthesis through mapping AFFG onto SHIFT and AUX
(Auxiliary Specification)
Decompose each AFFG task behavior into a single reactive control part, and a set of data-path functions.
Mapping AFFG onto SHIFT Algorithm (G, AUX)
begin
foreach state s belong to G do
build_trel (s.trel , s, s.start_node, G, AUX);
end foreach
end
![Page 61: 1 Chapter 7 Function-Architecture Codesign Paradigm](https://reader035.vdocument.in/reader035/viewer/2022062314/56649ed95503460f94be7f3c/html5/thumbnails/61.jpg)
61
Architecture Dependent Optimizations
Additional architecture Information leads to an increased level of macro- (or micro-) architectural optimization
Examples of macro-arch. Optimization
– Multiplexing computation Inputs
– Function sharing
Example of micro-arch. Optimization
– Data Type Optimization
![Page 62: 1 Chapter 7 Function-Architecture Codesign Paradigm](https://reader035.vdocument.in/reader035/viewer/2022062314/56649ed95503460f94be7f3c/html5/thumbnails/62.jpg)
62
ReactiveController
a
b
c
d
e
s
MUX
ITE
ITE out
…
de
Tout
Distributing the Reactive Controller
Move some of the control into data path as an ITE assign expression
ITE: if-then-else
![Page 63: 1 Chapter 7 Function-Architecture Codesign Paradigm](https://reader035.vdocument.in/reader035/viewer/2022062314/56649ed95503460f94be7f3c/html5/thumbnails/63.jpg)
63
+
Control{1, 2}
1
2
b
-c-
T(b+-c-)
a
c
Multiplexing Inputs
c = a
T = b + c +b
T(b+a)
a
+b
T(b+c)
c
![Page 64: 1 Chapter 7 Function-Architecture Codesign Paradigm](https://reader035.vdocument.in/reader035/viewer/2022062314/56649ed95503460f94be7f3c/html5/thumbnails/64.jpg)
64
Micro-Architectural Optimization
Available Expressions cannot eliminate T2
But if variables are registered (additional architectural information) we can share T1 and T2
b
++
a x
Out
T(a+b)
S1
T1 = a + b;x = T1;a = c;
S2T2 = a + b;Out = T(a+b);
emit(Out)
![Page 65: 1 Chapter 7 Function-Architecture Codesign Paradigm](https://reader035.vdocument.in/reader035/viewer/2022062314/56649ed95503460f94be7f3c/html5/thumbnails/65.jpg)
65
Hardware/Software Co-Synthesis and
Estimation
Function/Architecture Co-Design
![Page 66: 1 Chapter 7 Function-Architecture Codesign Paradigm](https://reader035.vdocument.in/reader035/viewer/2022062314/56649ed95503460f94be7f3c/html5/thumbnails/66.jpg)
66
FFG AFFG
FFG Interpreter (Simulation)
Co-Synthesis Flow
EFSMCDFGSHIFTSHIFT
SoftwareCompilation
ObjectCode (.o)
HardwareSynthesis
Netlist
Or
![Page 67: 1 Chapter 7 Function-Architecture Codesign Paradigm](https://reader035.vdocument.in/reader035/viewer/2022062314/56649ed95503460f94be7f3c/html5/thumbnails/67.jpg)
67
POLIS Co-design Environment
Programmable Programmable BoardBoard
P of choiceP of choice FPGAsFPGAs FPICsFPICs
Graphical EFSMGraphical EFSM ESTERELESTEREL ................................
CFSMsCFSMs
PartitioningPartitioning
SW SynthesisSW Synthesis
SW Code + SW Code + RTOSRTOS
Logic NetlistLogic Netlist
HW SynthesisHW Synthesis
SW EstimationSW Estimation HW EstimationHW Estimation
Physical PrototypingPhysical Prototyping
Performance/trade-off Performance/trade-off EvaluationEvaluation
CompilersCompilers
![Page 68: 1 Chapter 7 Function-Architecture Codesign Paradigm](https://reader035.vdocument.in/reader035/viewer/2022062314/56649ed95503460f94be7f3c/html5/thumbnails/68.jpg)
68
POLIS Co-design Environment Specification: FSM-based languages (Esterel, ...)
Internal representation: CFSM network
Validation:
– High-level co-simulation
– FSM-based formal verification
– Rapid prototyping
Partitioning: based on co-simulation estimates
Scheduling
Synthesis:
– S-graph (based on a CDFG) based code synthesis for software
– Logic synthesis for hardware
Main emphasis on unbiased verifiable specification
![Page 69: 1 Chapter 7 Function-Architecture Codesign Paradigm](https://reader035.vdocument.in/reader035/viewer/2022062314/56649ed95503460f94be7f3c/html5/thumbnails/69.jpg)
69
Hardware/Software Co-Synthesis
Functional GALS CFSM model for hardware and software
initially unbounded delays refined after architecture mapping
Automatic synthesis of:
• Hardware
• Software
• Interfaces
• RTOS
![Page 70: 1 Chapter 7 Function-Architecture Codesign Paradigm](https://reader035.vdocument.in/reader035/viewer/2022062314/56649ed95503460f94be7f3c/html5/thumbnails/70.jpg)
70
ResourcePool
CFSMNetwork
RTOSSynthesis
HW/SWSynthesis
PhysicalPrototyping
RTOS Synthesis and Evaluation in Polis
1. Provide communication mechanisms among CFSMs implemented in SW and between the OS is running on and HW partitions.
2. Schedule the execution of the SW tasks.
![Page 71: 1 Chapter 7 Function-Architecture Codesign Paradigm](https://reader035.vdocument.in/reader035/viewer/2022062314/56649ed95503460f94be7f3c/html5/thumbnails/71.jpg)
71
a := a + 1a := 0
detect(c)a<
b
BEGIN
END
emit(y)
T
F TF
40
266341
14
189
Estimation on the Synthesis CDFG
![Page 72: 1 Chapter 7 Function-Architecture Codesign Paradigm](https://reader035.vdocument.in/reader035/viewer/2022062314/56649ed95503460f94be7f3c/html5/thumbnails/72.jpg)
72
Architecture Evaluation Problem
BehaviorBehavior
ArchitectureArchitecture
HDLHDLHighHighCostCost
Out ofOut ofSpecSpec
SystemSystemBehaviorBehavior
Refin
Refinee
Refin
Refinee
SystemSystemArchitectureArchitecture
SystemSystemBehaviorBehavior
Refin
Refinee
Refin
Refinee
SystemSystemArchitectureArchitecture
Time and MoneyTime and Money
![Page 73: 1 Chapter 7 Function-Architecture Codesign Paradigm](https://reader035.vdocument.in/reader035/viewer/2022062314/56649ed95503460f94be7f3c/html5/thumbnails/73.jpg)
73
Proper Architectural Evaluation
Time and MoneyTime and Money
SystemSystemBehaviorBehavior
Refin
Refinee
SystemSystemArchitectureArchitecture
SystemSystemArchitectureArchitecture
SystemSystemArchitectureArchitecture
In SpecIn SpecLow CostLow Cost
BehaviorBehavior
ArchitectureArchitecture
ImplementationImplementation
![Page 74: 1 Chapter 7 Function-Architecture Codesign Paradigm](https://reader035.vdocument.in/reader035/viewer/2022062314/56649ed95503460f94be7f3c/html5/thumbnails/74.jpg)
74
Network ofEFSMs
Network ofEFSMs
SW Estimation
SW Estimation HW EstimationHW Estimation
HW/SW Co-SimulationPerformance/trade-off Evaluation
HW/SW Co-SimulationPerformance/trade-off Evaluation
HW/SW PartitioningHW/SW Partitioning
Estimation-Based Co-simulation
![Page 75: 1 Chapter 7 Function-Architecture Codesign Paradigm](https://reader035.vdocument.in/reader035/viewer/2022062314/56649ed95503460f94be7f3c/html5/thumbnails/75.jpg)
75
Co-simulation Approach (1)
Fills the “validation gap” between fast and slow models
– Performs performance simulation based on software and hardware timing estimates
Outputs behavioral VHDL code
– Generated from CDFG describing EFSM reactive function
– Annotated with clock cycles required on target processors
Can incorporate VHDL models of pre-existing components
![Page 76: 1 Chapter 7 Function-Architecture Codesign Paradigm](https://reader035.vdocument.in/reader035/viewer/2022062314/56649ed95503460f94be7f3c/html5/thumbnails/76.jpg)
76
Co-simulation Approach (2)
Models of mixed hardware, software, RTOS and interfaces
Mimics the RTOS I/O monitoring and scheduling
– Hardware CFSMs are concurrent
– Only one software CFSM can be active at a time
Future WorkFuture Work
– ArchitecturalArchitectural view instead of component view view instead of component view
![Page 77: 1 Chapter 7 Function-Architecture Codesign Paradigm](https://reader035.vdocument.in/reader035/viewer/2022062314/56649ed95503460f94be7f3c/html5/thumbnails/77.jpg)
77
Research Directions in F-A Codesign
Functional decomposition, cross- “block” optimization ~ hardware/software partitioning techniques
Task and system level algorithm manipulations ~ performing user-guided algorithmic manipulations