Docsity

Embedded Computing Systems Solutions, Exams of Computer Science

Toggle sidebar
bg1
Embedded computing systems 10CS72
Dept of CSE, SJBIT Page 1
VTU Question paper solutions
UNIT 1
1. Give the characteristics and constraint of embedded system? Jun 14
Embedded
computing
is in many ways much more
demanding
than the sort
o
f
programs
that you may have
written
for PCs or
workstations. Functionality is
important
in both
general-purpose computing
and
embedded computing, but embedded applications
must
meet many other
constraints
as
w
ell.
■
Comple
x
algorithms:
The
operations performed
by the
microprocessor
ma
y
be very
sophisticated.
For
example,
the
microprocessor
that controls
an
automobile engine
must
perform
complicated
filtering
functions
to opti- mize the
performance
of the car
while minimizing pollution
and
fuel
utilization.
■
User
interface:
Microprocessors
are
frequently
used to control
complex user
interfaces
that may
include multiple
menus and many
options.
The
moving
maps in Global
Positioning
System (GPS)
navigation
are good
examples of
sophisticated
user
interf
aces.
■
Real time:
Many
embedded computing
systems have to perform in real
time—
if the data
is not ready by a
certain deadline,
the system breaks. In some
cases,
failure to meet a
deadline
is unsafe and can even
endanger
lives. In other
cases,
missing a
deadline
does not
create
safety
problems
but does
create unhappy
customers—missed deadlines
in
printers,
for
e
xample,
can result in
scr
amb
led pages.
■
Multirate:
Not only must
operations
be
completed
by
deadlines,
but
man
y embedded
computing
systems have several real-time
activities
going on
at
the same time. They may
simultaneously
control some
operations
that
r
u
n
at slow rates and others that run at high
rates.
Multimedia applications ar
e
prime
examples
of
multirate
behavior.
The audio and
video portions of
a
multimedia
stream run at very different rates, but they must remain
c
losely synchronized.
Failure to meet a
deadline
on either the audio or video
por
tions
spoils
the
perception
of the entire
p
r
esentation.
■
Manufacturing cost:
The total cost of
building
the system is very
important in
many
cases.
Manufacturing
cost is
determined
by many factors,
including the
type of
microprocessor
used, the amount of memory
required,
and the
types
of
I/O
devices.
■
P
o
w
e
r
and
ener
g
y
: Power
consumption directly
affects the cost of
the
hardware,
since a larger
power supply
may be
necessary.
Energy con-
sumption
affects
battery
life,
which
is
important
in many
applications,
as well as heat
consumption, which
can be
important
even in
desktop applications.
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41
pf42
pf43
pf44
pf45
pf46
pf47
pf48
pf49
pf4a
pf4b
pf4c
pf4d
pf4e
pf4f
pf50
pf51
pf52
pf53
pf54
pf55
pf56
pf57
pf58
pf59
pf5a
pf5b
pf5c
pf5d
pf5e
pf5f
pf60
pf61
pf62
pf63
pf64

Partial preview of the text

Download Embedded Computing Systems Solutions and more Exams Computer Science in PDF only on Docsity!

VTU Question paper solutions

UNIT 1

1. Give the characteristics and constraint of embedded system? Jun 14

Embedded computing is in many ways much more demanding than the sort of programs

that you may have written for PCs or workstations. Functionality is important in both

general-purpose computing and embedded computing, but embedded applications must

meet many other constraints as well.

■ Complex algorithms: The operations performed by the microprocessor may be very sophisticated. For example, the microprocessor that controls an automobile engine must perform complicated filtering functions to opti- mize the performance of the car while minimizing pollution and fuel utilization.

■ User interface: Microprocessors are frequently used to control complex user interfaces that may include multiple menus and many options. The moving maps in Global Positioning System (GPS) navigation are good examples of sophisticated user interfaces.

■ Real time: Many embedded computing systems have to perform in real time— if the data is not ready by a certain deadline, the system breaks. In some cases, failure to meet a deadline is unsafe and can even endanger lives. In other cases, missing a deadline does not create safety problems but does create unhappy customers—missed deadlines in printers, for example, can result in scramb led pages.

■ Multirate: Not only must operations be completed by deadlines, but many embedded computing systems have several real-time activities going on at the same time. They may simultaneously control some operations that r u n at slow rates and others that run at high rates. Multimedia applications ar e prime examples of multirate behavior. The audio and video portions of a multimedia stream run at very different rates, but they must remain closely synchronized. Failure to meet a deadline on either the audio or video por tions spoils the perception of the entire pr esentation.

■ Manufacturing cost: The total cost of building the system is very important in many cases. Manufacturing cost is determined by many factors, including the type of microprocessor used, the amount of memory required, and the types of I/O devices.

■ Pow er and ener g y: Power consumption directly affects the cost of the hardware, since a larger power supply may be necessary. Energy con- sumption affects battery life, which is important in many applications, as well as heat consumption, which can be important even in desktop applications.

2. Explain the challenges in embedded computing system design. Jun 14/Jan 14

External constraints are one important source of difficulty in embedded system design. Let’s consider some important problems that must be taken into account in embedded system design.

How much hardware do we need? We have a great deal of control over the amount of computing power we apply to our problem. We cannot only select the type of microprocessor used, but also select the amount of memor y, the peripheral devices, and more. Since we often must meet both performance deadlines and manufacturing cost constraints, the choice of hardware is important—too little hardware and the system fails to meet its deadlines, too much hardware and it becomes too expensive.

How do we meet deadlines? The brute force way of meeting a deadline is to speed up the hardware so that the program runs faster. Of course, that makes the system more expensive. It is also entirely possible that increasing the CPU clock rate may not make enough dif f e r ence to execution time, since the program’s speed may be limited by the memory system.

How do we minimize power consumption? In battery-powered applications, power consumption is extremely important. Even in nonbattery applications, excessive power consumption can increase heat dis- sipation. One way to make a digital system consume less power is to make it un more slowly, but naively slowing down the system can obviously lead to missed deadlines. Careful design is required to slow down the noncritical par ts of the machine for power consumption while still meeting necessary performance goals.

How do we design for upg rada bility? The hardware platform may be used over several product generations, or for several different versions of a product in the same generation, with few or no changes. However, we want to be able to add features by changing software. How can we design a machine that will provide the required performance for software that we haven’t yet written?

How Does it Really work? Reliability is always important when selling products— customers rightly expect that products they buy will work. Reliability is especially important in some appli- cations, such as safety-critical systems. If we wait until we have a running system and try to eliminate the bugs, we will be too late—we won’t find enough bugs, it will be too expensive to fix them, and it will take too long as well. Another set of challenges comes from the characteristics of the components and systems them- selves. If workstation programming is like assembling a machine on a bench, then embedded system design is often more like working on a car—cramped, delicate, and

hardware we need. Based on those components, we can finally build a complete system.

In this section we will consider design from the top–down —we will begin with the most abstract description of the system and conclude with concrete details. The alternative is a bottom–up view in which we start with components to build a system. Bottom–up design steps are shown in the figure as dashed-line arrows. We need bottom–up design because we do not have perfect insight into how later sta ge s of the design process will turn out. Decisions at one stage of design are based upon estimates of what will happen later: How fast can we make a particular function run? How much memory will we need? How much system bus capacity do we need? If our estimates are inadequate, we may have to backtrack and amend our or iginal decisions to take the new facts into account. In general, the less experience we have with the design of similar systems, the more we will have to rely on bottom-up design information to help us refine the system But the steps in the design process are only one axis along which we can vie w embedded system design. We also need to consider the major goals of the design:

4. Explain model train control system? Jan 14

MODEL TRAIN CONTROLLER

In order to learn how to use UML to model systems, we will specify a simple system, a model train controller, which is illustrated in Figure 1.14. The user sends messa ge s to the train with a control box attached to the tracks. The control box may have familiar controls such as a throttle, emergency stop button, and so on. Since the train receives its electrical power from the two rails of the track, the control box can send signals to the train over the tracks by modulating the power supply volta ge .The control panel sends packets over the tracks to the r eceiver on the train. The train includes analog electronics to sense the bits being transmitted and a control system to set the train motor’s speed and direction based on those commands. Each packet includes an address so that the console can control several trains on the same track; the packet also includes an error correction code (ECC) to guard against transmission errors. This is a one-way communication system—the model train cannot send commands back to the user.

5. Discuss the requirements chart with an example Jan 2015

Clearly, before we design a system, we must know what we are designing. Theinitial stages of the

design process capture this information for use in creating thearchitecture and components. We

generally proceed in two phases: First, we gatheran informal description from the customers known

as requirements, and we refinethe requirements into a specification that contains enough information to begindesigning the system architecture.

Performance: The speed of the system is often a major consideration both forthe usability of the

system and for its ultimate cost. As we have noted, performancemay be a combination of soft

performance metrics such as approximatetime to perform a user-level function and hard deadlines

by which a particularoperation must be completed. ■ Cost: The target cost or purchase price for the system is almost always aconsideration. Cost

typically has two major components: manufacturingcost includes the cost of components and

assembly; nonrecurring engineering (NRE) costs include the personnel and other costs of

designing thesystem.

■ Physical size and weight: The physical aspects of the final system can varygreatly depending

upon the application. An industrial control system for anassembly line may be designed to fit into a standard-size rack with no strictlimitations on weight. A handheld device typically has tight

requirements onboth size and weight that can ripple through the entire system design.

■ Power consumption: Power, of course, is important in battery-poweredsystems and is often

important in other applications as well. Power can bespecified in the requirements stage in terms of

battery life—the customer isunlikely to be able to describe the allowable wattage.

Name

Purpose

Inputs Outputs

Functions

Performance

Manufacturing cost

Power

Physical size and weight

Requirements analysis for big systems can be complex and time consuming.However, capturing a

relatively small amount of information in a clear, simple formatis a good start toward understanding

system requirements. To introduce thediscipline of requirements analysis as part of system design, we will use a simplerequirements methodology.

Figure above shows a sample requirements form that can be filled out at thestart of the project. We

can use the form as a checklist in considering the basiccharacteristics of the system. Let’s consider

the entries in the form:

■ Name: This is simple but helpful. Giving a name to the project not only simplifiestalking about it

to other people but can also crystallize the purpose ofthe machine.

■ Purpose: This should be a brief one- or two-line description of what the systemis supposed to do.

If you can’t describe the essence of your system in one ortwo lines, chances are that you don’t understand it well enough.

■ Inputs and outputs: These two entries are more complex than they seem.Theinputs and outputs to

the system encompass a wealth of detail:

— Types of data: Analog electronic signals? Digital data? Mechanical inputs?

— Data characteristics: Periodically arriving data, such as digital audiosamples? Occasional user

inputs? How many bits per data element?

The role of the formatter during the panel’s operation is illustrated by thesequence diagram of

above figurethe figure shows two changes to the knob settings:first to the throttle, inertia, or emergency stop; then to the train number. Thepanel is called periodically by the formatter to

determine if any control settingshave changed. If a setting has changed for the current train, the

formatter decidesto send a command, issuing a send-command behavior to cause the transmitter

tosend the bits. Because transmission is serial, it takes a noticeable amount of time forthe

transmitter to finish a command; in the meantime, the formatter continues to check the panel’s

control settings. If the train number has changed, the formattermust cause the knob settings to be reset to the proper values for the new train.

7) Explain the UML class diagram for signal and time out events. Jan 2015

An event is some type of action. The event may originate outside the system, suchas a user pressing

a button. It may also originate inside, such as when one routinefinishes its computation and passes the result on to another routine. We will concentrateon the following three types of events defined

by UML, as illustrated in above figure

■ A signal is an asynchronous occurrence. It is defined in UML by an object thatis labeled as a

<< signal >>. The object in the diagram serves as a declarationof the event’s existence. Because it is

an object, a signal may have parametersthat are passed to the signal’s receiver.

■ A call event follows the model of a procedure call in a programming language.

■ A time-out event causes the machine to leave a state after a certain amountof time. The label

tm(time-value) on the edge gives the amount of time afterwhich the transition occurs. A time-out is generally implemented with an

8. Define Embedded System. Explain the embedded system process.

(12 Marks) June-july 2015

But the steps in the design process are only one axis along which we can view embedded system

design.We also need to consider the major goals of the design:

■ manufacturing cost;

■ performance (both overall speed and deadlines); and

■ power consumption.

We must also consider the tasks we need to perform at every step in the design

process. At each step in the design,we add detail: ■ We must analyze the design at each step to determine how we can meet the

specifications.

■ We must then refine the design to add detail.

■ And we must verify the design to ensure that it still meets all system goals,

such as cost, speed, and so on.

Requirements: may be functional or nonfunctional .Wemust of course capture the basic functions

of the embedded system,but functional description is often not sufficient.Typical nonfunctional

requirements include:

■ Performance : The speed of the system is often a major consideration both for the usability of the

system and for its ultimate cost. As we have noted, performance may be a combination of soft performance metrics such as approximate time to perform a user-level function and hard deadlines

by which a particular operation must be completed.

the display.We have chosen to separate those functions so that we can potentially do them in

parallel—performing rendering

Designing Hardware and Software Components

The architectural description tells us what components we need. The component design effort builds those components in conformance to the architecture and specification. The components will in general include both hardware—FPGAs, boards, and so on—and software modules. Some of the components will be ready-made. The CPU, for example, will be a standard component in almost all cases, as will memory chips and many other components. In the moving map, the GPS receiver is a good example of a specialized component that will nonetheless be a predesigned, standard component. We can also make use of standard software modules. One good example is the topographic database. Standard topographic databases exist, and you probably want to use standard routines to access the database—not only is the data in a predefined format, but it is highly compressed to save storage. Using standard software for these access functions not only saves us design time, but it may give us a faster implementation for specialized functions such as the data decompression phase. System Integration Only after the components are built do we have the satisfaction of putting them together and seeing a working system. Of course, this phase usually consists of a lot more than just plugging everything together and standing back. Bugs are typically found during system integration, and good planning can help us find the bugs quickly. By building up the system in phases and running properly chosen tests,we can often find bugs more easily. If we debug only a few modules at a time, we are more likely to uncover the simple bugs and able to easily recognize them.

9.Define digital Command control(DCC) Explain the conceptual specification of a model.

(08 M) June/July 2015

2The DCC standard is given in two documents: ■ Standard S-9.1, the DCC Electrical Standard, defines how bits are encoded on the rails for transmission. ■ Standard S-9.2, the DCC Communication Standard, defines the packets that carry information.

Conceptual Specification Digital Command Control specifies some important aspects of the system, particularly those that allow equipment to interoperate. But DCC deliberately does not specify everything about a model train control system.We need to round out our specification with details that complement the DCC spec. A conceptual specification allows us to understand the system a little better.We will use the experience gained by writing the conceptual specification to help us write a detailed specification to be given to a system architect. This specification does not correspond to what any commercial DCC controllers do, but it is simple enough to allow us to cover some basic concepts in system design. train control system turns commands into packets .A command comes from the command unit while a packet is transmitted over the rails. Commands and packets may not be generated in a 1-to-1 ratio. In fact, the DCC standard says that command units should resend packets in case a packet is dropped during transmission.

Fig 2: Class diagram for the train controller messages.

Fig 3: A UML class diagram for the train controller showing the composition of the subsystems.

computing and embedded computing, but embedded applications must meet many other constraints

as well. On the one hand, embedded computing systems have to provide sophisticated functionality:

■ Complex algorithms: The operations performed by the microprocessor may be very sophisticated.

For example, the microprocessor that controls an automobile engine must perform complicated

filtering functions to optimize the performance of the car while minimizing pollution and fuel

utilization.

■ User interface: Microprocessors are frequently used to control complex user interfaces that may

include multiple menus and many options. The moving maps in Global Positioning System (GPS)

navigation are good examples of sophisticated user interfaces. To make things more difficult,

embedded computing operations must often be performed to meet deadlines:

■ Real time: Many embedded computing systems have to performin real time— if the data is not

ready by a certain deadline,the system breaks. In some cases, failure to meet a deadline is unsafe

and can even endanger lives. In other cases, missing a deadline does not create safety problems but

does create unhappy customers—missed deadlines in printers,for example,can result in scrambled

pages.

■ Multirate: Not only must operations be completed by deadlines, but many embedded computing

systems have several real-time activities going on at the same time. They may simultaneously

control some operations that run at slow rates and others that run at high rates. Multimedia

applications are

prime examples of multirate behavior. The audio and video portions of a multimedia stream run at

very different rates, but they must remain closely synchronized. Failure to meet a deadline on either

the audio or video portions spoils the perception of the entire presentation. Costs of various sorts

are also very important:

■ Manufacturing cost: The total cost of building the system is very important inmany cases.

Manufacturing cost is determined by many factors, including the type of microprocessor used, the

amount of memory required, and the types of I/O devices.

■ Power and energy: Power consumption directly affects the cost of the hardware, since a larger

power supply may be necessary. Energy consumption affects battery life, which is important in

many applications, as well as heat consumption, which can be important even in desktop

applications.

11) Explain embedded system design process with respect to GPS moving Map.

( 10 Marks) Dec

Requirements

The moving map is a handheld device that displays for the user a map of the terrain around the

user’s current position; the map display changes as the user and the map device change position.

The moving map obtains its position from the GPS, a satellite-based navigation system.

The moving map display might look something like the following figure.

What requirements might we have for our GPS moving map? Here is an initial list:

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 : $

Designing Hardware and Software Components

The architectural description tells us what components we need. The component design effort

builds those components in conformance to the architecture and specification. The components will

in general include both hardware—FPGAs, boards, and so on—and software modules. Some of the

components will be ready-made. The CPU, for example, will be a standard component in almost all

cases, as will memory chips and many other components. In the moving map, the GPS receiver is a

good example of a specialized component that will nonetheless be a predesigned, standard

component. We can also make use of standard software modules. One good example is the

topographic database. Standard topographic databases exist, and you probably want to use standard

routines to access the database—not only is the data in a predefined format, but it is highly

compressed to save storage. Using standard software for these access functions not only saves us

design time, but it may give us a faster implementation for specialized functions such as the data

decompression phase.

12) Draw and explain the sequence diagram for transmitting a control input in a model train

controller. ( 06 Marks) Dec

The Transmitter provides a distinct behavior for each type of message that can be sent; it internally

takes care of formatting the message. The Receiver class provides a read-cmd behavior to read a

message off the tracks.We can assume for now that the receiver object allows this behavior to run

continuously to monitor the tracks and intercept the next command. (We consider how to model

such continuously running behavior as processes in Chapter 6.)We use an internal variable to hold

the current command. Another variable holds a flag showing when the command has been

processed. Separate behaviors let us read out the parameters for each type of command; these

messages also reset the new flag to show that the command has been processed.We do not need a

separate behavior for an Estop message since it has no parameters—knowing the type of message is

sufficient. Now that we have specified the subsystems around the formatter and controller, it is

easier to see what sorts of interfaces these two subsystems may need.The formatter holds the

current control settings for all of the trains.The send-command method is a utility function that

serves as the interface to the transmitter. The operate function performs the basic actions for the

object.At this point,we only need a simple specification,which states that the formatter repeatedly

reads the panel,determines whether any settings have changed, and sends out the appropriate

messages. The panel-active behavior returns true whenever the panel’s values do not correspond to

the current values. The role of the formatter during the panel’s operation is illustrated by the

sequence diagram of Figure

The figure shows two changes to the knob settings:

first to the throttle, inertia, or emergency stop; then to the train number. The panel is called

periodically by the formatter to determine if any control settings have changed. If a setting has

changed for the current train, the formatter decides to send a command, issuing a send-command

behavior to cause the transmitter to send the bits.

13) what is embedded system? Give one example. (02 Marks) June/July 2016

It is any device that includes a programmable computer but is not itself intended to be a general-

purpose computer. Thus, a PC is not itself an embedded computing system, although PCs are often

used to build embedded computing systems. But a fax machine or a clock built from a

microprocessor is an embedded computing system. Automobiles, cell phones, and even household

appliances make extensive use of microprocessors. Designers in many fields must be able to

15 ) Write the top-down view of the embedded system design process and write a requirement

chart of model train controller. (08 Marks ) June/July 2016

Figure below summarizes the major steps in the embedded system design process.

In this top–down view, we start with the system requirements. In the next step, specification , we

create a more detailed description of what we want. But the specification states only how the

system behaves, not how it is built. The details of the system’s internals begin to take shape when

we develop the architecture, which gives the system structure in terms of large components. Once

we know the components we need, we can design those components, including both software

modules and any specialized hardware we need. Based on those components, we can finally build a

complete system.

In this section we will consider design from the top–down —we will begin with the most abstract

description of the system and conclude with concrete details. The alternative is a bottom–up view

in which we start with components to build a system. Bottom–up design steps are shown in the

figure as dashed-line arrows. We need bottom–up design because we do not have perfect insight

into how later stages of the design process will turn out. Decisions at one stage of design are based

upon estimates of what will happen later: How fast can we make a particular function run?

How much memory will we need? How much system bus capacity do we need?

If our estimates are inadequate, we may have to backtrack and amend our original decisions to take

the new facts into account. In general, the less experience we have with the design of similar

systems, the more we will have to rely on bottom-up design information to help us refine the

system.

UNIT 2

1. Differentiate between Harvard and von Neumann architecture. Jun 14

The Harvard architecture is a computer architecture with physically separate storage and signal pathways for instructions and data. The term originated from the Harvard Mark I relay-based computer, which stored instructions on punched tape (24 bits wide) and data in electro-mechanical counters. These early machines had data storage entirely contained within the central processing unit, and provided no access to the instruction storage as data. Programs needed to be loaded by an operator; the processor could not boot itself.

Today, most processors implement such separate signal pathways for performance reasons but actually implement a modified Harvard architecture, so they can support tasks such as loading a program from disk storage as data and then executing it.

Under pure von Neumann architecture the CPU can be either reading an instruction or reading/writing data from/to the memory. Both cannot occur at the same time since the instructions and data use the same bus system. In a computer using the Harvard architecture, the CPU can both read an instruction and perform a data memory access at the same time, even without a cache. A Harvard architecture computer can thus be faster for a given circuit complexity because instruction fetches and data access do not contend for a single memory pathway.

Also, a Harvard architecture machine has distinct code and data address spaces: instruction address zero is not the same as data address zero. Instruction address zero might identify a twenty-four bit value, while data address zero might indicate an eight bit byte that isn't part of that twenty-four bit value.

2. Define ARM processor. Explain advanced ARM features? Jun 14

ARM is a family of instruction set architectures for computer processors based on a reduced instruction set computing (RISC) architecture developed by British company ARM Holdings.

A RISC-based computer design approach means ARM processors require significantly fewer transistors than typical CISC x86 processors in most personal computers. This approach reduces costs, heat and power use. These are desirable traits for light, portable, battery-powered devices— including smart phones, laptops, tablet and notepad computers, and other embedded systems. A simpler design facilitates more efficient multi-core CPUs and higher core counts at lower cost, providing improved energy efficiency for servers.

ARM Holdings develops the instruction set and architecture for ARM-based products, but does not manufacture products. The company periodically releases updates to its cores. Current cores from ARM Holdings support a 32-bit address space and 32-bit arithmetic; the ARMv8-A architecture, adds support for a 64-bit address space and 64-bit arithmetic. Instructions for ARM Holdings' cores