Sei sulla pagina 1di 28

UNIT III

EMBEDDED FIRMWARE DEVELOPMENT


ENVIRONMENT
Computation models

Data Flow graph (DFG)

Control Data Flow Graph (CDFG)Modelling

Sequential Program Model

Finite States Machine(FSM) Model

Concurrent Processes and Inter- Process


Communication Model

Object Oriented Programming Model

2
Data Flow graph (DFG)

A program is modelled as handling the input


data streams and creating output data
streams.

A data-flow means that a program flow such that


specifically the data only determines all the
program execution steps and program flows
are determined specifically only by the data.

3
4
Example of Data Flow graph (DFG)

Aprogram for finding an average of grades in various


subjects will have the data inputs of grades and data output
of the average.

Program executes a function to generate the appropriate


output.

The data flow graph model is appropriate to model the program


for the average.

A circle represents each process (set of program steps) in DFG.

5
● An arrow directed towards the circle represents the data
input (or set of inputs) and an arrow originating from the
circle represents a data output (or a set of outputs)
● A DFG does not have any conditions within it so that the
program has one data entry point and one data output point.
● There is only one independent path for program flow when
program is executed
● Data flow graph models help in a simple code design.

6
7
Sequential Program Model

In these model Program are executed in sequence

It is same as the conventional procedural programming here program instructions are iterated and executed
conditionally and the data gets transformed through a series operations. FSM are the good choice for
sequential program modelling another important tool used is flowchart the FSM approach represents the
states, events, transitions and actions.

8
ACVM Example Sequential Program Model

• Run function get_user_input ( ) for obtaining input for choice of chocolate from child.

• Run function read_coins ( ) for reading the coins inserted into ACVM for cost of chocolate.

• Run function deliver_chocolate() for delivering the chocolate.

• Run function display_thanks() for displaying‘Collect the nice chocolate. Visit again!’

9
10
11
12
Finite States Machine(FSM) Model

The state machine models describe the system behaviour with states, events, action ,transition

State is a representation of current situation .

Events is an input to the state .

Transition is the movement from one state to another

Action is an activity to be performed by the state machine

13
14
Concurrent Processes and Inter- Process Communication Model

There are several concurrent tasks (or processes or threads)

• Each task has the sequential codes in infinite loop.

• A task sends a message or signal (to Operating System) for another task.

• A task, which gets a message or signal (using aone-bit bit) from the Operating System , runs and remaining
tasks remain in blocked state

15
16
17
Concurrent running of the processes in an ACVM

Process get_user_input ( )─ waits for obtaining input for choice of chocolate from the child
and signaling to process read_coins start.

Process read_coins ( ) ─ waits for signal get_user_input ( ) and start reading on signal from
for reading the coins inserted in the ACVM for the cost of chocolate. Post a signal to
process deliver chocolate to start and also post a signal to process display_wait ( ) to start

Process deliver_chocolate ( ) ─ waits for signal from read_coins ( ) and start delivering the
chocolate and post a signal to display_thanks ( ) to start.

Process display_wait ( ) ─ waits for signal from read_coins ( ) and start displaying‘Wait few
moments!’ and signal display_thanks.

Process display_thanks ( ) ─ waits for signal from deliver_chocolate ( ) and for

signal from display_wait ( ) and then start displaying ‘Collect the nice chocolate.Visit again!’

18
Object Oriented Programming Model

The Object – oriented based model for modelling system requirements.

It Disseminates a complex software requirement into simple well defined pieces called objects.

Object -oriented Model brings re-usuability, Maintainability and productivity in systen design

In these Modelling object is an entity used for representing or modelling a particular piece of the system

Each object is characterized by a set of unique behaviour and state

A Class is an abstract description of a set of object and it can be considered as a blue print of an object

19
A Class represent the state of an object through member variables and object behaviour through member
function

The Member variable and member Function can be private,public and protected.

Private Member variable and functions are accessable only within the class

Public variable and functions are accessible within the class as well as outside the class.

The protected variable and functions are protected from the external access.

Classes are derived from the parent class can also access the protected member funtion and variables

20
Hardware-software Co-design

(A) Selecting the model :

A model is a formal system consisting of objects & composition rules. It is hard to make a decision on which
model should be followed in a particular system design.

Models are used for capturing & describing the system charactersictics.

Designers switch between a variety of models, because the objective varies with each phase.

21
Selecting the architecture:

The architecture specifies how a system is going to implement in terms of the number and types of different
components and the interconnection among them. Some type of architecture fall into appplication specific
architecture class, while others fall into either general purpose architecture class or parallel processing class. The
commonly used architectures in system design are:

22
The controller architecture - Implemnts the finite state machine model using a state register holds the present
state and the combninational circuits holds the next state & output.

The datapath architecture – Suitable for implementing the data flow graph model.A datapath represents a
channel between the input and output. The datapath contains registers, counters, memories & ports. Ports
connect the datapath to multiple buses.

The finite state machine datapath- This architecture combines the controller architecture with datapath
architecture. The controller generates the control input, whereas the datapath proecesses the data.

23
24
The Complex Instruction Set Computing (CISC) - This architecture uses an instruction set for solving
complex operations.The use of a single complex instruction in place of multiple simple instructions greatly
reduces the program memory access & program memory size requirement.On the other hand reduced
instruction set computing (RISC) architecture uses the multiple RISC instruction to perform a complex
operation. RISC architecture supports extensive pipeling.

The Very Long Instruction Word(VLIW) – This architecture implements multiple functional units in the
datapath.

Parallel Processing Architecture – Implements Multiple Concurrent processing Elements and each
processing element may associate a datapath containing register & local memory.Single Instruction Multiple
Data (SIMD) & Multiple Instruction Multiple Data (MIMD) architectures are examples for parallel processing
architecture. SIMD-eg: Reconfigurable process & MIMD -eg: Multiprocessor Systems.

25
26
Selecting the language:

A programming language captures a Computational Model


and maps it into architecture. A model can be captured using
multi programming languages like C, C++, C#, Java etc. for
software implementations and languages like VHDL, system
C, Verilog etc. for hardware implementations. C++ is a
good language for capturing object oriented model.

27
Partitioning System Requirements into Hardware &
Software:

Various hardware software trade-offs are used for making


a decision on the hardware – software portioning. It is the
tough decision making task to figure out which one to opt.

28

Potrebbero piacerti anche