Embedded-System-Design-Concepts_module-4_
Embedded-System-Design-Concepts_module-4_
SYSTEMS (17EC62)
Concepts (Lecture-4)
Characteristics and
Quality Attributes of
Embedded Systems
MTTR = --30
0.9
MTTR = 3.33 days or 80
Shrishail Bhat, Dept. of ECE, AITM Bhatkal hours 19
Operational Quality Attributes
(continued)
5. Security
• Confidentiality, Integrity, and Availability are the three major measures of information security.
• Confidentiality deals with the protection of data and application from unauthorised disclosure.
• Integrity deals with the protection of data and application from unauthorised modification.
• Availability deals with protection of data and application from unauthorized users.
• A very good example of the 'Security' aspect in an embedded product is a Personal Digital Assistant
• (PDA).
• The PDA can be either a shared resource (e.g. PDAs used in LAB setups) or an individual one.
• If it is a shared one there should be some mechanism in the form of a user name and password to access into a
particular person's profile—This is an example of 'Availability'.
• Also all data and applications present in the PDA need not be accessible to all users.
• Some of them are specifically accessible to administrators only.
• For achieving this, Administrator and user levels of security should be implemented —An example of
Confidentiality.
• Some data present in the PDA may be visible to all users but there may not be necessary permissions to alter the
data by the users.
• That is Read Only access is allocated to all users—An example of Integrity.
^oou
ft P1 Oaty i/'PS Svnlmvwati Jp P 9 San Q Pff Hwriy (5 P® Billy E*preas Wash
Carr PI O RmwrSpr » PSCMcaea • P7 Wodcrs • P11 %»n Only
► H\ a O y Li y y a a
a P4 Mta Qn B«Wm( li!/P1BWWh0n»»
I► RinseJ Spin J
AL*0
Water »evel
LOM JT» V
iak Wash, _«
J-Mi U*»
TumbltCare
WORLD SERIES
H2Law | CMJII
Showier 1 Soak
1f
Control Node
b
F
Data Flow Node
r]
| Ignition Key OFF iA/
Waitir
{
Seat Belt ON
w
Mam
Off
d \
V
'\ 1'
larm i
V y
FSM Model for Automatic Seat Belt Warning System
• If a Seat Belt ON' or 'Ignition Key OFF' event occurs during the wait state, the state transitions into
'Alarm Off'.
• When the wait timer expires in the waiting state, the event 'Timer Expire' is generated and it
transitions the state to 'Alarm On' from the 'Waiting' state.
• The 'Alarm On' state continues until a 'Seat Belt ON' or 'Ignition Key OFF' event or 'Alarm Time
Expire' event, whichever occurs first.
• The occurrence of any of these events transitions the state to 'Alarm Off'.
• The wait state is implemented using a timer.
• The timer also has certain set of states and events for state transitions.
• Using the FSM model, the timer can be modelled as shown in the figure.
Or
°P >■
o '^rA
K‘/!h
e
s O
t
c UJ
o s
—
o >
Ui
Task
n();
}
}
Shrishail Bhat, Dept. of ECE, AITM Bhatkal 106
Super Loop Based Approach (continued)
• Almost all tasks in embedded applications are non-ending and are
repeated infinitely throughout the operation.
• This repetition is achieved by using an infinite loop.
• Hence the name 'Super loop based approach'.
• The only way to come out of the loop is either a hardware reset or an
interrupt assertion.
• A hardware reset brings the program execution back to the main loop.
• An interrupt request suspends the task execution temporarily and performs the
corresponding interrupt routine and on completion of the interrupt routine it
restarts the task execution from the point where it got interrupted.
Machine Code
(Hex File)
• When the linker processes a library, only those object modules in the library
that are necessary to create the program are used.
• Library file is some kind of source code hiding technique.
• For example, 'LIB51' from Keil Software is an example for a library creator and it
is used for creating library files for A51 Assembler/C51 Compiler for 8051 specific
controller.
Shrishail Bhat, Dept. of ECE, AITM Bhatkal 125
Assembly Language Based Development
(continued)
• Linker and Locator
• Linker and Locater is another software utility responsible for "linking the various object modules
in a multi-module project and assigning absolute address to each module".
• Linker generates an absolute object module by extracting the object modules from the library, if
any, and those obj files created by the assembler, which is generated by assembling the individual
modules of a project.
• It is the responsibility of the linker to link any external dependent variables or functions declared
on various modules and resolve the external dependencies among the modules.
• An absolute object file or module does not contain any re-locatable code or data.
• All code and data reside at fixed memory locations.
• The absolute object file is used for creating hex files for dumping into the code memory of the
processor/controller.
• 'BL51' from Keil Software is an example for a Linker & Locater for A51 Assembler/C51 Compiler
for 8051 specific controller.
Shrishail Bhat, Dept. of ECE, AITM Bhatkal 126
Assembly Language Based Development
(continued)
• Object to Hex File Converter
• This is the final stage in the conversion of Assembly language (mnemonics) to machine
understandable language (machine code).
• Hex File is the representation of the machine code and the hex file is dumped into the code
memory of the processor/controller.
• The hex file representation varies depending on the target processor/controller make.
• HEX files are ASCII files that contain a hexadecimal representation of target application.
• Hex file is created from the final 'Absolute Object File' using the Object to Hex File Converter
utility.
• 'OH51' from Keil software is an example for Object to Hex File Converter utility for A51
Assembler/C51 Compiler for 8051 specific controller.
Machine Code
(Hex File)
• This C function on cross compilation generates the following assembly SRC file.
• The special compiler directive SRC generates the Assembly code corresponding
to the 'C' function and each lines of the source code is converted to the
corresponding Assembly instruction.
154
Compiler vs. Cross-Compiler
• Compiler is a software tool that converts a source code • Cross-compilers are the software tools used in
written in a high level language on top of a particular crossplatform development applications.
operating system running on a specific target processor • In cross-platform development, the compiler running on a
particular target processor/OS converts the source code to
architecture (e.g. Intel x86/Pentium).
machine code for a target processor whose architecture
• Here the operating system, the compiler program and and instruction set is different from the processor on which
the application making use of the source code run on the compiler is running or for an operating system which is
the same target processor. different from the current development environment OS.
• The source code is converted to the target processor A type of compiler that can create executable code for
different machines other than the machine it runs on
specific machine instructions.
• Embedded system development is a typical example for
• The development is platform specific (OS as well as
cross-platform development.
target processor on which the OS is running). • Embedded firmware is developed on a machine with
• Compilers are generally termed as 'Native Compilers'. Intel/AMD or any other target processors and the same is
• A native compiler generates machine code for the same converted into machine code for any other target processor
machine (processor) on which it is running. architecture (e.g. 8051, PIC, ARM etc).
• Keil C51 is an example for cross-compiler.
• In embedded firmware application, whenever we use
the term 'Compiler' it normally refers to the
crosscompiler.
Shrishail Bhat, Dept. of ECE, AITM Bhatkal 155
References
1. Shibu K V, "Introduction to Embedded Systems", Tata McGraw Hill, 2009.
2. Raj Kamal, "Embedded Systems: Architecture and Programming", Tata
McGraw Hill, 2008.