System Level Design For Low Powerorssi/dersler/SLD/slides.pdf · Hardware-software co-design of...

73
Yard. Doç. Dr. Berna Örs Yalçın System Level Design For Low Power

Transcript of System Level Design For Low Powerorssi/dersler/SLD/slides.pdf · Hardware-software co-design of...

Page 1: System Level Design For Low Powerorssi/dersler/SLD/slides.pdf · Hardware-software co-design of embedded systems : the POLIS approach / by Felice Balarin ... [et al.], Boston : Kluwer

Yard. Doç. Dr. Berna Örs Yalçın

System Level Design For Low Power

Page 2: System Level Design For Low Powerorssi/dersler/SLD/slides.pdf · Hardware-software co-design of embedded systems : the POLIS approach / by Felice Balarin ... [et al.], Boston : Kluwer

References   System-Level Design Methodology, Daniel D. Gajski   Hardware-software co-design of embedded systems : the

POLIS approach / by Felice Balarin ... [et al.], Boston : Kluwer Academic Publishers, c1997

  Embedded System Design, Peter Marwedel, Kluwer Academic Publishers, 2003

  Low Power Electronics Design

Page 3: System Level Design For Low Powerorssi/dersler/SLD/slides.pdf · Hardware-software co-design of embedded systems : the POLIS approach / by Felice Balarin ... [et al.], Boston : Kluwer

Design Methodologies   The designers can only focus their efforts on the level at which the

system is comprehensible to them.   Complexities of Systems -on-Chip rising almost daily

  The set of specific tasks in design process is called a design methodology.   Need a new methodology

  increased productivity   decreased times-to-market.

  Solution   increasing levels of abstraction, or in other words, increasing the size of

the basic building blocks.   The industry infrastructure which is also supported by separate SW

and HW programs created the system gap in which non-compatible SW and HW methodologies are preventing the progress in design of electronic systems.

Page 4: System Level Design For Low Powerorssi/dersler/SLD/slides.pdf · Hardware-software co-design of embedded systems : the POLIS approach / by Felice Balarin ... [et al.], Boston : Kluwer
Page 5: System Level Design For Low Powerorssi/dersler/SLD/slides.pdf · Hardware-software co-design of embedded systems : the POLIS approach / by Felice Balarin ... [et al.], Boston : Kluwer

Design Flow (1/2)   Capture-and-Simulate Methodology (approximately from 1960s to 1980s)

  Software and hardware design was separated by a system gap.   SW designers tested some algorithms and possibly wrote the requirements document and an initial

specification.   This specification was given to HW designers who read it and started system design with a block

diagram.   They did not know whether their design will satisfy the specification until the gate level design was

captured and simulated.   Describe-and-Synthesize methodology (late 1980s to late 1990s)

  Logic synthesis   Designers first specify what they want in terms of Boolean equations or FSM descriptions   The synthesis tools generate the implementation in terms of a gate netlist   The behavior or the function comes first and the structure or implementation next.   There are two models to simulate: behavior (function) and gate-level structure (netlist).   Specification comes before implementation and they are both simulatable.   It is possible to verify their equivalence since they can be both reduced to a canonical form in

principle.   Today’s designs are too large for this kind of equivalence checking.   By late 1990s the logic level has been abstracted to cycle-accurate (RTL) description and synthesis.   We have two abstraction levels (RTL and gate levels) and two different models on each level

(behavioral and structural).   The system gap still persists.

Page 6: System Level Design For Low Powerorssi/dersler/SLD/slides.pdf · Hardware-software co-design of embedded systems : the POLIS approach / by Felice Balarin ... [et al.], Boston : Kluwer

Design Flow (2/2)   Specify, Explore-and-Refine Methodology (from early 2000s )

  In order to close the gap we must increase level of abstraction from RTL to SL.   On SL level we have

  executable specification that represents the system behavior (function)   structural models with emphasis on connectivity (communication).

  Each model is used to prove some system property such as functionality, connectivity, communication and so on.

  Each model can be considered to be a specification for the next level model in which more detail in implementation is added.

  Specify-explore-refine (SER) methodology represents a sequence of models in which each model is an refinement of the previous one.

  SER methodology follows the natural design process where designers specify the intent first, explore possibilities and then refine the model according to their decisions.

  SER flow can be viewed as several iterations of the basic describe-and-synthesize methodology.

Page 7: System Level Design For Low Powerorssi/dersler/SLD/slides.pdf · Hardware-software co-design of embedded systems : the POLIS approach / by Felice Balarin ... [et al.], Boston : Kluwer

Missing Semantics   With introduction of SL abstraction, designers have to generate even more models.   One obvious solution is to automatically refine one model into another.   That requires well defined model semantics, or , in other words, good understanding what is meant

by the given model.   Design methodologies and EDA industry have been dominated by simulation based methodologies

in the past.   For example, all HDL (such as Verilog, VHDL, SystemC, and others) are simulatable but not

synthetizable or verifiable.   A case statement can be used to model a FSM or a look-up table, for example.   However, FSMs and look-up tables require different implementations:

  a FSM can be implemented with a controller   a look-up table is implemented with a memory.

  Therefore, the model which uses case statement to model FSMs and tables is   good for simulation   not good for implementation since a designer does not know what was really described by the case

statement.   Thus, clean and unambigues semantics is needed for refinement, synthesis and verification.   Such a clean semantics is missing from most of the simulation-oriented languages.

Page 8: System Level Design For Low Powerorssi/dersler/SLD/slides.pdf · Hardware-software co-design of embedded systems : the POLIS approach / by Felice Balarin ... [et al.], Boston : Kluwer
Page 9: System Level Design For Low Powerorssi/dersler/SLD/slides.pdf · Hardware-software co-design of embedded systems : the POLIS approach / by Felice Balarin ... [et al.], Boston : Kluwer
Page 10: System Level Design For Low Powerorssi/dersler/SLD/slides.pdf · Hardware-software co-design of embedded systems : the POLIS approach / by Felice Balarin ... [et al.], Boston : Kluwer
Page 11: System Level Design For Low Powerorssi/dersler/SLD/slides.pdf · Hardware-software co-design of embedded systems : the POLIS approach / by Felice Balarin ... [et al.], Boston : Kluwer

  While transformations are small and not significant changes in a model, a refinement, on the other hand, modifies the model dramatically by exposing a different aspect or characteristic of the design.

Page 12: System Level Design For Low Powerorssi/dersler/SLD/slides.pdf · Hardware-software co-design of embedded systems : the POLIS approach / by Felice Balarin ... [et al.], Boston : Kluwer
Page 13: System Level Design For Low Powerorssi/dersler/SLD/slides.pdf · Hardware-software co-design of embedded systems : the POLIS approach / by Felice Balarin ... [et al.], Boston : Kluwer

Model Definition   A model is a set of objects and a set of composition rules defined on those objects.   A specification level model

  objects like   behaviors for computation   channels for communication

  An architecture model   components such as processors, memories, IPs for computation   buses for communication.

  Composition rules combine objects into larger objects and create hierarchical structures.   A model algebra represents the set of all possible models that use the same set of objects

and composition rules.   Such a set of all possible models is infinite.   A specific model is defined by a set of relations (one relation per each composition rule)

which define which objects are related by the particular composition rule in the given model.

Page 14: System Level Design For Low Powerorssi/dersler/SLD/slides.pdf · Hardware-software co-design of embedded systems : the POLIS approach / by Felice Balarin ... [et al.], Boston : Kluwer
Page 15: System Level Design For Low Powerorssi/dersler/SLD/slides.pdf · Hardware-software co-design of embedded systems : the POLIS approach / by Felice Balarin ... [et al.], Boston : Kluwer
Page 16: System Level Design For Low Powerorssi/dersler/SLD/slides.pdf · Hardware-software co-design of embedded systems : the POLIS approach / by Felice Balarin ... [et al.], Boston : Kluwer

Refinement- based methodology   Any design flow or design methodology can be described by a set of

models and the corresponding set of refinements of one model into another.

  Since each model refinement is well defined sequence of transformations, each refinement can be automated.

  If each refinement is automated, then each model can be automatically generated.

Page 17: System Level Design For Low Powerorssi/dersler/SLD/slides.pdf · Hardware-software co-design of embedded systems : the POLIS approach / by Felice Balarin ... [et al.], Boston : Kluwer

Refinement- based methodology   If models are automatically generated then designers do not need

to write different design models except the original specification model.

  If designers do not write models then there is no need for different modeling languages.

  In other words, designers only make design decisions, while every design decision is automatically applied through corresponding model transformation.

Page 18: System Level Design For Low Powerorssi/dersler/SLD/slides.pdf · Hardware-software co-design of embedded systems : the POLIS approach / by Felice Balarin ... [et al.], Boston : Kluwer

System Synthesis through Refinement   Synthesis is the process of converting the functional

description of a black box into a structure of the black box that consists of connected components from a given library.

  During this process we must make several different design decisions   selecting components and their connectivity,  Mapping computation and communication constructs to

components   ordering or scheduling computations or communications of

different messages   adding new objects   inserting synchronization to preserve dependences

Page 19: System Level Design For Low Powerorssi/dersler/SLD/slides.pdf · Hardware-software co-design of embedded systems : the POLIS approach / by Felice Balarin ... [et al.], Boston : Kluwer

System Synthesis through Refinement   The design process is a sequence o f such design decisions.   Since for every design decision there is a model

transformation, a sequence of design decisions will result in a sequence of transformations or model refinement.

  Synthesis = design + refinement   The main challenge for every application today is

  to define the appropriate set of models and corresponding refinements

  for every refinement, the sequence of design decisions and corresponding model transformations.

Page 20: System Level Design For Low Powerorssi/dersler/SLD/slides.pdf · Hardware-software co-design of embedded systems : the POLIS approach / by Felice Balarin ... [et al.], Boston : Kluwer
Page 21: System Level Design For Low Powerorssi/dersler/SLD/slides.pdf · Hardware-software co-design of embedded systems : the POLIS approach / by Felice Balarin ... [et al.], Boston : Kluwer
Page 22: System Level Design For Low Powerorssi/dersler/SLD/slides.pdf · Hardware-software co-design of embedded systems : the POLIS approach / by Felice Balarin ... [et al.], Boston : Kluwer

Y-Chart   Y-Chart makes the assumption that each design can be modeled in three basic ways that

emphasize different properties of the same design.   Y-Chart has three axes that represent

  design behavior (function, specification)   design structure (netlist, block diagram)   physical design (layout, boards, packages).

  Behavior represents a design as a black box and describes its outputs in terms of its inputs and time. The black-box behavior does not indicate in anyway how to implement the black box or what its structure is.

  In the structure axis, black box is represented as a set of components and connections. Although, behavior of the black box can be derived from its component behaviors such behavior may be difficult to understand.

  Physical design adds dimensionality to the structure. It specifies size (height and width) of each component, the position of each component, each port and each connection on the silicon substrate or board or any other container.

  Y-Chart can also represent design on different abstraction levels identified by concentric circles around the origin.   Each abstraction level uses different time granularity. Usually, four levels are identified:

  Circuit   Logic   Processor   System levels.

Page 23: System Level Design For Low Powerorssi/dersler/SLD/slides.pdf · Hardware-software co-design of embedded systems : the POLIS approach / by Felice Balarin ... [et al.], Boston : Kluwer

Y-Chart   The abstraction level can be also identified by the main component used in

the structure.The main components on   Circuit level are N or P-type transistors   Logic level they are gates and flip-flops   Processor level the main components are storage units such as register files and

functional units such as ALUs   System level they are processors, memories and buses

  Converting behavior into structure on each abstraction level is called synthesis, and the structure into layout is called physical design.

  Each abstraction level needs also a database of components on this level.   Each component in the database has tree models representing three different

axes in the Y-Chart:   behavior or function (sometimes called Model of Computation (MoC))   structure of components from the lower level of abstraction   physical layout or implementation of the structure.

  These components are IPs for each abstraction level.

Page 24: System Level Design For Low Powerorssi/dersler/SLD/slides.pdf · Hardware-software co-design of embedded systems : the POLIS approach / by Felice Balarin ... [et al.], Boston : Kluwer

Example   A system which can add or multiply two 32-bit numbers   Behavioral representation: and   Structural representation:

  Several interconnected registers  Arithmetic units  Multiplexors

Focus : functional correctness ⇒ create better products when working with behavioral respresentation

Page 25: System Level Design For Low Powerorssi/dersler/SLD/slides.pdf · Hardware-software co-design of embedded systems : the POLIS approach / by Felice Balarin ... [et al.], Boston : Kluwer

Levels of Abstraction

Page 26: System Level Design For Low Powerorssi/dersler/SLD/slides.pdf · Hardware-software co-design of embedded systems : the POLIS approach / by Felice Balarin ... [et al.], Boston : Kluwer
Page 27: System Level Design For Low Powerorssi/dersler/SLD/slides.pdf · Hardware-software co-design of embedded systems : the POLIS approach / by Felice Balarin ... [et al.], Boston : Kluwer

Finite State Machine

r3/n

f1 f2

f3

r1/n r2/n

start

r2/u1

r1/d1

r3/u2 r1/d2

r3/u1

r2/d1

Page 28: System Level Design For Low Powerorssi/dersler/SLD/slides.pdf · Hardware-software co-design of embedded systems : the POLIS approach / by Felice Balarin ... [et al.], Boston : Kluwer

Finite State Machine   States   A set of transitions   A set of actions

<S, I, O, f : S × I → S, h : S × I → O> Set of states : S={s1,s2,…,sn} Set of inputs : I={i1,i2,…,im} Set of outputs : O={o1,o2,…,ok} Next state function : f Output function : h

Page 29: System Level Design For Low Powerorssi/dersler/SLD/slides.pdf · Hardware-software co-design of embedded systems : the POLIS approach / by Felice Balarin ... [et al.], Boston : Kluwer

Meally and Moore Machines   Transition based (Mealy) : h : S × I → O   State based (Moore) : h : S → O

Page 30: System Level Design For Low Powerorssi/dersler/SLD/slides.pdf · Hardware-software co-design of embedded systems : the POLIS approach / by Felice Balarin ... [et al.], Boston : Kluwer

Views of an Elevator Controller   If the elevator is stationary and the floor

requested is equal to the current floor, then the elevator remains idle.

  If the elevator is stationary and the floor requested is less than the current floor, then lower the elevator to the requested floor.

  If the elevator is stationary and the floor requested is greater than the current floor, then raise the elevator to the requested floor.

loop if (req_floor = curr_floor) then direction := idle; elsif (req_floor < curr_floor) then direction := down; elsif (req_floor > curr_floor) then direction := up; end if; end loop;

Down Idle Up

req_floor < curr_floor direction := down

req_floor = curr_floor direction := idle

req_floor > curr_floor direction := up

req_floor < curr_floor direction := down

req_floor = curr_floor direction := idle

req_floor = curr_floor direction := idle

req_floor > curr_floor direction := up

Page 31: System Level Design For Low Powerorssi/dersler/SLD/slides.pdf · Hardware-software co-design of embedded systems : the POLIS approach / by Felice Balarin ... [et al.], Boston : Kluwer

f1/n

f3/d1 f2/u1 f1/u1

f3/d2 f2/d1 f1/u2

f3/n f2/n start

r1

r3

r2

r1

r2

r3 r1

r2

r3

r1

r2

r3

r1

r2

r3

r1

r2

r3

r1 r2

r3

r1

r2

r3

r1

r2

r3

Page 32: System Level Design For Low Powerorssi/dersler/SLD/slides.pdf · Hardware-software co-design of embedded systems : the POLIS approach / by Felice Balarin ... [et al.], Boston : Kluwer

FSM with Data Path

Curr_floor!=req_floor/output:=req_floor-curr_floor; curr_floor:=req_floor

S1 start

Curr_floor=req_floor/output:=0

• <S, I ∪ STAT, O ∪ A, f, h> • A set of storage variables : VAR • A set of expressions : EXP={ f(x, y, z, …) | x, y, z, … ∈ VAR } • A set of storage assignments : A={ X ⇐ e | X ∈ VAR, e ∈ EXP } • A set of status expressions : STAT={ Rel(a, b) | a, b ∈ EXP} • f : S× (I ∪ STAT) → S • h : S× (I ∪ STAT) → (O ∪ A)

Page 33: System Level Design For Low Powerorssi/dersler/SLD/slides.pdf · Hardware-software co-design of embedded systems : the POLIS approach / by Felice Balarin ... [et al.], Boston : Kluwer

Architecture

  After appropriate model ⇒ transform the model into an architecture

Com

binational logic

req_floor curr_floor

direction

State register

direction

processor memory

In/out ports req_floor curr_floor

Bus

Page 34: System Level Design For Low Powerorssi/dersler/SLD/slides.pdf · Hardware-software co-design of embedded systems : the POLIS approach / by Felice Balarin ... [et al.], Boston : Kluwer

Activity Oriented Models Dataflow Graph   For transformational systems : outputs are determined by a

set of computations on the system’s inputs   No states   Activities and dataflow between them

Page 35: System Level Design For Low Powerorssi/dersler/SLD/slides.pdf · Hardware-software co-design of embedded systems : the POLIS approach / by Felice Balarin ... [et al.], Boston : Kluwer

DFG : A set of nodes and edges

• Supports hierarchy, since each activity node can be represented by another DFG

• Does not contain any information about implementation

A1 A2 Y

Input

X

File

V V’

Output

Output

Z

W

Activity : a program, a procedure, a function, one intruction, one arithmetic operation

Data store : records in a database, a file, a variable in a memory, a register

Data being transmitted

Page 36: System Level Design For Low Powerorssi/dersler/SLD/slides.pdf · Hardware-software co-design of embedded systems : the POLIS approach / by Felice Balarin ... [et al.], Boston : Kluwer

Heterogeneous Models Control / data flow graph (CDFG)   DFG : represent data flow among activities   CFG : represent the squencing of the DFGs

S0

S1

S2

Start/enable A1, enable A2

W=10 / disable A1, enable A3

Sto

p/di

sabl

e A

2, di

sabl

e A

3

control

A1

A2

A3

W

Z

Y

X W = 10 disable

enable

disable

disable enable

enable

start stop

Page 37: System Level Design For Low Powerorssi/dersler/SLD/slides.pdf · Hardware-software co-design of embedded systems : the POLIS approach / by Felice Balarin ... [et al.], Boston : Kluwer

Control-Data Flow Graph (CDFG)   Programming languages consist of

if statements, loops, and expressions.

  In each of the then or else parts, the if statement computes a set of expressions called a Basic Block (BB).

  The if statement can also be used in the loop construct to represent loop iterations.

  Any programming-language code can be represented by a CDFG consisting of if diamonds, which represent if conditions, and BB blocks, which represent computation.

Page 38: System Level Design For Low Powerorssi/dersler/SLD/slides.pdf · Hardware-software co-design of embedded systems : the POLIS approach / by Felice Balarin ... [et al.], Boston : Kluwer

Flowcharts : A set of nodes and arcs

• Arcs for control flow

start

J=1 Max=0

J>N MEM(J)>MAX No MAX=MEM(J) Yes

J=J+1

No

end

Yes

Computation : a sequence of assignment statements

Decision : control branching

Page 39: System Level Design For Low Powerorssi/dersler/SLD/slides.pdf · Hardware-software co-design of embedded systems : the POLIS approach / by Felice Balarin ... [et al.], Boston : Kluwer

Instruction Set (IS) flow chart   describes the fetch, decode, and execute

stages of each instruction.   The fetch stage consists of fetching the

new instruction into the Instruction Register (IR) and incrementing the Program Counter .

  In the decode stage, we decode the type and mode of the fetched instruction. Four types of instructions: register, memory, branch, and miscellaneous instructions.

  In the case of memory instructions, there are four modes: immediate, direct, relative, and indirect.

  Each mode contains load and store instructions.

  Each instruction execution is in turn described by a BB, which may take several clock cycles to execute, depending on the processor implementation structure.

Page 40: System Level Design For Low Powerorssi/dersler/SLD/slides.pdf · Hardware-software co-design of embedded systems : the POLIS approach / by Felice Balarin ... [et al.], Boston : Kluwer
Page 41: System Level Design For Low Powerorssi/dersler/SLD/slides.pdf · Hardware-software co-design of embedded systems : the POLIS approach / by Felice Balarin ... [et al.], Boston : Kluwer

Processor Structural Model   Consists of a Datapath and a Controller.   Datapath executes the DFG attached to each state in the FSMD model.   The Datapath has storage units such as

  Registers,   register files,   caches and memories,   function units such as ALUs,   multipliers,   shifters,   connection units such as buses.

  Each unit   may take one or several clock cycles to produce output.   can be pipelined through several stages.   may have input and output latches or registers..   can be connected to any of the buses.

  The above flexibility can be used to pipeline the entire Datapath which comes useful when processing instruction streams in RISC/CISC processors or control streams in NISC/RTL processors.

  The Controller   keeps track of the presents state,   defines the next state and controls the execution of the Datapath in each state.   Its implementation defines the type of the processor.

Page 42: System Level Design For Low Powerorssi/dersler/SLD/slides.pdf · Hardware-software co-design of embedded systems : the POLIS approach / by Felice Balarin ... [et al.], Boston : Kluwer
Page 43: System Level Design For Low Powerorssi/dersler/SLD/slides.pdf · Hardware-software co-design of embedded systems : the POLIS approach / by Felice Balarin ... [et al.], Boston : Kluwer

Processor /RTL Synthesis   consists in converting a FSMD model into a RTL/NISC/RISC/CISC processor that generates the same result

as the model.   consists of several tasks; a)  Allocation of components from the RT library and definition of the Datapath, b)   Rescheduling of computation in each state since some components may need more than one clock cycle, c)   Binding of variables, operations and register transfers to storage elements, functional units and busses in

the Datapath, d)   Synthesis of hardwired or programmable controller for RTL/ NISC/RISC/CISC.   Generation of refined model representing the Processor structure. For example, the statement a = b + c

executing in state (n) can be written: 1)  without any binding: a = b + c; 2)  with storage binding of a to RF(1), b to RF(3), and c to RF(4): RF(1) = RF(3) + RF(4); 3)  with storage and functional unit binding with + bound to ALU1: RF(1) = ALU1(+,RF(3),RF(4)); 4)  with storage, functional unit, and connectivity binding: Bus1 = RF(3); Bus2 = RF(4); Bus3 = ALU1

(+,Bus1,Bus2); RF(1) = Bus3;   Any of the tasks (a)-(d) can be done in parallel or in any order.   If the structure of Controller and Datapath are fixed as in case of RISC/CISC processors then the compiler

converts a FSMD model into an instruction stream. Those instructions are loaded into the Programmable memory.

  If the above tasks are performed automatically, we call the above process RTL synthesis or Behavioral synthesis. In this case many register transfers can be performed in each state of the FSMD model. In this case the RTL/NISC synthesizer generates the control words that can be loaded into programmable memory or implemented with logic gates.

Page 44: System Level Design For Low Powerorssi/dersler/SLD/slides.pdf · Hardware-software co-design of embedded systems : the POLIS approach / by Felice Balarin ... [et al.], Boston : Kluwer

System Level Methodology (1/2)   Specifying the system’s functionality in the earliest stage of

the process   Advantages to work with an executable specification :

 Capture the product’s functionality  Used by marketing departments to study the competitiveness  Documentation during all steps of the design process  Automatic verification of different design properties  Automation of design exploration and synthesis   Starting point for all the product upgrades

Page 45: System Level Design For Low Powerorssi/dersler/SLD/slides.pdf · Hardware-software co-design of embedded systems : the POLIS approach / by Felice Balarin ... [et al.], Boston : Kluwer

System Level Methodology (2/2)   Select a language for writing these specification   Must allow an easy exploration of design alternatives   Specification must then be partitioned into software and

hardware parts   Estimate the quality metrics and compare with the requirements

Page 46: System Level Design For Low Powerorssi/dersler/SLD/slides.pdf · Hardware-software co-design of embedded systems : the POLIS approach / by Felice Balarin ... [et al.], Boston : Kluwer

Models and Architectures   The system = collection of simpler subsystems or pieces   There are different methods of decomposing functionality   A particular method = a model

Page 47: System Level Design For Low Powerorssi/dersler/SLD/slides.pdf · Hardware-software co-design of embedded systems : the POLIS approach / by Felice Balarin ... [et al.], Boston : Kluwer
Page 48: System Level Design For Low Powerorssi/dersler/SLD/slides.pdf · Hardware-software co-design of embedded systems : the POLIS approach / by Felice Balarin ... [et al.], Boston : Kluwer

System Behavioral (Functional) Model   Since systems consists of many communicating components (processors,

IPs) the FSMD model will not be able to model a system since it uses a single thread of execution.

  The easiest way is to retain the concept of states and transitions as in a FSMD model but to extend the computation in each state to include one or more processes described in a programming language such as C/C++.

  In order to represent an architecture with several processes running in parallel or in pipelined mode the system model should support concurrency (several components running in parallel) and pipelining (several components running in parallel with data passed between them sequentially).

  Since components are running concurrently we need   a synchronization mechanism for data exchange.   a concept of channel to encapsulate data communication.   to support hierarchy to allow humans to write easily complex systems

specifications.   Such a model is called Program State Machine (PSM).

Page 49: System Level Design For Low Powerorssi/dersler/SLD/slides.pdf · Hardware-software co-design of embedded systems : the POLIS approach / by Felice Balarin ... [et al.], Boston : Kluwer

Hierarchical Concurrent Finite State Machine (HCFSM)

 Each set can be decomposed into a set of substates : hierarchy

 Each set can be decomposed into a set of concurrent substates : execute in parallel

 Language for HCFSM : Statecharts  Ref: David Harel, Statecharts: A visual formalism

for complex systems, Science of Computer Programming, Volume 8 ,  Issue 3  (June 1987), Pages: 231 – 274 

Page 50: System Level Design For Low Powerorssi/dersler/SLD/slides.pdf · Hardware-software co-design of embedded systems : the POLIS approach / by Felice Balarin ... [et al.], Boston : Kluwer
Page 51: System Level Design For Low Powerorssi/dersler/SLD/slides.pdf · Hardware-software co-design of embedded systems : the POLIS approach / by Felice Balarin ... [et al.], Boston : Kluwer

System-level structural model

• Arbitrary components (Proc., IP, Memory) • Arbitrary connectivity (buses, protocols)

Page 52: System Level Design For Low Powerorssi/dersler/SLD/slides.pdf · Hardware-software co-design of embedded systems : the POLIS approach / by Felice Balarin ... [et al.], Boston : Kluwer

Structure oriented models : Component-connectivity diagram

  Models systems structural view   Often used in the later phases of the design process

Processor

Program memory

Data memory

I/O coprocessor

Application specific hardware

System bus

components

Connections : buses, wires

System block diagram

Page 53: System Level Design For Low Powerorssi/dersler/SLD/slides.pdf · Hardware-software co-design of embedded systems : the POLIS approach / by Felice Balarin ... [et al.], Boston : Kluwer

System Structural Model   consists of variety of system components such as processors,

IPs, memories, arbiters and special application-specific custom hardware components (RTL processors).

  They can be connected through different connection components such as buses with specific bus protocols.

  In case that component and bus protocol do not match there must be specific Interface (IF) for connecting such components with incompatible protocols.

  System structural model a composition of system computation and connection components; any system can be modeled with such a model.

Page 54: System Level Design For Low Powerorssi/dersler/SLD/slides.pdf · Hardware-software co-design of embedded systems : the POLIS approach / by Felice Balarin ... [et al.], Boston : Kluwer

Systems   Base hardware platform

 Computational units  Communication channels  Memory units

  Peripheral devices  Displays  Wireless local area networks   camcorders

Page 55: System Level Design For Low Powerorssi/dersler/SLD/slides.pdf · Hardware-software co-design of embedded systems : the POLIS approach / by Felice Balarin ... [et al.], Boston : Kluwer

System synthesis

Page 56: System Level Design For Low Powerorssi/dersler/SLD/slides.pdf · Hardware-software co-design of embedded systems : the POLIS approach / by Felice Balarin ... [et al.], Boston : Kluwer

System Synthesis   PSM model can be synthesized into a arbitrary system structure by the following set of

tasks: a)   Profiling of code in each behavioral model and collecting statistics about

computation, communication, storage,traffic, power consumption, etc., b)   Allocating components from the library of processors , memories , IPs and custom

components/processors, c)   Binding PSM processes to processing elements, variables to storage elements (local

and global), and channels to busses, d)   Synthesizing interfaces (IFs) between components and busses with incompatible

protocols, and inserting arbiters, interrupt controllers, memory controllers, timers, and other special components.

e)   Refining the PSM model into a architecture model that reflect allocation and binding decisions.

  The above tasks can be performed automatically or manually. Tasks (b)-(d) are usually performed by designers while tasks (a) and (e) are better done automatically since they require lots of mundane effort.

  Once the refinement is performed the structural model can be validated by simulation quite efficiently since all the component behaviors are described by high level functions.

  In order to accomplish all the above tasks, we may use several intermediate models on the way to reach the system structural model from behavioral model.

Page 57: System Level Design For Low Powerorssi/dersler/SLD/slides.pdf · Hardware-software co-design of embedded systems : the POLIS approach / by Felice Balarin ... [et al.], Boston : Kluwer
Page 58: System Level Design For Low Powerorssi/dersler/SLD/slides.pdf · Hardware-software co-design of embedded systems : the POLIS approach / by Felice Balarin ... [et al.], Boston : Kluwer

System-level Models   can be distinguished by the accuracy of timing for their

communication and computation.   In the graph, the two axes represent the granularity of

communication and computation.   The functional specification at the origin is untimed, with only a

causal ordering between tasks.   The spectrum is the cycle accurate model represented by the

FSMD model.   A system level methodology takes the untimed specification to its

cycle accurate implementation.   The path through the intermediate models determines different

types of refinements that must be performed.

Page 59: System Level Design For Low Powerorssi/dersler/SLD/slides.pdf · Hardware-software co-design of embedded systems : the POLIS approach / by Felice Balarin ... [et al.], Boston : Kluwer

System-level Models a)   Specication Model (SM) is used by application designers to prove that

their algorithms work on a given system platform. They also modify it for more efficient task and channel partitioning, mapping, and scheduling once a possible platform is defined. This model is also used for adding new features, functions, and upgrades after the initial deployment of the product into the market.

b)   Transaction-Level Model (TLM) is used by system designers to estimate design metrics (such as performance, cost, traffic, communication, power consumption, reliability, among others) and to explore different implementations (component selection, connectivity, system firmware, operating system selection, and different types of interfaces).

c)   Cycle-Accurate Model (CAM) is used by HW designers to verify the correctness of the generated system HW components (such as custom processors, interfaces, memory controllers, interrupt controllers, bridges, arbiters, and similar components) and by SW designers to verify the system firmware (such as task scheduling, data transfer, synchronization, interrupt procedures, and routing).

Page 60: System Level Design For Low Powerorssi/dersler/SLD/slides.pdf · Hardware-software co-design of embedded systems : the POLIS approach / by Felice Balarin ... [et al.], Boston : Kluwer
Page 61: System Level Design For Low Powerorssi/dersler/SLD/slides.pdf · Hardware-software co-design of embedded systems : the POLIS approach / by Felice Balarin ... [et al.], Boston : Kluwer

Specification Model   is an untimed model consisting of objects and composition rules

for building larger objects.   The objects can be used for computation and communication.   Computation objects are behaviors or processes in the PSM model

while variables are used for communication of data between behaviors.

  Composition rules allow construction of larger objects by using hierarchical encapsulation, and ordering of objects in sequential, parallel , pipelined or state fashion.

  Transitions are used to specify the condition for execution of different behaviors, while synchronizations are used to insure that data are available at proper times.

Page 62: System Level Design For Low Powerorssi/dersler/SLD/slides.pdf · Hardware-software co-design of embedded systems : the POLIS approach / by Felice Balarin ... [et al.], Boston : Kluwer
Page 63: System Level Design For Low Powerorssi/dersler/SLD/slides.pdf · Hardware-software co-design of embedded systems : the POLIS approach / by Felice Balarin ... [et al.], Boston : Kluwer

Component-Architecture Model   has same composition rules but several new objects representing

different components.   Additional computation objects are Processing Elements (PEs)

that include processors, IPs and memories while new communication objects are variable channels used for communication between PEs.

  Inside the PEs we can still use behaviors and variables since execution is sequential and running on one processor.

  Since each behavior has been assigned to a PE, we can easily estimate the time for execution of each behavior.

  On the other hand, channels have not been assigned to busses and therefore we can not estimate the communication time.

Page 64: System Level Design For Low Powerorssi/dersler/SLD/slides.pdf · Hardware-software co-design of embedded systems : the POLIS approach / by Felice Balarin ... [et al.], Boston : Kluwer
Page 65: System Level Design For Low Powerorssi/dersler/SLD/slides.pdf · Hardware-software co-design of embedded systems : the POLIS approach / by Felice Balarin ... [et al.], Boston : Kluwer

Bus-Arbitration Model   a new component for communication is added: bus channel.   Several variable channels are assigned to the bus channel.   Since bus channel transfers data from a set of PEs to another

set of PEs , we must insert a new arbiter PE to determine bus priority between several competing channels.

  Since bus has been selected we can also estimate the communication time for each channel.

Page 66: System Level Design For Low Powerorssi/dersler/SLD/slides.pdf · Hardware-software co-design of embedded systems : the POLIS approach / by Felice Balarin ... [et al.], Boston : Kluwer
Page 67: System Level Design For Low Powerorssi/dersler/SLD/slides.pdf · Hardware-software co-design of embedded systems : the POLIS approach / by Felice Balarin ... [et al.], Boston : Kluwer

Bus-Functional Model   a real protocol is inserted into bus channel.   Therefore, bus channel becomes cycle-accurate.   The rest of the model stays the same.   The communication traffic can be now accurately estimated.

Page 68: System Level Design For Low Powerorssi/dersler/SLD/slides.pdf · Hardware-software co-design of embedded systems : the POLIS approach / by Felice Balarin ... [et al.], Boston : Kluwer
Page 69: System Level Design For Low Powerorssi/dersler/SLD/slides.pdf · Hardware-software co-design of embedded systems : the POLIS approach / by Felice Balarin ... [et al.], Boston : Kluwer

Cycle-Accurate Computation Model   computation behaviors or processes are refined into SFSMD

or FSMD models.   Computation in each is therefore cycle-accurate while

communication is still abstract with approximate timing.   Since communication and computation do not have the same

time granularity, each PE is encapsulated into a wrapper that abstracts its cycle-accurate time to approximate time of the communication model.

Page 70: System Level Design For Low Powerorssi/dersler/SLD/slides.pdf · Hardware-software co-design of embedded systems : the POLIS approach / by Felice Balarin ... [et al.], Boston : Kluwer
Page 71: System Level Design For Low Powerorssi/dersler/SLD/slides.pdf · Hardware-software co-design of embedded systems : the POLIS approach / by Felice Balarin ... [et al.], Boston : Kluwer

Cycle-Accurate Implementation Model

  This model has cycle-accurate time in both computation and communication.

  Furthermore, the abstract bus channel is replaced with bus wires, while its functionality is unlined into PEs.

  In addition channel functionality is converted into FSMD model and combined with computational FSMD model.

Page 72: System Level Design For Low Powerorssi/dersler/SLD/slides.pdf · Hardware-software co-design of embedded systems : the POLIS approach / by Felice Balarin ... [et al.], Boston : Kluwer

Model Taxonomy 1.  State Oriented (state diagram)

for control systems ⇒ temporal behavior 2.  Activity Oriented (dataflow graph)

for transformational systems like digital signal processing

3.  Structure Oriented (block diagram) 4.  Data Oriented (entity relationship diagram)

for information systems lik databases 3.  Heterogeneous

Page 73: System Level Design For Low Powerorssi/dersler/SLD/slides.pdf · Hardware-software co-design of embedded systems : the POLIS approach / by Felice Balarin ... [et al.], Boston : Kluwer