1. Wayne Wolf, “Computers as Components – Principles of
Embedded Computing System Design”, Third Edition “Morgan
Kaufmann Publisher (An imprint from Elsevier), 2012.
Prepared by
Mrs.R.Kiruthikaa,AP/ECE
Department of Electronics and Communication Egineering
Karpagam Institute of Technology
Coimbatore
UNIT I
INTRODUCTION TO EMBEDDED SYSTEM DESIGN
Complex systems and microprocessors– Embedded system design process
–Design example: Model train controller- Design methodologies- Design
flows - Requirement Analysis – Specifications-System analysis and
architecture design – Quality Assurance techniques - Designing with
computing platforms – consumer electronics architecture – platform- level
performance analysis.
Introduction-Embedded Systems
⚫ An Embedded system is an electronicsystem that has a softwareand is
embedded in computer hardware.
⚫ It is a system which has collection of components used toexecutea task
according toa programorcommandsgiven to it.
⚫ Examples Microwaveovens, Washing machine, Telephone answering
machine system, Elevator controller system, Printers, Automobiles,
Cameras, etc.
Components of Embedded system
⚫Microprocessor
⚫Memory Unit(RAM,ROM)
⚫Inputunit(Keyboard,mouse,scanner)
⚫Outputunit(pinters,video monitor)
⚫Networking unit(Ethernetcard)
⚫I/O units(modem)
Real Time Operating System-RTOS
⚫ Real-Time Operating System (RTOS) is an operating system (OS)
intended toserve real-timeapplications thatprocess dataas itcomes
in, typically without bufferdelays.
⚫ Itschedules theirworking and execution by following a plan tocontrol
the latenciesand to meet thedead lines.
⚫ Modeling and evaluation of a real-time scheduling system concern is
on theanalysis of thealgorithm capability to meeta process deadline.
⚫ A deadline is defined as the time required fora task to be processed.
Classification of Embedded system
1. Small scale Embedded system(8/16bit microcontroller)
2. Medium Scale Embedded system (16/32bit microcontroller,
more tools like simulator, debugger)
3. Sophisticated Embedded system (configurableprocessorand PAL)
Embedded designer-skills
⚫ Designerhas a knowledge in the followings field,
⚫ Microcontrollers, Datacomm., motors, sensors, measurements ,C
programming, RTOS programming.
1) COMPLEX SYSTEMS AND MICROPROCESSORS
Embedded(+)computersystem
⚫ Embedded system isacomplex system
⚫ It is anydevice that includesa programmablecomputer but is not
itself intended to beageneral-purpose computer.
History of Embedded computer system
⚫ Computers have been embedded into applications since theearliestdaysof
computing.
⚫ In 1940s and 1950sWhirlwind, designed a first computer to support real-time
operation forcontrolling an aircraftsimulator.
⚫ In 1970s The first microprocessor( Intel 4004) wasdesigned foran embedded
application (Calculator), provided basicarithmetic functions.
⚫ In 1972s The first handheld calculator (HP-35 ) was to perform
transcendental functions , so it used several chips to implement the CPU,
ratherthan a single-chip microprocessor.
⚫ Designer faced critical problems to design adigital circuits to perform
operations like trigonometric functions using calculator.
⚫ But ,Automobile designersstarted making useof the microprocessor for to
control the engine by determining when spark plugs fire, controlling the
fuel/air mixture
Levels of Microprocessor
1. 8-bit microcontroller for low-costapplications and includeson-board
memoryand I/O devices.
2. 16-bit microcontroller used for more sophisticated applications that may
requireeither longerword lengthsoroff-chip I/O and memory.
3. 32-bit RISC microprocessoroffersvery high performance for
computation-intensive applications.
Microprocessor Uses/Applications
⚫ Microwaveoven hasat leastone microprocessortocontrol oven operation
⚫ Thermostatsystems, whichchange the temperature level atvarious times during
theday
⚫ The modern camera is a primeexampleof the powerful features thatcan be
added under microprocessorcontrol.
⚫ Digital television makes extensive useof embedded processors.
Embedded Computing Applications
⚫ ExBMW 850i Brakeand Stability Control System
⚫ The BMW 850i was introduced with a sophisticated system forcontrolling the
wheelsof thecar.
⚫ Which uses An antilock brake system (ABS) and An automatic stability
control (ASC +T) system.
1. Anantilock brake system (ABS)
⚫ Reduces skidding by pumping the brakes.
⚫ It is used to temporarily release the brake on a wheel when it rotates
too slowly—when a wheel stops turning, the car starts skidding and
becomes hard tocontrol.
⚫ It sits between the hydraulic pump, which provides power to the
brakes.
⚫ Ituses sensorsoneach wheel to measure the speed of thewheel.
⚫ The wheel speeds are used by the ABS system to determine how to vary
the hydraulic fluid pressure toprevent thewheels from skidding.
2. An automaticstabilitycontrol (ASC +T) system
⚫ It is used tocontrol theenginepowerand the brake to improvethe car’s
stabilityduring maneuvers.
⚫ Itcontrols fourdifferentsystems: throttle, ignition timing, differential
brake, and (on automatictransmissioncars) gearshifting.
⚫ Itcan be turned off by thedriver, which can be importantwhen
operating with tiresnowchains.
⚫ It has control unit has two microprocessors , oneof which concentrates
on logic-relevant components and the other on performance-specific
components.
⚫ The ABS and ASC+ T mustclearly communicate because the ASC+ T
interactswith the brake system.
1. Complex algorithms-The microprocessor that controls an automobile engine
must perform complicated filtering functions to optimize the performance of
thecarwhile minimizing pollution and fuel utilization.
2. Userinterface-The moving maps in Global Positioning System (GPS)
navigation aregood examplesof user interfaces.
3. Real time-Embedded computing systems have to perform in real time—if the
data is not ready byacertain deadline,thesystem breaks. In somecases, failure
to meetadeadline or missing adeadline does not createsafety problems but
doescreate unhappy customers
4. Multirate-Multimediaapplications areexamplesof multirate behavior.
The audio and video portions of a multimedia stream run at very different
rates, but they must remain closelysynchronized. Failure to meetadeadline
on either the audio or video portions spoils the perception of the entire
presentation.
Characteristics of Embedded Computing
Applications
5. Manufacturing cost- It is depends on the type of microprocessorused, the
amountof memory required, and the typesof I/O devices.
6. Powerand energy-Powerconsumption directlyaffects the costof the
hardware, sincea largerpower supply may be necessary.
7. Energy consumption affects battery life, which is important in many
applications, aswell as heatconsumption, whichcan be important even in
desktopapplications.
Why Use Microprocessors?
⚫ Microprocessorsareaveryefficientway to implementdigital systems.
⚫ It make iteasier todesign familiesof productswithvarious featureat
differentprice points
⚫ Itcan beextended toprovide new features to keep up with rapidly
changing markets.
⚫ Itexecutes programveryefficiently
⚫ It make theirCPU runvery fast
⚫ Implementing several functionon a single processor
Why not use PCs for all embedded
computing?
⚫Real time performance isvery less in PC becauseof
differentarchitecture.
⚫It increases thecomplexityand priceof components due to
broad mixof computing requirements.
Challenges in Embedded Computing System Design
1. How much hardwaredowe need?
⚫ To meet performancedeadlines and manufacturing costconstraints, thechoiceof
Hardwareis important.
⚫ Too much hardwareand it becomes too expensive.
2. Howdowe meetdeadlines?
⚫ Tospeed up the hardwareso that the program runs faster. But the system more
expensive.
⚫ It is also entirely possible that increasing the CPU clock rate may not make
enough difference toexecution time, since the program’sspeed may be limited by
the memory system.
3. Howdowe minimizepowerconsumption?
⚫ In battery-powered applications, powerconsumption is extremely important.
⚫ In non-batteryapplications, excessive powerconsumption can increase heat
dissipation.
⚫ Careful design is required toslowdown the noncritical partsof the machine for
powerconsumption whilestill meeting necessaryperformance goals.
4) Howdowedesign forupgradability?
⚫ The hardwareplatform may be used over several product generations,orfor
several different versions ,able to add features bychanging software.
4.1) Complex testing: Run a real machine in ordertogenerate the properdata.
⚫ Testing of an embedded computer from the machine in which it is embedded.
2) Limited observability and controllabilityNo keyboard and screens, in real-
time applications we may not be able to easily stop the system to see what is
going on inside and to affect the system’soperation.
3) Restricted development environments:
⚫ We generallycompile codeon one typeof machine, such asa PC, and
download it onto theembedded system.
⚫ Todebug thecode, we must usuallyrelyon programs that run on the PC or
workstation and then look inside theembedded system.
Performance in Embedded Computing
⚫ Embedded system designers have to set theirgoal —theirprogram must meet its
deadline.
PerformanceAnalysis
1. CPU: The CPU clearly influences the behaviorof the program, particularlywhen
the CPU is a pipelined processorwith acache.
2. Platform: The platform includes the bus and I/O devices. The platform
components that surround the CPU areresponsible for feeding the CPU and can
dramaticallyaffect its performance.
3. Program: Programsarevery largeand the CPU seesonlya small window of the
program at a time. We must consider the structure of the entire program to
determine its overall behavior.
4. Task: Wegenerally run several programs simultaneously on a CPU, creating a
multitasking system. The tasks interact with eachother in ways that have profound
implications for performance.
5. Multiprocessor: Manyembedded systems have more than one processor—they
may include multiple programmable CPUsaswell asaccelerators. Onceagain, the
interaction between these processors adds yet more complexity to the analysis of
overall system performance.
2)EMBEDDED SYSTEM DESIGN PROCESS
Design process has twoobjectivesas follows.
1. Itwill give us an introductiontothevarioussteps in embedded system
design.
2. Design methodology
I. Design toensure thatwe havedoneeverything we need todo, such as
optimizing performanceorperforming functional tests.
II. Itallows us todevelop computer-aided design tools.
III. A design methodology makes it much easier for members of adesign
team tocommunicate.
Levels of abstraction in thedesign process.
1)Requirements
•It can beclassified in to functional or nonfunctional
1.1)Functional Requirements
•Gatheran informal description from thecustomers.
•Refine the requirements into a specification thatcontains
enough information todesign the systemarchitecture.
•Ex:Sample Requirements form
•NameGiving a name to the project
PurposeBrief one- or two-line description of what thesystem
is supposed todo.
•Inputs& Outputs Analog electronicsignals? Digital data?
Mechanical inputs?
•Functions detailed descriptionof what the systemdoes
Performance computations must be performed within a
certain time frame
•Manufacturing cost costof the hardwarecomponents.
Power how much powerthe systemcan consume
Physical sizeand weight indication of the physical size
of the system
⚫ 1.2) Non-Functional Requirements
⚫ Performance depends upon approximate time to perform a user-
level functionand also operation must becompleted withindeadline.
⚫ CostManufacturing cost includes thecostof components and
assembly.
• Nonrecurring engineering (NRE) costs include the personnel and other
costsof designing the
⚫ system
⚫ Physical Size and WeightThe final system can vary depending upon
theapplication.
⚫ Power ConsumptionPowercan be specified in the requirementsstage
in termsof battery life.
2)SPECIFICATION
⚫ Thespecification must becarefully written so that it accuratelyreflects the
customer’s requirements.
⚫ It can beclearly followed during design.
3) Architecture Design
⚫ Thearchitecture is a plan for theoverall structureof the system.
⚫ It is in the form block diagram thatshowsa majoroperation and data flow.
4) Designing Hardware and Software Components
⚫ Thearchitectural description tells us whatcomponents we need include both
hardware—FPGAs, boards & software modules
5)System Integration
⚫ Onlyafter thecomponents are built, putting them togetherand seeing a
working system.
⚫ Bugsare found during system integration, and good planning can helpus find
the bugsquickly.
Embedded system Design Example
⚫GPS moving map
Design Process Steps
1. Requirementsanalysis of a GPS moving map
⚫ The moving map is a handheld device thatdisplays for the usera map of the
terrain around the user’s currentposition.
⚫ The mapdisplay changesas the userand the mapdevice changeposition.
⚫ The moving mapobtains its position from the GPS, a satellite-based navigation
system.
Name GPS moving map
Purpose Consumer-grade moving map for driving use
Inputs Power button, two control buttons
Outputs Back-lit LCD display 400 600
Functions Uses 5-receiver GPS system; three user-selectable
resolutions;always displays current latitude and
longitude
Performance Updates screen within 0.25 seconds upon movement
Manufacturing cost $30
Power 100mW
Physical size and
weight
No more than 2”X 6, ” 12 ounces
Design Process Steps
2) FunctionalityThis system is designed for highwaydriving and similaruses.
Thesystem should show majorroads and other landmarksavailable in
standard topographic databases.
3) User interfaceThe screenshould have at least 400X600 pixel resolution. The
device should becontrolled by no more than 3 buttons.
A menu system should pop up on the screen when buttons are
pressed toallow the user to make selections tocontrol the system.
4)Performance The map should scroll smoothly.
Upon power-up, a display should take no more than 1sec toappear.
Thesystem should beableto verify its position and display the
current mapwithin 15 s.
5)Cost Theselling costof the unit should be no more than $100.
6) Physical sizeand weightThedevice should fit comfortably in the palm of the
hand.
7) Powerconsumption Thedevice run forat least 8 hrson 4 AA batteries.
8) specification
1. Data received from the GPS satelliteconstellation.
2. Mapdata.
3. User interface.
4. Operations that must be performed tosatisfy customerrequests.
5. Background actions required to keep the system running, such as
operating the GPS receiver.
Block Diagram
Hardware architecture
•onecentral CPU surrounded by
memoryand I/O devices.
•It used two memories: a frame buffer
for the pixels to be displayed and a
separate program/data memory for
general use by the CPU.
Software architecture
•Timer to control whenwe read the buttons
on the user interface and renderdataonto
thescreen.
•Units in the software block diagram will be
executed in the hardwareblockdiagram and
whenoperations will be performed in time.
3)FORMALISM FOR SYSTEM DESIGN
⚫ UML(Unified Modeling Language) is an object-oriented modeling language
used tocaptureall thesedesign tasks.
⚫ It encourages the design to bedescribed asa numberof interacting objects,
ratherthan blocksof code.
⚫ objectswill correspond to real pieces of softwareor hardware in the system.
⚫ It allowsa system to bedescribed in a way thatclosely models real-world
objectsand their interactions.
Classification of descriptor
3.1)Structural Description
3.2)Behavioral Description
1) Structural Description
⚫ Itgives basiccomponents of the system and designerscan learn how to
describethesecomponents in termsof object.
3.1.1) OBJECT in UML NOTATION
⚫ An object includesa setof attributes thatdefine its internal state.
⚫ An objectdescribing adisplay (CRTscreen) is shown in UML notation in
Figure.
⚫ Theobject hasa unique name, and a memberof a class.
⚫ The name is underlined to show that this is adescription of an objectand not
of aclass.
⚫ Thetext in the folded-corner page icon is a note.
An object in UML notation
3.1.2)CLASS IN UML NOTATION
⚫ All objectsderived from the same
class have thesamecharacteristics,
but attributes may have different
values.
⚫ It also defines the operations that
determine how the object interacts
with the restof the world.
⚫ It defines both the interface for a
particulartype of objectand that
object’simplementation.
Relationships between objects and classes
1. Association occurs between objects that communicate with eachother but
have no ownership relationship between them.
2. Aggregation describesa complex object madeof smallerobjects.
3. Composition It is a typeof aggregation in which the ownerdoes not allow
accessto thecomponent objects.
4. Generalization allows us todefine one class in termsof another.
Derived classes as a form of generalization in UML
•A derived class is defined to includeall the
attributesof its baseclass.
•Display is the baseclassand BW displayand
color mapdisplayare the twoderived classes.
•BW display represents black and whitedisplay
.
Multiple inheritance in UML
•UML allows to define multiple inheritance, in which a class is derived from more
than one baseclass.
•Multimediadisplay class bycombining the Displayclasswith a Speakerclass for
sound.
•Thederived class inheritsall theattributes and operations of both its baseclasses,
Displayand Speaker.
•
Links and Association
⚫ A link describesa relationship between objectsand association is to
link as class is toobject.
⚫ Links used to make to stand associations capture type information
aboutthese links.
⚫ Theassociation is drawnas a line between the two labeled with the
nameof theassociation, namely, contains.
⚫ Behaviorof an operation is specified bya state machine.
⚫ These state machineswill not relyon the operation of a clock.
⚫ Changes from onestate toanotherare triggered by the occurrenceof
events.
⚫ Theevent maygenerated from theoutsideor insideof the system.
3.2)Behavioral Description
Signal, call, and time-out events in UML.
⚫ Signal is an asynchronousoccurrence.
⚫ It is defined in UML byan object that is labeled as a <<signal>>.
⚫ Signal may haveparameters thatare passed tothe signal’s receiver.
⚫ Call event follows the model of a procedurecall in a programming
language.
⚫ Time-outevent causes the machine to leavea stateafteracertain
amountof time.
⚫ The label tm(time-value) on theedgegives theamountof timeafter
which the transitionoccurs.
⚫ It is implemented withan external timer.
State Machine specification in UML
⚫ Thestartand stop states arespecial stateswhichorganize the flow of the state
machine.
⚫ Thestates in the state machine representdifferent operations.
⚫ Conditional transitions out of states based on inputs orresultsof some
computation.
⚫ An unconditional transition to the next state.
Sequence diagram in UML
⚫ Sequence diagram is similartoa hardwaretiming diagram, although the time
flows vertically in a sequence diagram, whereas time typically flows horizontally
in a timing diagram.
⚫ It is designed to show particularchoiceof events—it is notconvenient for
showing a numberof mutuallyexclusive possibilities.
4) Design:Model Train Controller
⚫ In order to learn how to use UML to model systems specify a simplesystem
(Ex: model train controller)
⚫ Theusersends messages to the train with acontrol boxattached to the tracks.
⚫ Thecontrol box may have controls suchas a throttle, emergency stop button,
and soon.
⚫ Thetrain Rx its electrical power from the two rails of the track.
CONSOLE
⚫ Each packet includes an addressso that theconsolecan control several trains
on the same track.
⚫ Thepacket also includesan errorcorrection code (ECC) toguard against
transmission errors.
⚫ This is aone-waycommunication system—the model train cannot send
commands back to the user.
Model Train Control system
REQUIREMENTS
⚫ Theconsole shall beable tocontrol up toeight trainson a single track.
⚫ The speed of each train controllable bya throttletoat least 63 different
levels in each direction (forward and reverse).
⚫ Thereshall bean inertiacontrol toadjustthe speed of train.
⚫ Thereshall bean emergencystop button.
⚫ An errordetectionscheme will be used to transmit messages.
Requirements:Chart Format
⚫ Name
⚫ Purpose
⚫ Inputs
Model train controller
Control speed of up to eight model trains
Throttle, inertia setting, emergency stop, train
number
Train control signals
Setengine speed based upon inertiasettings;
⚫ Outputs
⚫ Functions
respond
⚫ Performance
⚫ Manufacturing cost
⚫ Power
⚫ Physical sizeand weight
weight
Can update train speed at least 10 times persecond
$50
10W
Console should becomfortable for two
hands,approximatesize of standard
keyboard;
2 pounds
Digital Command Control (DCC)
⚫ Standard S-9.1 how bitsareencoded on the rails for transmission.
⚫ Standard S-9.2 defines the packets thatcarry information.
⚫ Thesignal encoding system should not interfere with power transmission
⚫ Datasignal should not change the DC value of the rails.
⚫ Bits areencoded in the time between transitions.
⚫ Bit 0 is at least 100 s while bit 1 is nominally 58 s.
Packet Formation in DCC
⚫ The basicpacket format is given by
⚫ P  preamble, which is a sequence of at least 10 1 bits.
⚫ S  packet start bit. It is a 0 bit.
⚫ A address is 8 bits long. Theaddresses 00000000, 11111110, and 11111111 are
reserved.
⚫ s data bytestart bit, which, like the packet start bit, is a 0.
⚫ D data byte includes 8 bits. A data byte may contain an address, instruction,
data, orerrorcorrection information.
⚫ E packetend bit, which is a 1 bit.
Baselinepacket
⚫ The minimum packet that must beaccepted byall DCC implementations.
⚫ It has threedata bytes.
⚫ Addressdata byte gives the intended receiverof the packet
⚫ Instructiondata byte provides a basic instruction
⚫ Errorcorrection data byte is used todetect and correct transmission errors.
Date byte
⚫ Bits 0–3 providea 4-bitspeed value.
⚫ Bit 4 hasan additional speed bit.
⚫ Bit 5 gives direction, with 1 for forward and 0 for reverse.
⚫ Bits 6-7 aresetat 01  provides speed and direction.
Conceptual Specification
⚫ Conceptual specification allows us to understand the systema little better.
⚫ A train control system turnscommands into packets.
⚫ A command comes from thecommand unit whilea packet is transmitted over the
rails.
⚫ Commands and packets may not begenerated in a 1-to-1 ratio
UML collaboration diagram for train
controller system
⚫ Thecommand unit and receiverareeach represented byobjects.
⚫ Thecommand unit sendsa sequence of packets to the train’s receiver, as
illustrated by thearrow messagesas 1..n.
⚫ Those messagesareof coursecarried over the track.
UML class diagram for the train controller
Basic characteristics of UML classes
⚫ Console class describes the command unit’s front panel, which contains
theanalog knobs and hardware to interface to thedigital parts of the system.
⚫ Formatter class includes behaviors that know how to read the panel knobs and creates a
bitstream for the required message.
⚫ Transmitter class interfaces to analog electronics to send the message along the track
⚫ Knobs* describes the actual analog knobs, buttons, and levers on the control panel.
⚫ Sender* describes the analog electronics that send bits along the track.
⚫ Receiver class knows how to turn the analog signals on the track into digital form.
⚫ Controller class includes behaviors that interpret the commands and figuresout how to
control the motor.
⚫ Motor interface class defines how to generate the analog signals required tocontrol the
motor.
⚫ Detector* detects analog signals on the track and converts them into digital form.
⚫ Pulser* turns digital commands into the analog signals required to control the motor
speed.
Detailed Specification
•The Panel has three knobs
•train number (which train iscurrently
being controlled).
•speed (which can be positiveor negative),
and inertia.
•It also has one button for emergency-
stop.
•When we change the train number
setting, to reset theothercontrols to the
propervalues for that train.
•so that the previous train’s control
settings are not used tochange thecurrent
train’s settings.
Class diagram for panel
•The Panel class defines a behavior foreachof thecontrols on the panel.
• The new-settings behavior uses the set-knobs behavior of the Knobs*
•Change the knobs settings wheneverthe train numbersetting is changed.
•The Motor-interface defines an attribute for speed that can be set by other
classes.
.
Class diagram for the Transmitter and Receiver
•Theyprovide the software interface to the physical devices that send
and receive bitsalong the track.
•TheTransmitterprovides a behavior message thatcan besent
•The Receiverclassprovides a read-cmd behavior to read a messageoff
the tracks.
Class diagram for Formatter
⚫ The formatter holds the current control settings forall of the trains.
⚫ The send-command servesas the interface to the transmitter.
⚫ The operate function performs the basicactions for theobject.
⚫ The panel-active behavior returns true wheneverthe panel’svalues do not
correspond to thecurrentvalues
Class diagram for Controller
•The Controller’s operate behavior must execute several behaviors to
determine the nature of the message.
•Once the speed command has been parsed, it must send a sequence of
commands to the motor to smoothlychange the train’s speed.
Sequences diagram for transmitting a
control input
⚫ Sequence diagram
specify the interface
between more than one
classes.
⚫ Its detailed operations
and whatways its going
tooperate
1.4DESIGN METHODOLOGIES
⚫ Designof Embedded system is not an easy task.
⚫ The main goal of adesign process is tocreatea product thatdoes something useful.
⚫ Typical specifications fora product are functionality , manufacturing cost, performance and
powerconsumption.
Design process has several important goalsas follows
Time-to-market
⚫ Customersalways want new features.
⚫ The product thatcomes out first can win the market, even setting customer preferences for
futuregenerations of the product.
Designcost
⚫ Consumer products arevery cost sensitive, and it is distinct from manufacturing cost.
⚫ Designcosts can dominate manufacturing costs.
⚫ Designcosts can also be important for high-volume consumerdevices when time-to-market
pressures cause teams toswell in size.
Quality
⚫ Customerswant theirproducts fast and cheap.
⚫ Correctness, reliability, and usability must beexplicitly addressed from the beginning of the
design job toobtaina high-qualityproduct at theend
1.5Design flows
⚫ A design flow isa sequence of steps to be followed during adesign.
⚫Someof thesteps can be performed by tools and othersteps can be performed by hand.
Typesof Software development models
1. Waterfall model
2. Spiral model
3. Successive refinement development model
4. Hierarchical design model
⚫ Thewaterfall development model consists of five majorphases.
⚫ Requirements analysis determines the basiccharacteristics of thesystem.
⚫ ArchitecturedesignIt decomposes the functionality into majorcomponents
⚫ CodingIt implements the pieces and integrates them.
⚫ TestingIt detemines bugs.
⚫ Maintenance It entailsdeployment in the field, bug fixes,and upgrades.
⚫ Thewaterfall model makeswork flow information from higher levels of abstraction to
moredetailed design steps.
1.5.1)Waterfall model
1.5.2)Spiral model
⚫ Thespiral model assumes thatseveral versions of the
system will be built.
⚫ Each level of design, the designers go through
requirements,construction,and testing phases.
⚫ At laterstageswhen more complete versions of the
system areconstructed.
⚫ Each phase requires morework, widening thedesign
spiral.
⚫ The first cycles at the topof thespiral arevery small
and short.
⚫ The final cycles at the spiral’s bottomadd detail
learned from theearliercycles of thespiral.
⚫ Thespiral model is more realisticthan thewaterfall
model because multiple iterations needed to
complete adesign.
⚫ But too many spirals may take long time required for
design.
1.5.3)Successive refinement design model
⚫ In thisapproach, thesystem is builtseveral times.
⚫ A first system is used as a rough prototype.
⚫ Embedded computing systems are involved thedesign of hardware/softwareproject.
⚫ Front-end activities are specification and architecture and also includes hardwareand
software aspects.
⚫ Back-end activities  includes integration and testing.
⚫ Middle activitiesincludes hardwareand software development.
1.5.4)Hierarchical design flow
⚫ Manycomplexembedded systemsare builtof smallerdesigns.
⚫ Thecomplete system may require thedesign of significant software
components.
⚫ It has many levelsof abstraction todesign flows for individual components.
⚫ The implementation phase contains a complete flow from specification
through testing.
⚫ Each flow will probably be handled byseparate peopleor teams.
⚫ The teams must relyon each other’s results.
⚫ Thecomponent teams take their requirements from team handling the next
higher level of abstraction.
⚫ The higher-level team relieson thequalityof design and testing performed by
thecomponent team.
5) Concurrent engineering
⚫ Reduced design time is an important goal forconcurrent engineering.
⚫ Iteliminate “over-the-wall” design steps, one designerperforms an isolated task and then
throws the result to the next designer.
Concurrent engineering efforts arecomprised of several elements.
⚫ Cross-functional teams include members from various disciplines ( manufacturing,
hardwareand software design, marketing)
⚫ Concurrent product realizethe process activities .
⚫ Designing various subsystems simultaneously, is reducing design time.
⚫ Integrated project managementensures that someone is responsible for the entire project.
⚫ Earlyand continual supplier make the best useof suppliers’ capabilities.
⚫ Earlyand continual customer ensure that the product meetscustomers’ needs.
Concurrent Engineering Applied toTelephoneSystems
1. Benchmarking They compared themselves to competitors and found that it took
them 30% longer to introduce a new product than their bestcompetitors.
2. Breakthrough improvement.
⚫ Increased partnership between design and manufacturing.
⚫ Continued existenceof the basicorganization of design labs and manufacturing.
⚫ Support of managers at least two levels above theworking level.
3. Characterization of thecurrent process.
⚫ Too many design and manufacturing tasks were performed sequentially.
4. Create the target process Thecore team created a model for the new development
process.
5. Verify the new process test the new process.
6. Implement across the product lineThis activity required training of personnel,
documentation of the new standards and procedures, and improvements to information
systems.
7. Measure resultsand improvePerformanceof the new design was measured.
6. REQUIREMENTS ANALYSIS
⚫ RequirementsIt is a informal descriptions of what thecustomerwants.
⚫ A functional requirement states what the system mustdo.
⚫ A nonfunctional requirementIt can be physical size, cost, powerconsumption, design
time, reliability, and soon.
Requirementsof tests
⚫ CorrectnessRequirements should not mistakenly describewhat thecustomerwants.
⚫ UnambiguousnessRequirements document should be clearand haveonly one plain
language interpretation.
⚫ Completeness Requirements all should be included.
⚫ Verifiability cost-effectiveway to ensure thateach requirement is satisfied in the final
product.
⚫ ConsistencyOne requirement should not contradict anotherrequirement.
⚫ ModifiabilityThe requirements document should be structured so that itcan be
modified to meetchanging requirements without losing consistency.
⚫ TraceabilityAbleto trace forward /backward from the requirements.
7) SPECIFICATIONS
⚫ SpecificationsIt is a detailed
descriptions of thesystem thatcan
be used tocreate thearchitecture.
Control-oriented specification languages
⚫ SDL specifications include states,
actions, and both conditional and
unconditional transitions between
states.
⚫ SDL isan event-oriented state
machine model.
⚫ Statechart has some important
concepts.
⚫ Statecharts allow states to be
grouped togetherto show common
functionality.
⚫ Basicgroupings(OR)
⚫ State machine specifies that the machinegoes to state s4 from any of s1, s2, ors3 when
theyreceive the input i2.
⚫ The Statechartdenotes thiscommonality bydrawing an OR statearound s1, s2, and s3 .
⚫ Single transition outof the OR states123 specifies that the machinegoes to s4 when it
receives the i2 input while in any state included in s123.
⚫ Multiple ways toget into s123 (via s1 ors2), and transitions between stateswithin the OR
state (from s1 tos3 ors2 tos3).
⚫ The OR state is simply a tool for specifying some of the transitions relating to these
states.
⚫ Basicgroupings(AND)
⚫ In the Statechart, the AND state sab is decomposed into two components, saand sb.
⚫ When the machine enters the AND state, itsimultaneously inhabits the states1 of
component sa and thestates3 of component sb.
⚫ When itenters sab, thecomplete stateof the machine requires examining both saand sb.
⚫ States1-3 in the Statechart machine having its sacomponent in s1 and its sbcomponent in
s3.
⚫ When exit from cluster states go to s5 only when in the traditional specification, we are in
states2-4 and receive input r.
1) Advanced specifications
⚫It ensure thecorrectness and safetyof thissystem. Ex
Traffic Alertand Collision Avoidance System(TCAS)
⚫ It isacollision avoidance system foraircraft.
⚫ TCAS unit in an aircraft keeps track of the position of other nearby aircraft.
⚫ It uses pre-recorded voice (“DESCEND!) commands for mid-aircollision.
⚫ TCAS makes sophisticated decisions in real timeand is clearly safety critical.
⚫ It mustdetect as many potential collision events as possible .
⚫It mustgeneratea few falsealarms ,at extreme maneuvers in potentially dangerous.
TCAS-II specification(RSML Language) Transition states
Collision Avoidance system
⚫ Thesystem has Power-off and Power-on states .
⚫ In the poweron state, the system may be in Standby or Fully operational mode.
⚫ In the Fully operational mode, threecomponents areoperating in parallel, as specified
by the AND state.
⚫ The own aircraft subsystem to keep track of up to 30 otheraircraft.
⚫ Subsystem to keep track of up to 15 Mode S ground stations, which provide radar
information.
8. SYSTEM ANALYSIS AND ARCHITECTURE DESIGN
⚫ The CRC card methodologyanalyze and understanding theoverall structure of acomplex
system.
CRC cards
⚫ Classesdefine the logical groupings of dataand functionality.
⚫ Responsibilities describewhat theclasses do.
⚫ Collaboratorsare theotherclasses with which agiven class works.
⚫ It has space towrite down theclass name, its responsibilities and collaborators, and other
information.
Layoutof CRC card
⚫ A class may represent a real-world objectof thesystem.
⚫ A class has both an internal stateand a functional interface.
⚫ The functional interface describes theclass’s capabilities.
⚫ The responsibility set is describing that functional interface.
⚫ Thecollaboratorsof aclass aresimply theclasses that it talksor calls upon to help itdo its
work.
⚫ CRC card Analysis Process
1. Develop an initial listof classesWrite down theclass name and functions of it.
2. Writean initial listof responsibilities and collaborators.
3. Createsome usage scenariosdescribewhat thesystem does.
4. Walk through the scenariosEach person on the team represents one or more classes.
5. Refine theclasses, responsibilities, and collaborators make changes to the CRC cards.
6. Add class relationships subclass and super-class can beadded to thecards.
Ex:Elevator system
1. One passengerrequestsa caron a floor, gets in thecarwhen it arrives, requests
anotherfloor, and getsout when thecarreachesthat floor.
2. One passengerrequestsacaron a floor, gets in the carwhen it arrives, and
requests the floor that thecar is currentlyon.
3. A second passengerrequests acarwhileanotherpassenger is riding in the
elevator.
4. Two people push floor buttons on different floorsat the same time.
5. Twopeople push carcontrol buttons in different carsat thesame time.
1.9) Quality Assurance techniques(QA)
⚫ Thequalityassurance (QA) process isvital for the delivery of a satisfactory system.
⚫ International Standards Organization (ISO) has created a setof qualitystandards known as
ISO 9000.
⚫ Itwas created toapply toa broad rangeof industries, including limited toembedded
hardwareand software.
ISO 9000 quality management parameters
⚫ Process is crucialKnowing what steps are to be followed tocreatea high-quality product.
⚫ Documentation is importanthelps internal quality monitoring groups toensure that the
required processes and helps outside groups understand the processes and how they are
being implemented.
⚫ Communication is important people should understand not only theirspecific tasks but
also how their jobs can affect overall system quality.
Capability Maturity Model (CMM)
⚫ It is used to measuring the qualityof an organization’s softwaredevelopment.
1. InitialA poorly organized process, with very few well-defined processes.
Successof a projectdepends on the efforts of individuals, not theorganization
itself.
2. Repeatable provides basic tracking mechanisms to understand cost,
scheduling .
3. DefinedThe management and engineering processes aredocumented and
standardized.
4. Manageddetailed measurementsof the development process and product
quality.
5. Optimizingfeedback from detailed measurements is used tocontinually
improve theorganization’s processes.
⚫ Verifying the specificationDiscovering bugs early is crucial because it prevents bugs
from being released tocustomers, minimizes design costs, and reduces design time.
⚫ Validation of specificationscreating the requirements, including correctness,
completeness, consistency, and soon
Design reviews
⚫ The review leadercoordinates the pre-meeting activities, thedesign review itself,
and the post-meeting follow-up.
⚫ The reviewerrecords the minutes of the meeting so thatdesigners and others know
which problems need to be fixed.
⚫ The reviewaudience studies thecomponent.
1.10 DESIGNING WITH COMPUTING PLATFORM
1.10.1 System Architecture
⚫ Thearchitectureof an embedded computing system includes both hardware
and softwareelements
HARDWARE
⚫ CPU Thechoiceof the CPU is one of the most important, but it can be
considered the software thatwill executeon the machine.
⚫ Bus Thechoiceof a bus is closelytied to thatof a CPU,bus can handle the
traffic.
⚫ MemorySelectiondepends total size and speed of the memorywill playa
largepart in determining system performance.
⚫ Inputand outputdevices Dependig upon the system requirements
SOFTWARE
RunTimecomponents
⚫ It is acritical partof the platform.
⚫ An operating system is required tocontrol CPU and its multiple
processes .
⚫ A file system is used in manyembedded systems toorganize internal
dataand interfacewithothersystems
Supportcomponents
⚫ It is acomplex hardwareplatform.
⚫ Withoutpropercodedevelopmentand operating system, the hardware
itself is useless.
ARM evaluation board
1.10.2)The PC as a Platform
⚫ CPU provides basiccomputational facilities.
⚫ RAM is used forprogram storage.
⚫ ROMholds the bootprogram.
⚫ DMAcontrollerprovides DMA capabilities.
⚫ Timers used by theoperating system foravarietyof purposes.
⚫ High-speed busconnected tothe CPU bus througha bridge, allows
fastdevices tocommunicatewith the restof the system.
⚫ low-speed bus providesan inexpensive way toconnectsimpler
devices.
1.10.3 Development Environments
⚫ Development process  used to makeacompletedesign
of the system.
⚫ It guides thedevelopers how to design a system .
⚫ An embedded computing system has CPU ,memory, I/O
devices.
⚫ Development of embedded system have both hardware&
software.
⚫Thesoftwaredevelopment on a PC orworkstation known
asa host.
•The hostand target are frequentlyconnected bya USB link.
•Thetarget must includea small amountof software to talk to the host
system.
Functions of Hostsystem
⚫ Load programs into the target
⚫ Startand stop program execution on the target
⚫Examine memoryand CPU registers.
Cross-Compiler
⚫ Compiler kind of software that translateone form of pgm toanother form of
pgm.
⚫ Cross Compilerisacompiler that runson one typeof machine butgenerates
⚫ code foranother
⚫ Aftercompilation, theexecutable code is downloaded to theembedded system
bya serial link.
⚫ A PC orworkstation offers a programming environment .
⚫ Butone problem with thisapproach emergeswhen debugging code talks to I/O
devices.
⚫ Testbenchprogram can be built to helpdebug theembedded code.
⚫ It mayalso take the outputvalues and compare them againstexpected values.
1.10.4Debugging Techniques
⚫ It is the processof checking errorsand correcting thoseerrors.
⚫ It can bedone bycompiling and executing thecodeon a PC orworkstation.
⚫It can be performed by both H/W and S/W sides.
Softwaredebugging tools
1. Serial Porttool
⚫ It will perform thedebugging process from the initial stateof embedded system
design.
⚫ It can be used notonly fordevelopment debugging butalso for diagnosing
problems in the field.
2. Breakpointstool
⚫ userto specify an addressatwhich the program’sexecution is to break.
⚫ When the PC reaches that address, control is returned to the monitor program.
⚫ From the monitor program, the usercan examine and/or modify CPU registers,
afterwhichexecution can becontinued.
Breakpoint is a location in memoryatwhicha program stops executing and
returns to thedebugging tool or monitor program.
Toestablisha breakpointat location 0x40c in some ARM code, replaced the branch
(B) instruction with a subroutinecall (BL) to the breakpoint handling routine
⚫ Hardwaredebugging tools
⚫ Hardwarecan bedeployed togive aclearerview on what is happening when the
system is running.
1. MicroprocessorIn-Circuit Emulator (ICE)
⚫ It is a specialized hardwaretool that can helpdebug software in a working
embedded system.
⚫ In-circuit emulator is a special version of the microprocessor thatallows its
internal registers to be read out when it is stopped
2. Logic Analyer
⚫ Theanalyzercan sample manydifferent signalssimultaneously butcan display
only 0, 1, orchanging values foreach.
⚫ The logicanalyzerrecordsthevalues on the signals into an internal memory
and then displays the resultson adisplay once the memory is full.
Architecture of a logic analyzer
Data modes of logic analyzer
State modes
⚫ State mode representdifferent waysof sampling thevalues.
⚫ It uses theown clock tocontrol sampling
⚫ It sampleseach signal onlyone perclock cycle.
⚫It has less memory to storeagiven numberof system clock.
Timing modes
⚫ Timing mode usesan internal clock that is fastenough to take several samples
perclock period in a typical system.
1.10.5)Debugging Challenges
⚫ Logical errors in softwarecan be hard totrack down and itwill create
many problems in real timecode.
⚫ Real-timeprogramsare required to finish theirwork withina certain
amountof time.
⚫ Run time pgm run too long, theycan createvery unexpected behavior.
⚫ Missing of Deadline makes debugging processas difficult.
1.11 Consumer Electronic Architecture
⚫ Consumerelectronicrefers to anydevice containing an electroniccircuit board
that is intended foreneryday use by individuals.
⚫ EgTV,cameras,digital cameras,calculators,DVDs,audio devices,smart phones
etc..,
1.11..1)Functional Requirements
1. Multimedia
⚫ The media may beaudio, still images, orvideo.
⚫ These multimedia objectsaregenerallystored in compressed form and must be
uncompressed to be played .
⚫ Eg multimedia compression standards (MP3,Dolby Digital(TM))
⚫ audio; JPEG forstill images; MPEG-2, MPEG-4, H.264, etc. forvideo.
2. Data storage and management Peoplewant to selectwhat multimedia objects
they save or play, data storage goes hand-in-hand with multimedia capture and
display. Many devices provide PC-compatible file systems so that data can be
shared moreeasily.
3. Communications Communications may be relativelysimple, such asa USB
⚫ and another is Ethernet port oracellulartelephone link.
1.11.2)Non-Functional Requirements
⚫ Manydevices are battery-operated, which means that they mustoperate under
strictenergy budgets.
⚫ Battery(75mW) support not only the processors butalso the display, radio,
etc.
⚫ Consumer electronics must also be very inexpensive but provide very high
performance.
⚫ usecase for selecting and playing a multimedia object (audio clip, a picture,etc.).
⚫ Selecting an object makes useof both the user interface and the file system.
⚫ Playing also makes useof the file system aswell as thedecoding subsystemand
I/O subsystem.
Use case for playing multimedia
Use case of synchronizing with a host
system
⚫ usecase forconnecting toaclient.
⚫ Theconnection may beeitherovera local connection like USB orover the
Internet.
⚫ Someoperations may be performed locallyon theclient device
⚫ mostof thework is done on the hostsystem while theconnection is
established
1.11.3)Functional architecture of
Consumer Electronics Device(CED)
⚫ It is a two-processorarchitecture.
⚫ If morecomputation is required, more DSPs and CPUs may beadded.
⚫ The RISC-CPU runs theoperating system, runs the user interface, maintains
the file system, etc.
⚫ DSP it is a programmableone, which performs signal processing.
⚫ Operating system runson the CPU must maintain processes and the file
system.
⚫ Depending on thecomplexity of thedevice, theoperating system may not need
tocreate tasksdynamically.
⚫ If all taskscan becreated using initialization code, theoperating system can be
madesmallerand simpler.
1.11.4 Flash File Systems
⚫ Manyconsumerelectronicsdevices use flash memory for mass storage.
⚫ Flash memory is a type of semiconductor memory ,unlike DRAM or
SRAM, provides permanentstorage.
⚫ Valuesare stored in the flash memorycell as electricchargeusing a
specialized capacitorthatcan storethecharge foryears.
⚫ The file system of adevice is typically shared witha PC.
⚫ Standard file systemhas two layers.bottom layer handles physical
reads and writes on the storage device and the top layer provides a
logical viewof the file system.
⚫ Flash file systemimposesan intermediate layer thatallows the logical-
to-physical mapping of files to bechanged.
1.12 Platform-Level Performance Analysis
⚫ System-Level Performance involves much more than the CPU.
⚫ To move data from memory to the CPU to process it. Toget thedata from
memory to the CPU we must.
1. Read from the memory.
2. Transferover the bus to thecache.
3. Transferfrom thecache to the CPU.
⚫ Theperformance of the system based on Bandwidth of the system.
⚫ We can increase bandwidth in twoways:
1) By increasing the clock rateof the bus
2) By increasing theamount of data transferred perclock cycle.
Forexample, bus tocarry four bytesor 32 bits per transfer, wewould reduce
the transfer time to 0.058 s. If wealso increase the busclock rate to 2 MHz,
then wewould reduce the transfer time to 0.029 s ,which is within our time
budget for the transfer.
t=TP
tbuscyclecounts
Tbus cycles.
pbusclock period
1. Parallelism
⚫ Direct memoryaccess is aexampleof parallelism.
⚫ DMA was designed tooff-load memory transfers from the CPU.
⚫ The CPU can dootheruseful work while the DMA transfer is running.
ERTS_IV_ECE.pptx

ERTS_IV_ECE.pptx

  • 1.
    1. Wayne Wolf,“Computers as Components – Principles of Embedded Computing System Design”, Third Edition “Morgan Kaufmann Publisher (An imprint from Elsevier), 2012. Prepared by Mrs.R.Kiruthikaa,AP/ECE Department of Electronics and Communication Egineering Karpagam Institute of Technology Coimbatore
  • 2.
    UNIT I INTRODUCTION TOEMBEDDED SYSTEM DESIGN Complex systems and microprocessors– Embedded system design process –Design example: Model train controller- Design methodologies- Design flows - Requirement Analysis – Specifications-System analysis and architecture design – Quality Assurance techniques - Designing with computing platforms – consumer electronics architecture – platform- level performance analysis.
  • 3.
    Introduction-Embedded Systems ⚫ AnEmbedded system is an electronicsystem that has a softwareand is embedded in computer hardware. ⚫ It is a system which has collection of components used toexecutea task according toa programorcommandsgiven to it. ⚫ Examples Microwaveovens, Washing machine, Telephone answering machine system, Elevator controller system, Printers, Automobiles, Cameras, etc.
  • 5.
    Components of Embeddedsystem ⚫Microprocessor ⚫Memory Unit(RAM,ROM) ⚫Inputunit(Keyboard,mouse,scanner) ⚫Outputunit(pinters,video monitor) ⚫Networking unit(Ethernetcard) ⚫I/O units(modem)
  • 6.
    Real Time OperatingSystem-RTOS ⚫ Real-Time Operating System (RTOS) is an operating system (OS) intended toserve real-timeapplications thatprocess dataas itcomes in, typically without bufferdelays. ⚫ Itschedules theirworking and execution by following a plan tocontrol the latenciesand to meet thedead lines. ⚫ Modeling and evaluation of a real-time scheduling system concern is on theanalysis of thealgorithm capability to meeta process deadline. ⚫ A deadline is defined as the time required fora task to be processed.
  • 7.
    Classification of Embeddedsystem 1. Small scale Embedded system(8/16bit microcontroller) 2. Medium Scale Embedded system (16/32bit microcontroller, more tools like simulator, debugger) 3. Sophisticated Embedded system (configurableprocessorand PAL) Embedded designer-skills ⚫ Designerhas a knowledge in the followings field, ⚫ Microcontrollers, Datacomm., motors, sensors, measurements ,C programming, RTOS programming.
  • 8.
    1) COMPLEX SYSTEMSAND MICROPROCESSORS Embedded(+)computersystem ⚫ Embedded system isacomplex system ⚫ It is anydevice that includesa programmablecomputer but is not itself intended to beageneral-purpose computer.
  • 9.
    History of Embeddedcomputer system ⚫ Computers have been embedded into applications since theearliestdaysof computing. ⚫ In 1940s and 1950sWhirlwind, designed a first computer to support real-time operation forcontrolling an aircraftsimulator. ⚫ In 1970s The first microprocessor( Intel 4004) wasdesigned foran embedded application (Calculator), provided basicarithmetic functions. ⚫ In 1972s The first handheld calculator (HP-35 ) was to perform transcendental functions , so it used several chips to implement the CPU, ratherthan a single-chip microprocessor. ⚫ Designer faced critical problems to design adigital circuits to perform operations like trigonometric functions using calculator. ⚫ But ,Automobile designersstarted making useof the microprocessor for to control the engine by determining when spark plugs fire, controlling the fuel/air mixture
  • 10.
    Levels of Microprocessor 1.8-bit microcontroller for low-costapplications and includeson-board memoryand I/O devices. 2. 16-bit microcontroller used for more sophisticated applications that may requireeither longerword lengthsoroff-chip I/O and memory. 3. 32-bit RISC microprocessoroffersvery high performance for computation-intensive applications. Microprocessor Uses/Applications ⚫ Microwaveoven hasat leastone microprocessortocontrol oven operation ⚫ Thermostatsystems, whichchange the temperature level atvarious times during theday ⚫ The modern camera is a primeexampleof the powerful features thatcan be added under microprocessorcontrol. ⚫ Digital television makes extensive useof embedded processors.
  • 11.
    Embedded Computing Applications ⚫ExBMW 850i Brakeand Stability Control System ⚫ The BMW 850i was introduced with a sophisticated system forcontrolling the wheelsof thecar. ⚫ Which uses An antilock brake system (ABS) and An automatic stability control (ASC +T) system.
  • 12.
    1. Anantilock brakesystem (ABS) ⚫ Reduces skidding by pumping the brakes. ⚫ It is used to temporarily release the brake on a wheel when it rotates too slowly—when a wheel stops turning, the car starts skidding and becomes hard tocontrol. ⚫ It sits between the hydraulic pump, which provides power to the brakes. ⚫ Ituses sensorsoneach wheel to measure the speed of thewheel. ⚫ The wheel speeds are used by the ABS system to determine how to vary the hydraulic fluid pressure toprevent thewheels from skidding.
  • 13.
    2. An automaticstabilitycontrol(ASC +T) system ⚫ It is used tocontrol theenginepowerand the brake to improvethe car’s stabilityduring maneuvers. ⚫ Itcontrols fourdifferentsystems: throttle, ignition timing, differential brake, and (on automatictransmissioncars) gearshifting. ⚫ Itcan be turned off by thedriver, which can be importantwhen operating with tiresnowchains. ⚫ It has control unit has two microprocessors , oneof which concentrates on logic-relevant components and the other on performance-specific components. ⚫ The ABS and ASC+ T mustclearly communicate because the ASC+ T interactswith the brake system.
  • 14.
    1. Complex algorithms-Themicroprocessor that controls an automobile engine must perform complicated filtering functions to optimize the performance of thecarwhile minimizing pollution and fuel utilization. 2. Userinterface-The moving maps in Global Positioning System (GPS) navigation aregood examplesof user interfaces. 3. Real time-Embedded computing systems have to perform in real time—if the data is not ready byacertain deadline,thesystem breaks. In somecases, failure to meetadeadline or missing adeadline does not createsafety problems but doescreate unhappy customers 4. Multirate-Multimediaapplications areexamplesof multirate behavior. The audio and video portions of a multimedia stream run at very different rates, but they must remain closelysynchronized. Failure to meetadeadline on either the audio or video portions spoils the perception of the entire presentation. Characteristics of Embedded Computing Applications
  • 15.
    5. Manufacturing cost-It is depends on the type of microprocessorused, the amountof memory required, and the typesof I/O devices. 6. Powerand energy-Powerconsumption directlyaffects the costof the hardware, sincea largerpower supply may be necessary. 7. Energy consumption affects battery life, which is important in many applications, aswell as heatconsumption, whichcan be important even in desktopapplications.
  • 16.
    Why Use Microprocessors? ⚫Microprocessorsareaveryefficientway to implementdigital systems. ⚫ It make iteasier todesign familiesof productswithvarious featureat differentprice points ⚫ Itcan beextended toprovide new features to keep up with rapidly changing markets. ⚫ Itexecutes programveryefficiently ⚫ It make theirCPU runvery fast ⚫ Implementing several functionon a single processor
  • 17.
    Why not usePCs for all embedded computing? ⚫Real time performance isvery less in PC becauseof differentarchitecture. ⚫It increases thecomplexityand priceof components due to broad mixof computing requirements.
  • 18.
    Challenges in EmbeddedComputing System Design 1. How much hardwaredowe need? ⚫ To meet performancedeadlines and manufacturing costconstraints, thechoiceof Hardwareis important. ⚫ Too much hardwareand it becomes too expensive. 2. Howdowe meetdeadlines? ⚫ Tospeed up the hardwareso that the program runs faster. But the system more expensive. ⚫ It is also entirely possible that increasing the CPU clock rate may not make enough difference toexecution time, since the program’sspeed may be limited by the memory system. 3. Howdowe minimizepowerconsumption? ⚫ In battery-powered applications, powerconsumption is extremely important. ⚫ In non-batteryapplications, excessive powerconsumption can increase heat dissipation. ⚫ Careful design is required toslowdown the noncritical partsof the machine for powerconsumption whilestill meeting necessaryperformance goals.
  • 19.
    4) Howdowedesign forupgradability? ⚫The hardwareplatform may be used over several product generations,orfor several different versions ,able to add features bychanging software. 4.1) Complex testing: Run a real machine in ordertogenerate the properdata. ⚫ Testing of an embedded computer from the machine in which it is embedded. 2) Limited observability and controllabilityNo keyboard and screens, in real- time applications we may not be able to easily stop the system to see what is going on inside and to affect the system’soperation. 3) Restricted development environments: ⚫ We generallycompile codeon one typeof machine, such asa PC, and download it onto theembedded system. ⚫ Todebug thecode, we must usuallyrelyon programs that run on the PC or workstation and then look inside theembedded system.
  • 20.
    Performance in EmbeddedComputing ⚫ Embedded system designers have to set theirgoal —theirprogram must meet its deadline. PerformanceAnalysis 1. CPU: The CPU clearly influences the behaviorof the program, particularlywhen the CPU is a pipelined processorwith acache. 2. Platform: The platform includes the bus and I/O devices. The platform components that surround the CPU areresponsible for feeding the CPU and can dramaticallyaffect its performance. 3. Program: Programsarevery largeand the CPU seesonlya small window of the program at a time. We must consider the structure of the entire program to determine its overall behavior. 4. Task: Wegenerally run several programs simultaneously on a CPU, creating a multitasking system. The tasks interact with eachother in ways that have profound implications for performance. 5. Multiprocessor: Manyembedded systems have more than one processor—they may include multiple programmable CPUsaswell asaccelerators. Onceagain, the interaction between these processors adds yet more complexity to the analysis of overall system performance.
  • 21.
    2)EMBEDDED SYSTEM DESIGNPROCESS Design process has twoobjectivesas follows. 1. Itwill give us an introductiontothevarioussteps in embedded system design. 2. Design methodology I. Design toensure thatwe havedoneeverything we need todo, such as optimizing performanceorperforming functional tests. II. Itallows us todevelop computer-aided design tools. III. A design methodology makes it much easier for members of adesign team tocommunicate.
  • 22.
    Levels of abstractionin thedesign process. 1)Requirements •It can beclassified in to functional or nonfunctional 1.1)Functional Requirements •Gatheran informal description from thecustomers. •Refine the requirements into a specification thatcontains enough information todesign the systemarchitecture. •Ex:Sample Requirements form •NameGiving a name to the project PurposeBrief one- or two-line description of what thesystem is supposed todo. •Inputs& Outputs Analog electronicsignals? Digital data? Mechanical inputs? •Functions detailed descriptionof what the systemdoes Performance computations must be performed within a certain time frame •Manufacturing cost costof the hardwarecomponents. Power how much powerthe systemcan consume Physical sizeand weight indication of the physical size of the system
  • 23.
    ⚫ 1.2) Non-FunctionalRequirements ⚫ Performance depends upon approximate time to perform a user- level functionand also operation must becompleted withindeadline. ⚫ CostManufacturing cost includes thecostof components and assembly. • Nonrecurring engineering (NRE) costs include the personnel and other costsof designing the ⚫ system ⚫ Physical Size and WeightThe final system can vary depending upon theapplication. ⚫ Power ConsumptionPowercan be specified in the requirementsstage in termsof battery life.
  • 24.
    2)SPECIFICATION ⚫ Thespecification mustbecarefully written so that it accuratelyreflects the customer’s requirements. ⚫ It can beclearly followed during design. 3) Architecture Design ⚫ Thearchitecture is a plan for theoverall structureof the system. ⚫ It is in the form block diagram thatshowsa majoroperation and data flow. 4) Designing Hardware and Software Components ⚫ Thearchitectural description tells us whatcomponents we need include both hardware—FPGAs, boards & software modules 5)System Integration ⚫ Onlyafter thecomponents are built, putting them togetherand seeing a working system. ⚫ Bugsare found during system integration, and good planning can helpus find the bugsquickly.
  • 25.
    Embedded system DesignExample ⚫GPS moving map
  • 26.
    Design Process Steps 1.Requirementsanalysis of a GPS moving map ⚫ The moving map is a handheld device thatdisplays for the usera map of the terrain around the user’s currentposition. ⚫ The mapdisplay changesas the userand the mapdevice changeposition. ⚫ The moving mapobtains its position from the GPS, a satellite-based navigation system. Name GPS moving map Purpose Consumer-grade moving map for driving use Inputs Power button, two control buttons Outputs Back-lit LCD display 400 600 Functions Uses 5-receiver GPS system; three user-selectable resolutions;always displays current latitude and longitude Performance Updates screen within 0.25 seconds upon movement Manufacturing cost $30 Power 100mW Physical size and weight No more than 2”X 6, ” 12 ounces
  • 27.
    Design Process Steps 2)FunctionalityThis system is designed for highwaydriving and similaruses. Thesystem should show majorroads and other landmarksavailable in standard topographic databases. 3) User interfaceThe screenshould have at least 400X600 pixel resolution. The device should becontrolled by no more than 3 buttons. A menu system should pop up on the screen when buttons are pressed toallow the user to make selections tocontrol the system. 4)Performance The map should scroll smoothly. Upon power-up, a display should take no more than 1sec toappear. Thesystem should beableto verify its position and display the current mapwithin 15 s. 5)Cost Theselling costof the unit should be no more than $100. 6) Physical sizeand weightThedevice should fit comfortably in the palm of the hand. 7) Powerconsumption Thedevice run forat least 8 hrson 4 AA batteries.
  • 28.
    8) specification 1. Datareceived from the GPS satelliteconstellation. 2. Mapdata. 3. User interface. 4. Operations that must be performed tosatisfy customerrequests. 5. Background actions required to keep the system running, such as operating the GPS receiver.
  • 29.
  • 30.
    Hardware architecture •onecentral CPUsurrounded by memoryand I/O devices. •It used two memories: a frame buffer for the pixels to be displayed and a separate program/data memory for general use by the CPU. Software architecture •Timer to control whenwe read the buttons on the user interface and renderdataonto thescreen. •Units in the software block diagram will be executed in the hardwareblockdiagram and whenoperations will be performed in time.
  • 31.
    3)FORMALISM FOR SYSTEMDESIGN ⚫ UML(Unified Modeling Language) is an object-oriented modeling language used tocaptureall thesedesign tasks. ⚫ It encourages the design to bedescribed asa numberof interacting objects, ratherthan blocksof code. ⚫ objectswill correspond to real pieces of softwareor hardware in the system. ⚫ It allowsa system to bedescribed in a way thatclosely models real-world objectsand their interactions. Classification of descriptor 3.1)Structural Description 3.2)Behavioral Description
  • 32.
    1) Structural Description ⚫Itgives basiccomponents of the system and designerscan learn how to describethesecomponents in termsof object. 3.1.1) OBJECT in UML NOTATION ⚫ An object includesa setof attributes thatdefine its internal state. ⚫ An objectdescribing adisplay (CRTscreen) is shown in UML notation in Figure. ⚫ Theobject hasa unique name, and a memberof a class. ⚫ The name is underlined to show that this is adescription of an objectand not of aclass. ⚫ Thetext in the folded-corner page icon is a note. An object in UML notation
  • 33.
    3.1.2)CLASS IN UMLNOTATION ⚫ All objectsderived from the same class have thesamecharacteristics, but attributes may have different values. ⚫ It also defines the operations that determine how the object interacts with the restof the world. ⚫ It defines both the interface for a particulartype of objectand that object’simplementation.
  • 34.
    Relationships between objectsand classes 1. Association occurs between objects that communicate with eachother but have no ownership relationship between them. 2. Aggregation describesa complex object madeof smallerobjects. 3. Composition It is a typeof aggregation in which the ownerdoes not allow accessto thecomponent objects. 4. Generalization allows us todefine one class in termsof another.
  • 35.
    Derived classes asa form of generalization in UML •A derived class is defined to includeall the attributesof its baseclass. •Display is the baseclassand BW displayand color mapdisplayare the twoderived classes. •BW display represents black and whitedisplay .
  • 36.
    Multiple inheritance inUML •UML allows to define multiple inheritance, in which a class is derived from more than one baseclass. •Multimediadisplay class bycombining the Displayclasswith a Speakerclass for sound. •Thederived class inheritsall theattributes and operations of both its baseclasses, Displayand Speaker. •
  • 37.
    Links and Association ⚫A link describesa relationship between objectsand association is to link as class is toobject. ⚫ Links used to make to stand associations capture type information aboutthese links. ⚫ Theassociation is drawnas a line between the two labeled with the nameof theassociation, namely, contains.
  • 38.
    ⚫ Behaviorof anoperation is specified bya state machine. ⚫ These state machineswill not relyon the operation of a clock. ⚫ Changes from onestate toanotherare triggered by the occurrenceof events. ⚫ Theevent maygenerated from theoutsideor insideof the system. 3.2)Behavioral Description
  • 39.
    Signal, call, andtime-out events in UML.
  • 40.
    ⚫ Signal isan asynchronousoccurrence. ⚫ It is defined in UML byan object that is labeled as a <<signal>>. ⚫ Signal may haveparameters thatare passed tothe signal’s receiver. ⚫ Call event follows the model of a procedurecall in a programming language. ⚫ Time-outevent causes the machine to leavea stateafteracertain amountof time. ⚫ The label tm(time-value) on theedgegives theamountof timeafter which the transitionoccurs. ⚫ It is implemented withan external timer.
  • 41.
    State Machine specificationin UML ⚫ Thestartand stop states arespecial stateswhichorganize the flow of the state machine. ⚫ Thestates in the state machine representdifferent operations. ⚫ Conditional transitions out of states based on inputs orresultsof some computation. ⚫ An unconditional transition to the next state.
  • 42.
    Sequence diagram inUML ⚫ Sequence diagram is similartoa hardwaretiming diagram, although the time flows vertically in a sequence diagram, whereas time typically flows horizontally in a timing diagram. ⚫ It is designed to show particularchoiceof events—it is notconvenient for showing a numberof mutuallyexclusive possibilities.
  • 43.
    4) Design:Model TrainController ⚫ In order to learn how to use UML to model systems specify a simplesystem (Ex: model train controller) ⚫ Theusersends messages to the train with acontrol boxattached to the tracks. ⚫ Thecontrol box may have controls suchas a throttle, emergency stop button, and soon. ⚫ Thetrain Rx its electrical power from the two rails of the track. CONSOLE ⚫ Each packet includes an addressso that theconsolecan control several trains on the same track. ⚫ Thepacket also includesan errorcorrection code (ECC) toguard against transmission errors. ⚫ This is aone-waycommunication system—the model train cannot send commands back to the user.
  • 44.
  • 45.
    REQUIREMENTS ⚫ Theconsole shallbeable tocontrol up toeight trainson a single track. ⚫ The speed of each train controllable bya throttletoat least 63 different levels in each direction (forward and reverse). ⚫ Thereshall bean inertiacontrol toadjustthe speed of train. ⚫ Thereshall bean emergencystop button. ⚫ An errordetectionscheme will be used to transmit messages.
  • 46.
    Requirements:Chart Format ⚫ Name ⚫Purpose ⚫ Inputs Model train controller Control speed of up to eight model trains Throttle, inertia setting, emergency stop, train number Train control signals Setengine speed based upon inertiasettings; ⚫ Outputs ⚫ Functions respond ⚫ Performance ⚫ Manufacturing cost ⚫ Power ⚫ Physical sizeand weight weight Can update train speed at least 10 times persecond $50 10W Console should becomfortable for two hands,approximatesize of standard keyboard; 2 pounds
  • 47.
    Digital Command Control(DCC) ⚫ Standard S-9.1 how bitsareencoded on the rails for transmission. ⚫ Standard S-9.2 defines the packets thatcarry information. ⚫ Thesignal encoding system should not interfere with power transmission ⚫ Datasignal should not change the DC value of the rails. ⚫ Bits areencoded in the time between transitions. ⚫ Bit 0 is at least 100 s while bit 1 is nominally 58 s.
  • 48.
    Packet Formation inDCC ⚫ The basicpacket format is given by ⚫ P  preamble, which is a sequence of at least 10 1 bits. ⚫ S  packet start bit. It is a 0 bit. ⚫ A address is 8 bits long. Theaddresses 00000000, 11111110, and 11111111 are reserved. ⚫ s data bytestart bit, which, like the packet start bit, is a 0. ⚫ D data byte includes 8 bits. A data byte may contain an address, instruction, data, orerrorcorrection information. ⚫ E packetend bit, which is a 1 bit.
  • 49.
    Baselinepacket ⚫ The minimumpacket that must beaccepted byall DCC implementations. ⚫ It has threedata bytes. ⚫ Addressdata byte gives the intended receiverof the packet ⚫ Instructiondata byte provides a basic instruction ⚫ Errorcorrection data byte is used todetect and correct transmission errors. Date byte ⚫ Bits 0–3 providea 4-bitspeed value. ⚫ Bit 4 hasan additional speed bit. ⚫ Bit 5 gives direction, with 1 for forward and 0 for reverse. ⚫ Bits 6-7 aresetat 01  provides speed and direction.
  • 50.
    Conceptual Specification ⚫ Conceptualspecification allows us to understand the systema little better. ⚫ A train control system turnscommands into packets. ⚫ A command comes from thecommand unit whilea packet is transmitted over the rails. ⚫ Commands and packets may not begenerated in a 1-to-1 ratio
  • 51.
    UML collaboration diagramfor train controller system ⚫ Thecommand unit and receiverareeach represented byobjects. ⚫ Thecommand unit sendsa sequence of packets to the train’s receiver, as illustrated by thearrow messagesas 1..n. ⚫ Those messagesareof coursecarried over the track.
  • 52.
    UML class diagramfor the train controller
  • 53.
    Basic characteristics ofUML classes ⚫ Console class describes the command unit’s front panel, which contains theanalog knobs and hardware to interface to thedigital parts of the system. ⚫ Formatter class includes behaviors that know how to read the panel knobs and creates a bitstream for the required message. ⚫ Transmitter class interfaces to analog electronics to send the message along the track ⚫ Knobs* describes the actual analog knobs, buttons, and levers on the control panel. ⚫ Sender* describes the analog electronics that send bits along the track. ⚫ Receiver class knows how to turn the analog signals on the track into digital form. ⚫ Controller class includes behaviors that interpret the commands and figuresout how to control the motor. ⚫ Motor interface class defines how to generate the analog signals required tocontrol the motor. ⚫ Detector* detects analog signals on the track and converts them into digital form. ⚫ Pulser* turns digital commands into the analog signals required to control the motor speed.
  • 54.
    Detailed Specification •The Panelhas three knobs •train number (which train iscurrently being controlled). •speed (which can be positiveor negative), and inertia. •It also has one button for emergency- stop. •When we change the train number setting, to reset theothercontrols to the propervalues for that train. •so that the previous train’s control settings are not used tochange thecurrent train’s settings.
  • 55.
    Class diagram forpanel •The Panel class defines a behavior foreachof thecontrols on the panel. • The new-settings behavior uses the set-knobs behavior of the Knobs* •Change the knobs settings wheneverthe train numbersetting is changed. •The Motor-interface defines an attribute for speed that can be set by other classes. .
  • 56.
    Class diagram forthe Transmitter and Receiver •Theyprovide the software interface to the physical devices that send and receive bitsalong the track. •TheTransmitterprovides a behavior message thatcan besent •The Receiverclassprovides a read-cmd behavior to read a messageoff the tracks.
  • 57.
    Class diagram forFormatter ⚫ The formatter holds the current control settings forall of the trains. ⚫ The send-command servesas the interface to the transmitter. ⚫ The operate function performs the basicactions for theobject. ⚫ The panel-active behavior returns true wheneverthe panel’svalues do not correspond to thecurrentvalues
  • 58.
    Class diagram forController •The Controller’s operate behavior must execute several behaviors to determine the nature of the message. •Once the speed command has been parsed, it must send a sequence of commands to the motor to smoothlychange the train’s speed.
  • 59.
    Sequences diagram fortransmitting a control input ⚫ Sequence diagram specify the interface between more than one classes. ⚫ Its detailed operations and whatways its going tooperate
  • 60.
    1.4DESIGN METHODOLOGIES ⚫ DesignofEmbedded system is not an easy task. ⚫ The main goal of adesign process is tocreatea product thatdoes something useful. ⚫ Typical specifications fora product are functionality , manufacturing cost, performance and powerconsumption. Design process has several important goalsas follows Time-to-market ⚫ Customersalways want new features. ⚫ The product thatcomes out first can win the market, even setting customer preferences for futuregenerations of the product. Designcost ⚫ Consumer products arevery cost sensitive, and it is distinct from manufacturing cost. ⚫ Designcosts can dominate manufacturing costs. ⚫ Designcosts can also be important for high-volume consumerdevices when time-to-market pressures cause teams toswell in size. Quality ⚫ Customerswant theirproducts fast and cheap. ⚫ Correctness, reliability, and usability must beexplicitly addressed from the beginning of the design job toobtaina high-qualityproduct at theend
  • 61.
    1.5Design flows ⚫ Adesign flow isa sequence of steps to be followed during adesign. ⚫Someof thesteps can be performed by tools and othersteps can be performed by hand. Typesof Software development models 1. Waterfall model 2. Spiral model 3. Successive refinement development model 4. Hierarchical design model
  • 62.
    ⚫ Thewaterfall developmentmodel consists of five majorphases. ⚫ Requirements analysis determines the basiccharacteristics of thesystem. ⚫ ArchitecturedesignIt decomposes the functionality into majorcomponents ⚫ CodingIt implements the pieces and integrates them. ⚫ TestingIt detemines bugs. ⚫ Maintenance It entailsdeployment in the field, bug fixes,and upgrades. ⚫ Thewaterfall model makeswork flow information from higher levels of abstraction to moredetailed design steps. 1.5.1)Waterfall model
  • 63.
    1.5.2)Spiral model ⚫ Thespiralmodel assumes thatseveral versions of the system will be built. ⚫ Each level of design, the designers go through requirements,construction,and testing phases. ⚫ At laterstageswhen more complete versions of the system areconstructed. ⚫ Each phase requires morework, widening thedesign spiral. ⚫ The first cycles at the topof thespiral arevery small and short. ⚫ The final cycles at the spiral’s bottomadd detail learned from theearliercycles of thespiral. ⚫ Thespiral model is more realisticthan thewaterfall model because multiple iterations needed to complete adesign. ⚫ But too many spirals may take long time required for design.
  • 64.
    1.5.3)Successive refinement designmodel ⚫ In thisapproach, thesystem is builtseveral times. ⚫ A first system is used as a rough prototype. ⚫ Embedded computing systems are involved thedesign of hardware/softwareproject. ⚫ Front-end activities are specification and architecture and also includes hardwareand software aspects. ⚫ Back-end activities  includes integration and testing. ⚫ Middle activitiesincludes hardwareand software development.
  • 65.
    1.5.4)Hierarchical design flow ⚫Manycomplexembedded systemsare builtof smallerdesigns. ⚫ Thecomplete system may require thedesign of significant software components. ⚫ It has many levelsof abstraction todesign flows for individual components. ⚫ The implementation phase contains a complete flow from specification through testing. ⚫ Each flow will probably be handled byseparate peopleor teams. ⚫ The teams must relyon each other’s results. ⚫ Thecomponent teams take their requirements from team handling the next higher level of abstraction. ⚫ The higher-level team relieson thequalityof design and testing performed by thecomponent team.
  • 67.
    5) Concurrent engineering ⚫Reduced design time is an important goal forconcurrent engineering. ⚫ Iteliminate “over-the-wall” design steps, one designerperforms an isolated task and then throws the result to the next designer. Concurrent engineering efforts arecomprised of several elements. ⚫ Cross-functional teams include members from various disciplines ( manufacturing, hardwareand software design, marketing) ⚫ Concurrent product realizethe process activities . ⚫ Designing various subsystems simultaneously, is reducing design time. ⚫ Integrated project managementensures that someone is responsible for the entire project. ⚫ Earlyand continual supplier make the best useof suppliers’ capabilities. ⚫ Earlyand continual customer ensure that the product meetscustomers’ needs.
  • 68.
  • 69.
    1. Benchmarking Theycompared themselves to competitors and found that it took them 30% longer to introduce a new product than their bestcompetitors. 2. Breakthrough improvement. ⚫ Increased partnership between design and manufacturing. ⚫ Continued existenceof the basicorganization of design labs and manufacturing. ⚫ Support of managers at least two levels above theworking level. 3. Characterization of thecurrent process. ⚫ Too many design and manufacturing tasks were performed sequentially. 4. Create the target process Thecore team created a model for the new development process. 5. Verify the new process test the new process. 6. Implement across the product lineThis activity required training of personnel, documentation of the new standards and procedures, and improvements to information systems. 7. Measure resultsand improvePerformanceof the new design was measured.
  • 70.
    6. REQUIREMENTS ANALYSIS ⚫RequirementsIt is a informal descriptions of what thecustomerwants. ⚫ A functional requirement states what the system mustdo. ⚫ A nonfunctional requirementIt can be physical size, cost, powerconsumption, design time, reliability, and soon. Requirementsof tests ⚫ CorrectnessRequirements should not mistakenly describewhat thecustomerwants. ⚫ UnambiguousnessRequirements document should be clearand haveonly one plain language interpretation. ⚫ Completeness Requirements all should be included. ⚫ Verifiability cost-effectiveway to ensure thateach requirement is satisfied in the final product. ⚫ ConsistencyOne requirement should not contradict anotherrequirement. ⚫ ModifiabilityThe requirements document should be structured so that itcan be modified to meetchanging requirements without losing consistency. ⚫ TraceabilityAbleto trace forward /backward from the requirements.
  • 71.
    7) SPECIFICATIONS ⚫ SpecificationsItis a detailed descriptions of thesystem thatcan be used tocreate thearchitecture. Control-oriented specification languages ⚫ SDL specifications include states, actions, and both conditional and unconditional transitions between states. ⚫ SDL isan event-oriented state machine model. ⚫ Statechart has some important concepts. ⚫ Statecharts allow states to be grouped togetherto show common functionality.
  • 72.
    ⚫ Basicgroupings(OR) ⚫ Statemachine specifies that the machinegoes to state s4 from any of s1, s2, ors3 when theyreceive the input i2. ⚫ The Statechartdenotes thiscommonality bydrawing an OR statearound s1, s2, and s3 . ⚫ Single transition outof the OR states123 specifies that the machinegoes to s4 when it receives the i2 input while in any state included in s123. ⚫ Multiple ways toget into s123 (via s1 ors2), and transitions between stateswithin the OR state (from s1 tos3 ors2 tos3). ⚫ The OR state is simply a tool for specifying some of the transitions relating to these states.
  • 73.
    ⚫ Basicgroupings(AND) ⚫ Inthe Statechart, the AND state sab is decomposed into two components, saand sb. ⚫ When the machine enters the AND state, itsimultaneously inhabits the states1 of component sa and thestates3 of component sb. ⚫ When itenters sab, thecomplete stateof the machine requires examining both saand sb. ⚫ States1-3 in the Statechart machine having its sacomponent in s1 and its sbcomponent in s3. ⚫ When exit from cluster states go to s5 only when in the traditional specification, we are in states2-4 and receive input r.
  • 74.
    1) Advanced specifications ⚫Itensure thecorrectness and safetyof thissystem. Ex Traffic Alertand Collision Avoidance System(TCAS) ⚫ It isacollision avoidance system foraircraft. ⚫ TCAS unit in an aircraft keeps track of the position of other nearby aircraft. ⚫ It uses pre-recorded voice (“DESCEND!) commands for mid-aircollision. ⚫ TCAS makes sophisticated decisions in real timeand is clearly safety critical. ⚫ It mustdetect as many potential collision events as possible . ⚫It mustgeneratea few falsealarms ,at extreme maneuvers in potentially dangerous. TCAS-II specification(RSML Language) Transition states
  • 75.
    Collision Avoidance system ⚫Thesystem has Power-off and Power-on states . ⚫ In the poweron state, the system may be in Standby or Fully operational mode. ⚫ In the Fully operational mode, threecomponents areoperating in parallel, as specified by the AND state. ⚫ The own aircraft subsystem to keep track of up to 30 otheraircraft. ⚫ Subsystem to keep track of up to 15 Mode S ground stations, which provide radar information.
  • 76.
    8. SYSTEM ANALYSISAND ARCHITECTURE DESIGN ⚫ The CRC card methodologyanalyze and understanding theoverall structure of acomplex system. CRC cards ⚫ Classesdefine the logical groupings of dataand functionality. ⚫ Responsibilities describewhat theclasses do. ⚫ Collaboratorsare theotherclasses with which agiven class works. ⚫ It has space towrite down theclass name, its responsibilities and collaborators, and other information. Layoutof CRC card
  • 77.
    ⚫ A classmay represent a real-world objectof thesystem. ⚫ A class has both an internal stateand a functional interface. ⚫ The functional interface describes theclass’s capabilities. ⚫ The responsibility set is describing that functional interface. ⚫ Thecollaboratorsof aclass aresimply theclasses that it talksor calls upon to help itdo its work. ⚫ CRC card Analysis Process 1. Develop an initial listof classesWrite down theclass name and functions of it. 2. Writean initial listof responsibilities and collaborators. 3. Createsome usage scenariosdescribewhat thesystem does. 4. Walk through the scenariosEach person on the team represents one or more classes. 5. Refine theclasses, responsibilities, and collaborators make changes to the CRC cards. 6. Add class relationships subclass and super-class can beadded to thecards.
  • 78.
    Ex:Elevator system 1. Onepassengerrequestsa caron a floor, gets in thecarwhen it arrives, requests anotherfloor, and getsout when thecarreachesthat floor. 2. One passengerrequestsacaron a floor, gets in the carwhen it arrives, and requests the floor that thecar is currentlyon. 3. A second passengerrequests acarwhileanotherpassenger is riding in the elevator. 4. Two people push floor buttons on different floorsat the same time. 5. Twopeople push carcontrol buttons in different carsat thesame time.
  • 80.
    1.9) Quality Assurancetechniques(QA) ⚫ Thequalityassurance (QA) process isvital for the delivery of a satisfactory system. ⚫ International Standards Organization (ISO) has created a setof qualitystandards known as ISO 9000. ⚫ Itwas created toapply toa broad rangeof industries, including limited toembedded hardwareand software. ISO 9000 quality management parameters ⚫ Process is crucialKnowing what steps are to be followed tocreatea high-quality product. ⚫ Documentation is importanthelps internal quality monitoring groups toensure that the required processes and helps outside groups understand the processes and how they are being implemented. ⚫ Communication is important people should understand not only theirspecific tasks but also how their jobs can affect overall system quality.
  • 81.
    Capability Maturity Model(CMM) ⚫ It is used to measuring the qualityof an organization’s softwaredevelopment. 1. InitialA poorly organized process, with very few well-defined processes. Successof a projectdepends on the efforts of individuals, not theorganization itself. 2. Repeatable provides basic tracking mechanisms to understand cost, scheduling . 3. DefinedThe management and engineering processes aredocumented and standardized. 4. Manageddetailed measurementsof the development process and product quality. 5. Optimizingfeedback from detailed measurements is used tocontinually improve theorganization’s processes.
  • 82.
    ⚫ Verifying thespecificationDiscovering bugs early is crucial because it prevents bugs from being released tocustomers, minimizes design costs, and reduces design time. ⚫ Validation of specificationscreating the requirements, including correctness, completeness, consistency, and soon Design reviews ⚫ The review leadercoordinates the pre-meeting activities, thedesign review itself, and the post-meeting follow-up. ⚫ The reviewerrecords the minutes of the meeting so thatdesigners and others know which problems need to be fixed. ⚫ The reviewaudience studies thecomponent.
  • 83.
    1.10 DESIGNING WITHCOMPUTING PLATFORM 1.10.1 System Architecture ⚫ Thearchitectureof an embedded computing system includes both hardware and softwareelements HARDWARE ⚫ CPU Thechoiceof the CPU is one of the most important, but it can be considered the software thatwill executeon the machine. ⚫ Bus Thechoiceof a bus is closelytied to thatof a CPU,bus can handle the traffic. ⚫ MemorySelectiondepends total size and speed of the memorywill playa largepart in determining system performance. ⚫ Inputand outputdevices Dependig upon the system requirements
  • 84.
    SOFTWARE RunTimecomponents ⚫ It isacritical partof the platform. ⚫ An operating system is required tocontrol CPU and its multiple processes . ⚫ A file system is used in manyembedded systems toorganize internal dataand interfacewithothersystems Supportcomponents ⚫ It is acomplex hardwareplatform. ⚫ Withoutpropercodedevelopmentand operating system, the hardware itself is useless.
  • 85.
  • 86.
    1.10.2)The PC asa Platform
  • 87.
    ⚫ CPU providesbasiccomputational facilities. ⚫ RAM is used forprogram storage. ⚫ ROMholds the bootprogram. ⚫ DMAcontrollerprovides DMA capabilities. ⚫ Timers used by theoperating system foravarietyof purposes. ⚫ High-speed busconnected tothe CPU bus througha bridge, allows fastdevices tocommunicatewith the restof the system. ⚫ low-speed bus providesan inexpensive way toconnectsimpler devices.
  • 88.
    1.10.3 Development Environments ⚫Development process  used to makeacompletedesign of the system. ⚫ It guides thedevelopers how to design a system . ⚫ An embedded computing system has CPU ,memory, I/O devices. ⚫ Development of embedded system have both hardware& software. ⚫Thesoftwaredevelopment on a PC orworkstation known asa host. •The hostand target are frequentlyconnected bya USB link. •Thetarget must includea small amountof software to talk to the host system.
  • 89.
    Functions of Hostsystem ⚫Load programs into the target ⚫ Startand stop program execution on the target ⚫Examine memoryand CPU registers. Cross-Compiler ⚫ Compiler kind of software that translateone form of pgm toanother form of pgm. ⚫ Cross Compilerisacompiler that runson one typeof machine butgenerates ⚫ code foranother ⚫ Aftercompilation, theexecutable code is downloaded to theembedded system bya serial link. ⚫ A PC orworkstation offers a programming environment . ⚫ Butone problem with thisapproach emergeswhen debugging code talks to I/O devices. ⚫ Testbenchprogram can be built to helpdebug theembedded code. ⚫ It mayalso take the outputvalues and compare them againstexpected values.
  • 90.
    1.10.4Debugging Techniques ⚫ Itis the processof checking errorsand correcting thoseerrors. ⚫ It can bedone bycompiling and executing thecodeon a PC orworkstation. ⚫It can be performed by both H/W and S/W sides. Softwaredebugging tools 1. Serial Porttool ⚫ It will perform thedebugging process from the initial stateof embedded system design. ⚫ It can be used notonly fordevelopment debugging butalso for diagnosing problems in the field. 2. Breakpointstool ⚫ userto specify an addressatwhich the program’sexecution is to break. ⚫ When the PC reaches that address, control is returned to the monitor program. ⚫ From the monitor program, the usercan examine and/or modify CPU registers, afterwhichexecution can becontinued.
  • 91.
    Breakpoint is alocation in memoryatwhicha program stops executing and returns to thedebugging tool or monitor program. Toestablisha breakpointat location 0x40c in some ARM code, replaced the branch (B) instruction with a subroutinecall (BL) to the breakpoint handling routine
  • 92.
    ⚫ Hardwaredebugging tools ⚫Hardwarecan bedeployed togive aclearerview on what is happening when the system is running. 1. MicroprocessorIn-Circuit Emulator (ICE) ⚫ It is a specialized hardwaretool that can helpdebug software in a working embedded system. ⚫ In-circuit emulator is a special version of the microprocessor thatallows its internal registers to be read out when it is stopped 2. Logic Analyer ⚫ Theanalyzercan sample manydifferent signalssimultaneously butcan display only 0, 1, orchanging values foreach. ⚫ The logicanalyzerrecordsthevalues on the signals into an internal memory and then displays the resultson adisplay once the memory is full.
  • 93.
    Architecture of alogic analyzer
  • 94.
    Data modes oflogic analyzer State modes ⚫ State mode representdifferent waysof sampling thevalues. ⚫ It uses theown clock tocontrol sampling ⚫ It sampleseach signal onlyone perclock cycle. ⚫It has less memory to storeagiven numberof system clock. Timing modes ⚫ Timing mode usesan internal clock that is fastenough to take several samples perclock period in a typical system.
  • 95.
    1.10.5)Debugging Challenges ⚫ Logicalerrors in softwarecan be hard totrack down and itwill create many problems in real timecode. ⚫ Real-timeprogramsare required to finish theirwork withina certain amountof time. ⚫ Run time pgm run too long, theycan createvery unexpected behavior. ⚫ Missing of Deadline makes debugging processas difficult.
  • 96.
    1.11 Consumer ElectronicArchitecture ⚫ Consumerelectronicrefers to anydevice containing an electroniccircuit board that is intended foreneryday use by individuals. ⚫ EgTV,cameras,digital cameras,calculators,DVDs,audio devices,smart phones etc.., 1.11..1)Functional Requirements 1. Multimedia ⚫ The media may beaudio, still images, orvideo. ⚫ These multimedia objectsaregenerallystored in compressed form and must be uncompressed to be played . ⚫ Eg multimedia compression standards (MP3,Dolby Digital(TM)) ⚫ audio; JPEG forstill images; MPEG-2, MPEG-4, H.264, etc. forvideo. 2. Data storage and management Peoplewant to selectwhat multimedia objects they save or play, data storage goes hand-in-hand with multimedia capture and display. Many devices provide PC-compatible file systems so that data can be shared moreeasily. 3. Communications Communications may be relativelysimple, such asa USB ⚫ and another is Ethernet port oracellulartelephone link.
  • 97.
    1.11.2)Non-Functional Requirements ⚫ Manydevicesare battery-operated, which means that they mustoperate under strictenergy budgets. ⚫ Battery(75mW) support not only the processors butalso the display, radio, etc. ⚫ Consumer electronics must also be very inexpensive but provide very high performance.
  • 98.
    ⚫ usecase forselecting and playing a multimedia object (audio clip, a picture,etc.). ⚫ Selecting an object makes useof both the user interface and the file system. ⚫ Playing also makes useof the file system aswell as thedecoding subsystemand I/O subsystem. Use case for playing multimedia
  • 99.
    Use case ofsynchronizing with a host system ⚫ usecase forconnecting toaclient. ⚫ Theconnection may beeitherovera local connection like USB orover the Internet. ⚫ Someoperations may be performed locallyon theclient device ⚫ mostof thework is done on the hostsystem while theconnection is established
  • 100.
  • 101.
    ⚫ It isa two-processorarchitecture. ⚫ If morecomputation is required, more DSPs and CPUs may beadded. ⚫ The RISC-CPU runs theoperating system, runs the user interface, maintains the file system, etc. ⚫ DSP it is a programmableone, which performs signal processing. ⚫ Operating system runson the CPU must maintain processes and the file system. ⚫ Depending on thecomplexity of thedevice, theoperating system may not need tocreate tasksdynamically. ⚫ If all taskscan becreated using initialization code, theoperating system can be madesmallerand simpler.
  • 102.
    1.11.4 Flash FileSystems ⚫ Manyconsumerelectronicsdevices use flash memory for mass storage. ⚫ Flash memory is a type of semiconductor memory ,unlike DRAM or SRAM, provides permanentstorage. ⚫ Valuesare stored in the flash memorycell as electricchargeusing a specialized capacitorthatcan storethecharge foryears. ⚫ The file system of adevice is typically shared witha PC. ⚫ Standard file systemhas two layers.bottom layer handles physical reads and writes on the storage device and the top layer provides a logical viewof the file system. ⚫ Flash file systemimposesan intermediate layer thatallows the logical- to-physical mapping of files to bechanged.
  • 103.
    1.12 Platform-Level PerformanceAnalysis ⚫ System-Level Performance involves much more than the CPU. ⚫ To move data from memory to the CPU to process it. Toget thedata from memory to the CPU we must. 1. Read from the memory. 2. Transferover the bus to thecache. 3. Transferfrom thecache to the CPU.
  • 104.
    ⚫ Theperformance ofthe system based on Bandwidth of the system. ⚫ We can increase bandwidth in twoways: 1) By increasing the clock rateof the bus 2) By increasing theamount of data transferred perclock cycle. Forexample, bus tocarry four bytesor 32 bits per transfer, wewould reduce the transfer time to 0.058 s. If wealso increase the busclock rate to 2 MHz, then wewould reduce the transfer time to 0.029 s ,which is within our time budget for the transfer. t=TP tbuscyclecounts Tbus cycles. pbusclock period
  • 105.
    1. Parallelism ⚫ Directmemoryaccess is aexampleof parallelism. ⚫ DMA was designed tooff-load memory transfers from the CPU. ⚫ The CPU can dootheruseful work while the DMA transfer is running.