You are on page 1of 4

C O V E R S T O R Y AUTOMOTIV E S OF T WARE

SOFTWARE ARCHITECTURE
WITHOUT AUTOSAR
Autosar is not suited for every embedded software architecture application. Due to its wide-ranging diversity,
Autosar places high demands on the resources provided by the microcontroller and therefore represents a
considerable training effort. There are smaller systems, not only in the automobile but also in the industrial
environment, for which an architecture of this type is simply overkill and too complex. These cases call for a
simple, modular, and universal architecture. This is for instance sufficient for an “electric vehicle (EV) charging
cable”, which is a showcase example for an interface product between industry and automobile applications.

AUTHORS

DR. GALIB KRDZALIC


is Head of the Software Development
and Embedded Systems Department
at Gigatronik in Stuttgart (Germany).

ALEXANDER DRISS
is a Software Developer at Gigatronik
in Stuttgart (Germany).

FIGURE © adventtr/iStockphoto.com

ARCHITECTURE DESCRIPTION design process and therefore the result-


ing software architecture.
In today’s embedded systems, software The software (SW) architecture
increasingly gains in importance due to describes the entire SW system at a
increasingly powerful micro controllers graphic abstraction level using UML (Uni-
(μC). The focus for development is no fied Modeling Language). This places the
longer on hardware design; instead, the focus on the package level view from
two disciplines are increasingly in equi- among the large variety of different UML
librium. By now, software is developed descriptions. The package view is based
using defined processes that have been on components and modules which are
established over time based on the an abstract rendition of the various layers
insight that reliable software develop- pertaining to the hardware. ➊ shows a
ment processes improve the quality of package view as it can be used for embed-
software and therefore the system as a ded systems. The following proposes the
whole. At times, the software develop- thesis that each software of an embedded
ment process encompasses the software system can be described with this pack-

28 www.autotechreview.com
age view representation. level in ① (package view diagram). This
layer has the task of abstracting the
received information and to make it avail-
MODULE STABILITY able to the higher ranking layers. The sig-
nal wrapper module facilitates the simple
As can be seen in ①, the diagram repre- exchange of the μC while the hardware
sents the module overview in its abstract stays the same, for this would require
from. The abstraction increases from bot- adapting the driver layer. This adjustment
tom to top in reference to the hardware. can be quickly and conveniently imple-
The more abstract a module is, the more mented while maintaining the interfaces;
rigid it is to changes in its functionality, the reason for this is the very simple pro-
but it continues to be open to modifica- gramming of the drivers. ➊ Package view for embedded systems
tions [1]. This can easily be recognised in When the μC and the hardware
that the effort for changes grows as the changes, the system can still be ported various processes needed by a system to
number of inputs (includes) for a module very quickly by adapting the drivers and perform its tasks.
increases ①, Eq 1: the signal wrapper when the system
requirements continue to stay the same.
Ce These two layers render the software STATE MACHINE
EQ. 1 I= highly flexible in response to hardware
Ca + Ce
changes and allow the system to be The modules of the described sub-systems
adapted to new platforms relatively easily are used by the next higher layer, the state
I= Instability [0;1], this means that
“0” is equivalent to stable, and “1” instable with minor changes. As is the case with machine. The state machine, whose func-
Ce = output dependencies all other components from other layers, tionality can be regarded as a scheduler,
Ca = input dependencies
the signal wrapper module can be consid- follows a fixed sequence of tasks [2]. The
This formula can be used to deter- ered to be a sub-system which in turn is tasks can be processed in a time- or event-
mine the stability of individual modules. comprised of several individual modules controlled manner. The structure of this
At the same time, the stability calcula- which are then responsible for the respec- sub-system forms a solid foundation for
tion can be used to represent the rela- tive driver, ②. the reuse of systems that need to fulfill
tionship to the module abstraction in the the same program sequence based on dif-
entire system. Stated more clearly: The ferent requirements. The processing of
deeper a module is embedded in the soft- FUNCTIONAL AND states can for instance be based on stand-
ware architecture, the less complex it is, NON-FUNCTIONAL MODULES ards that define a certain sequence for a
①. When considering the drivers in ①, system, allowing this module to be
they strictly have the task to store exter- The functional and non-functional sub- quickly and conveniently adapted for
nal signals (on sensors) in a ring buffer systems, which consist of various mod- other platforms.
or to output signals (to actuators). ules, are embedded above the signal When hardware and/or requirements
wrapper level and below the state change for an already existing embedded
machine level. Due to their existence in system, essentially only the lower ranking
DRIVERS the system it is critical that a large portion layers need to be adjusted if the system
of the system requirements is already sequence remains the same.
Drivers serve as interfaces between the known before the actual software design
actual hardware environment and the is developed. This sub-system is different
abstract software. This layer is needed for for each embedded system because it RUNTIME (OS) AND MAIN
all embedded software systems; otherwise describes the actual system task.
these would not able to respond to their Despite the different tasks performed The runtime (OS) layer is a component of
environment in software or hardware real- by embedded systems, this sub-system is each embedded system in its various ver-
time. The response to soft events is found with other but also the same mod- sions. It is responsible for scheduling
accomplished with polling. This either ules in every software architecture for tasks and the corresponding resources.
involves periodic monitoring of the availa- such a system. The sub-system of non- The top and last layer is the main
ble signals, or immediately storing signals functional requirements does not neces- layer. Its only role is to call the runtime
in a memory buffer via interrupts (hard) sarily have to be present since these (OS) layer repeatedly and to create a cycli-
when they occur, and processing these requirements describe properties of the cal sequence of the system.
signals on the next processing cycle. system that not only flow into the non- Helper modules – frequently needed
functional sub-system but also into the but not always present – do not represent
runtime module. a significant development effort, but are
SIGNAL WRAPPERS Non-functional requirements for frequently not implemented without
instance describe the responsiveness of a defects. A counter is an example for a
The signal wrapper, ❷, is the next higher system, the resource assignments, or the helper module. A counter can be realised

autotechreview A p r il 2 014 Vo lu m e 3 | Is su e 4 29
C O V E R S T O R Y AUTOMOTIV E S OF T WARE

➋ Signal wrapper module ➌ Inserting flexible layers and modules

in a variety of ways – and therein lies the The individual components and modules This facilitates fast and convenient expan-
problem. For this reason, the wide range of a sub-system can be conveniently sion options pertaining to standards still
of implementation options represents the replaced by others using the same in the draft status but also keeps the
weakness as it pertains to the software approach, without this destroying the option at hand to quickly replace the
failure modes. Yet another aspect and also entire system as long as the interfaces micro-controller by adjusting the “signal
a reason for introducing and maintaining remain the same. wrapper” and “driver” layers. The various
helper modules can be the readability of When the functionality of a sub-system charging statuses from the IEC 61851
program codes. or module needs to be changed, this standard have been implemented in hier-
When projects and the whole company becomes increasingly challenging for the archical “State Machines” to facilitate a
use only one type of counter develop- developer the higher the sub-system mod- flexible program sequence in response to
ment, every developer immediately knows ule ranks in the diagram. Due to their retroactive changes.
how the counter works in detail. Moreo- dependencies (inputs), sub-systems or Accordingly, in terms of its flexibility
ver, the counter has already been tested modules of higher ranking abstraction lay- the architecture template is very similar
since it should otherwise not be released ers are fixed in terms of changes since to the Autosar/Jasper architecture in
for reuse. In summary, the software has changes in higher ranking layers can trig- which components can also be conveni-
the following benefits: ger changes in lower ranking layers. ently reused and replaced by employing
:: improved readability Accordingly, this presents the option to unchanging interfaces in various control
:: shorter training insert “flexible” modules/layers in or devices.
:: easier to understand between theses layers, wherein these
:: possibly a better software structure, serve as communication interfaces
since the helper modules always need between the changing and the unchang- CONCLUSION
to be used in the same manner. ing sub-system/module, ❸.
Moreover, helper modules can be created This approach allows the developer to The described model can be quickly and
for the following issues: reuse already existing modules that have conveniently used as a template for
:: data logging already been verified. The module does embedded software architectures. But this
:: diagnostics not need to be changed but is instead does exclude the possibility for system
:: boot loaders amended by a flexible module. This requirements that specify direct communi-
:: signal filters method of expansion allows the reuse of cation between sub-systems/modules.
:: queues certified modules, for instance based on Conversely, the implication for design and
:: RAM/ROM test (patterns) the “safety integrity level”, and to expand architecture is that communication
:: stack overflow these by flexible modules. A recertifica- between sub-systems/modules that goes
:: ALU test tion is not necessary. Only the newly beyond the layers is indispensable – for
:: miscellaneous processing algorithms. amended modules may need to be certi- instance involving direct communication
fied if this is relevant. This allows even between the signal wrapper and the state
safety-critical embedded systems to be machine. Layers are typically skipped
CREATING FLEXIBLE newly developed quickly and with rela- when system performance and response
SOFTWARE ARCHITECTURE tively little effort. speed is a critical consideration.

All embedded systems can be based on REFERENCES


the layers described above. The package APPLICATION [1] Martin, R.C.: Design Principles and Design
Patterns, http://www.objectmentor.com/resources/
view diagram shown above therefore rep- articles/Principles_and_Patterns.pdf, 2000
resents a general software architecture In the embedded software field, [2] Siemers, C.: Handbuch Embedded Systems
approach for embedded systems. When a Gigatronik Stuttgart GmbH uses the Engineering. TU Clausthal, FH Nordhausen Private
FH Göttingen
system is structured as described above, described architecture with its simple and
or when the user wishes to reuse compo- universal structures in the e-mobility seg-
nents from one system in another system, ment. The current architecture for EV
this can be accomplished with relatively charging cables is entirely based in the Read this article on
little effort based on the same interfaces. architecture template, ①, described here. www.autotechreview.com

30 www.autotechreview.com

You might also like