You are on page 1of 16

CHAPTER-7

DESIGNED METHODOLOGIES AND TOOLS


7.0 Introduction
Process for creating a system.
Many systems are complex:
 Large specifications;
 Multiple designers;
 Interface to manufacturing.
Proper processes improve:
 Quality;
 Cost of design and manufacture.

Design flow: sequence of steps in a design methodology.


May be partially or fully automated.
Use tools to transform, verify design.
Design flow is one component of methodology. Methodology also includes management,
organization, etc.
Waterfall model steps
 Requirements: determine basic characteristics.
 Architecture: decompose into basic modules.
 Coding: implement and integrate.
 Testing: exercise and uncover bugs.
 Maintenance: deploy, fix bugs, upgrade.

7.1 DESIGN METHODOLOGIES

1. WATER FALL MODEL

1
Waterfall model critique
Only local feedback---may need iterations between coding and requirements, for example.
Doesn’t integrate top-down and bottom-up design.
Assumes hardware is given.
2.SPIRAL MODEL

Spiral model critique


 Successive refinement of system.
 Start with mock-ups, move through simple systems to full-scale systems.
 Provides bottom-up feedback from previous stages.
 Working through stages may take too much time.
3. SUCCESSIVE REFINEMENT MODEL

1. Traditional hardware and software codesign methodology


1. Start from some informal specification of functionality and a set of constraints (time and power constraints,
cost limits, etc.)

2
2. Generate a more formal model of the functionality, based on some modeling concept (finite state machine,
data-flow, etc.). This model is in Matlab, State charts, C, UML, VHDL.
Such a model is our task graph.
3. Simulate the model in order to check the functionality. If needed make adjustments.
4. Choose architecture (μprocessor, buses, etc.) such that the cost limits are satisfied and, you hope, that time
and power constraints will be fulfilled.
5. Build a prototype and implement the system.
6. Verify the system: neither time nor power constraints are satisfied!!!

Fig 7.1Traditional design methodology


What are the consequences?
• Delays in the design process
- Increased design cost
- Delays in time to market missed market window
• High cost of failed prototypes
• Bad design decisions taken under time pressure
- Low quality, high cost products

3
7.2MODIFIED METHODOLOGY

Fig 6.2Modified design methodology


FORMAL VERIFICATION
It is impossible to do an exhaustive verification by simulation! Especially for safety critical systems (but not
only) formal verification is needed.
• SIMULATION
Simulation is used not only for functional validation. It is used also after mapping and scheduling in order to
test, for example, timing aspects. It is used also during the implementation steps; especially interesting:
hardware/software co simulation..

4
HARDWARE/SOFTWARE CODESIGN
During the mapping step we also decide what is going to be executed on a programmable processor (software)
and what is going into hardware (ASIC, FPGA).
During the implementation phase, hardware and software components have to be developed in a coordinated
way, keeping their consistency (hardware/software co simulation is important here)
The “Lower Levels”
• Software generation:
- Encoding in an implementation language (C, C++, and assembler).
- Compiling (this can include particular optimizations for application specific processors, DSPs, etc.).
- Generation of a real-time kernel or adapting to an existing operating system.
- Testing and debugging (in the development environment).
• HARDWARE SYNTHESIS:
- Encoding in a hardware description language (VHDL, Verilog)
- Successive synthesis steps: high-level, register-transfer level, logic-level synthesis.
- Testing and debugging (by simulation)
HARDWARE/SOFTWARE INTEGRATION:
- The software is “run” together with the hardware model (co simulation)
• Prototyping:
- A prototype of the hardware is constructed and the software is executed on the target architecture.
7.2 RTOS INTRODUCTION
An RTOS is a class of operating systems that are intended for real time-applications
• What is a real time application?
• A real time application is an application that guarantees both correctness of result and the added constraint of
meeting a deadline.
An operating system which follows the Real Time criteria. Efficiency, Predictability and Timeliness – All
components of an RTOS must have these properties.
“RTOS Platform enables systems developers to create application engines for their high performance,
high-precision systems. “
So what makes an RTOS special?
• An RTOS will provide facilities to guarantee deadlines will be met
• An RTOS will provide scheduling algorithms in order to enable deterministic behavior in the system
• An RTOS is valued more for predictability than throughput.
Most embedded systems are bound to real-time constraints. In production control the various machines have
to receive their orders at the right time to ensure smooth operation of a plant and to fulfill customer orders in

5
time. Railway switching systems obviously have to act in a timely manner. In flight control systems the
situation is even more restrictive. Inside technical artifacts many operations depend on timing, e.g. the control
of turbines or combustion engines. This is just a small fraction of such applications. Even augmented reality
systems are real-time applications as augmenting a moving reality with outdated information is useless or
even dangerous.
One parameter constitutes the main difference between real time and non-real-time: the deadline.
Real-time systems can be characterized by the strictness of real-time restrictions.
A real-time task is called hard if missing its deadline may cause catastrophic consequences on the
environment under control. Typical application areas can be found in the automotive domain when looking at
e.g. power-train control, air-bag control, steer by wire, and brake by wire. In the aeronautics domain engine
control or aerodynamic control may serve as examples.
A RT task is called firm if missing its deadline makes the result useless, but missing does not cause serious
damage. Typical application areas are weather forecast or decisions on stock exchange orders.
A RT task is called soft if meeting its deadline is desirable (e.g. for performance reasons) but missing does
not cause serious damage. Here typical application areas are communication systems (voice over IP), any kind
of user interaction, or comfort electronics (most body electronics in cars).
FEW POINTS ABOUT TROS

Kernel is the central part of an operating system. It manages the tasks of the computer and the Hardware - most
notably memory and CPU time.

Basic Services Provided by a Real-Time Operating System Kernel

1. Inter Task Communications and Synchronization


2. Task management
3. Dynamic memory allocation
4. I/o supervisor
5. Timers

6
Figure 1: an RTOS Kernel provides an Abstraction Layer between Application Software
and Embedded Hardware
Functions of the kernel
The kernel's primary function is to mediate access to the computer's resources, including:
The central processing unit
This central component of a computer system is responsible for running or executing
programs.
Random-access memory
Random-access memory is used to store both program instructions and data. Typically,
both need to be present in memory in order for a program to execute.
Input/output (I/O) devices
I/O devices include such peripherals as keyboards, mice, disk drives, printers, network
adapters, and display devices.
Memory management
Device management
System calls
7.3 RTOS TOOLS
7.3.1Microsoft Windows XP
Although Windows XP is not a RTOS, it is common to find several situations where this system is used to
control critical applications.
7.3.2Microsoft Windows CE Embedded 6.0
The studied version of Windows CE is the Embedded 6.0. It supports ARM, MIPS, SH4 and x86 architectures.
The tests were performed in the x86 architecture. As in other operating systems, the clock interrupt is the
“heartbeat” of the system. In most systems, this is a constant rate interrupt generated by a hardware clock to

7
trigger system’s housekeeping routines; however Windows CE introduces an interesting innovation in this
aspect: the variable clock tick, to reduce the overhead that the clock tick could cause in the operating system.
The Windows CE Embedded 6.0 is a very robust and reliable operating system to execute real time tasks, with
the advantage of offering several powerful development tools.
7.3.3QNX NEUTRINO: The tested version of Neutrino is 6.1.
QNX Neutrino is one of the most traditional RTOS in the market. Based in the microkernel architecture, it is
completely compatible with the POSIX standards and has been certified by FAA DO-278 and MIL-STD-1553
standards. It is uses microkernel architecture. Neutrino supports ARM, MIPS, PowerPC, SH4 and the PC
architecture. A recent feature of this operating system is called adaptative partitioning, which enables the creation
of processor constraints by tasks.
7.3.4MICRIUM ΜC/OS-II
ΜC/OS-II stands for Microcontroller Operating System Version II consisting of a highly simplified, yet powerful
real time kernel developed by Jean Labrosse, an embedded systems designer with more than 20 years of
experience in the area. ΜC/OS-II has a good task scheduler, as the test to measure the external input frequency
showed great results when the task had the greatest priority in the system.
7.3.5LINUX
Linux is a free operating system, with a modular monolithic kernel where all the important parts of the operating
systems are in kernel space, such as memory management, task scheduler, file system and device drivers. It is
possible to dynamically add or remove parts and functions of the kernel using Linux Kernel Modules (LKMs).
Linux kernel implements memory protection with the MMU aid. The evaluated Linux kernel was 2.6.18.
Regarding real time systems, Linux is not a real time operating system, although, there is a low latency kernel
patch called low-preempt patch that can be applied to the mainstream Linux to add soft real time capacity to the
system. Linus Torvalds himself (Linux’s author) affirmed in 2006 that he would use Linux to control a laser
cutting machine using this patch.
7.3.6Real Time Application Interface (RTAI)
Real Time Linux has been recently offering a good cost/benefit relation in the real time area, being used in
small applications, tests, and even in medical and state of the art scientific equipments.
7.3.7WIND RIVER VXWORKS
VxWorks is the most used RTOS in the embedded systems industry .Examples of applications where VxWorks
is used is the international space station, and in the famous NASA rover robots Spirit and Opportunity.
This RTOS had been certified by several agencies and international standards for real time systems, reliability
and security-critical applications. The evaluated version was VxWorks 6.2 which takes advantage of the system’s
MMU to isolate and protect the tasks.
7.3.8SMX

8
A real-time system very successfully. It had a small memory footprint and very low interrupts latency. It was
reliable and extensible. Although we didn’t find many bugs, since the source code was available and well
documented we were able to quickly work around any problems we found.
7.3.9NUCLEUS
A line of systems around the Nucleus operating system using Cad-UL tools. The tools were adequate and the
documentation thorough. But most important, the source code was provided.
7.3.10INTEGRITY
The Integrity RTOS was on a number of Full Authority Digital Engine Controls (FADEC) used on helicopters.
Integrity was chosen because it had already been qualified to FAA standards and did not need to be re-tested.
7.4 LOGIC ANALYZER

A logic analyzer is an electronic instrument that captures and displays multiple signals from a digital system or
digital circuit. A logic analyzer may convert the captured data into timing diagrams, protocol decodes, state
machine traces, assembly language, or may correlate assembly with source-level software. Logic Analyzers have
advanced triggering capabilities, and are useful when a user needs to see the timing relationships between many
signals in a digital system.

A logic analyzer is like an oscilloscope that is used to view multiple digital (binary) waveforms. We use logic
analyzer for precise hardware troubleshooting, especially for timing issues. While we focus on microcontrollers
here, logic analyzers can be used for any type of digital circuit that has a binary output. You can set the threshold
values for the logic highs and lows in the logic analyzer software. In the LA2124 Logic Analyzer we use in this
demo and the EE3176 labs, the threshold is set at 1.40 V, so a signal voltage > 1.40 volts is a logical one, while
a voltage less than 1.40 V is a logical 0.
USES

9
Many digital designs, including those of ICs, are simulated to detect defects before the unit is constructed. The
simulation usually provides logic analysis displays. Often, complex discrete logic is verified by simulating
inputs and testing outputs using boundary scan. Logic analyzers can uncover hardware defects that are not
found in simulation. These problems are typically too difficult to model in simulation, or too time consuming
to simulate and often cross multiple clock domains.

Field-programmable gate arrays have become a common measurement point for logic analyzers and are also
used to debug the logic circuit.

7.4.1Logic analyzer types

Although development of these test instruments is on-going and new variants are constantly being launched and
many technology innovations are being achieved, there are some main categories into which most logic analyzers
can be split:

1. Modular logic analyzers: This type of logic analyzer is probably what may be thought of as the most typical
form of test instrument, although it is the highest cost option providing the highest level of functionality. It
comprises a chassis and the various modules - including channel modules. The number of modules being larger
for the higher channel counts.

2. Portable logic analyzers: In a number of instances there may be a need for a smaller analyzer, possibly for
restricted budgets or for field service. These test instruments incorporate all elements of the analyzer into a single
box for ease of transportation.

3. PC based logic analyzers: There is a growing number of PC based logic analyzers. These consist of an
analyzer unit that is connected to a PC. USB is an obvious option for this, but Ethernet is also widely used
because of its high speed. This form of PC based instrument uses the processing power of the PC combined with
its display to reduce the cost of the overall system.

7.5PROGRAMMING EMBEDDED SYSTEMS

Embedded Systems Programming requires a more complex software build process


Target hardware platform consists of
Target hardware (processor, memory, I/O)
Runtime environment (Operating System/Kernel)
Target hardware platform contains only what is needed for final deployment

10
Target hardware platform does not contain development tools (editor, compiler, debugger) Target hardware
platform is different from development platform
Development platform, called the Host Computer, is typically a general purpose computer
Host computer runs compiler, assembler, linker, locator to create a binary image that will run on the Target
embedded system.
7.5.1PROCESS FOR DEVELOING EMBEDDED SOFTWARE FOR EMBEDDED SYSTEM
 Create source file (on Host)
 Type in C code (on Host)
 Compile/Assemble: translate into machine code (on Host)
 Link: combine all object files and libraries, resolve all symbols (on Host)
 Locate: assign memory addresses to code and data (on Host)
 Download: copy executable image into Target processor memory
 Execute: reset Target processor

7.6Embedded Software tools


Embedded software in almost every electronic device Watches, VCRs, cellular phones, microwaves,
thermostats
In US, ~8 µprocessor-based devices for every person
Each embedded system is unique, with specialized hardware and specialized software
Embedded Software is the software that controls an embedded system. All embedded systems need some
software for their functioning. Embedded software or program is loaded in the microcontroller which then takes
care of all the operations that are running. For developing this software, a number of different tools are needed
which I will discuss further. These tools include editor, compiler, assembler and debugger. Let’s have a look on
them.
1. Editor
 The first tool you need for Embedded Systems Software Development Tools is text editor.
 This is where you write the code for your embedded system.
 The code is written in some programming language. Most commonly used language is C or C++.
 The code written in editor is also referred to source code.
2. Compiler
 The second among Embedded Systems Software Development Tools is a compiler.
 A compiler is used when you are done with the editing part and made a source code.
 The function of compiler is to convert the source code in to object code.
 Object code is understandable by computer as it in low level programming language.

11
 So we can say that a compiler is used to convert a high level language code in to low level programming
language.
 A Native-compiler runs on a computer platform and produces code for that same computer platform
 A Cross-compiler runs on one computer platform and produces code for another computer platform

3. Assembler
 The third and an important one among Embedded Systems Software Development Tools is an assembler.
 The function of an assembler is to convert a code written in assembly language into machine language.
 All the mnemonics and data is converted in to op codes and bits by an assembler.
 We all know that our computer understands binary and it works on 0 or 1, so it is important to convert
the code into machine language.
4. Debugger
 As the name suggests, a debugger is a tool used to debug your code.
 It is important to test whether the code you have written is free from errors or not. So, a debugger is
used for this testing.
 Debugger goes through the whole code and tests it for errors and bugs.
 It tests your code for different types of errors for example a run time error or a syntax error and
notifies you wherever it occurs.
 The line number or location of error is shown by debugger so you can go ahead and rectify it.
 So from the function, you can see how important tool a debugger is in the list of Embedded Systems
Software Development Tools.

5. Linker
 The next one in basic Embedded Systems Software Development Tools is a linker.
 A linker is a computer program that combines one or more object code files and library files together in
to executable program.
 It is very common practice to write larger programs in to small parts and modules to make job easy and
to use libraries in your program.
 All these parts must be combined into a single file for execution, so this function requires a linker.

12
6. Libraries
 A library is a pre written program that is ready to use and provides specific functionality.
 For Embedded Systems Software Development Tools, libraries are very important and convenient.
 Library is a file written in C or C++ and can be used by different programs and users.
 For example, arduino microcontroller comes with a number of different libraries that you can download
and use while developing your software.
 For instance, controlling LED or reading sensor like an encoder can be done with a library.

7. Simulator
 Among all embedded software tools, simulating software is also needed.
 A simulator helps you to see how your code will work in real time.
 You can see how sensors are interacting, you can change the input values from sensors, and you can see
how the components are working and how changing certain values can change parameters.
 These were the basic software tools required for embedded software development.
 When I am talking about embedded software tools, it is also important to give you an idea about IDE
which is the next section of my article.
7.7Integrated Development Environment (IDE) – Embedded Systems Software
Development Tools
 An Integrated Development Environment is software that contains all the necessary tools required
for embedded software development.
 For creating software for you embedded system, you need all of the above mentioned tools.
 So it is very helpful to have software that can provide all of the necessary tools from writing to
testing of your code, in one package.
 An IDE normally consists of a code editor, compiler and a debugger.
 An Integrated Development Environment also provides a user interface.
 An example of integrated development environment is Microsoft visual studio. It is used for
developing computer programs and supports different programming languages.
 Other examples of IDE that are common are given below.
o Android Studio
o Eclipse
o Code Blocks
o BlueJ
o Xcode
o Adobe Flash Builder etc.

13
Depending on what kind of microcontroller you are using, you can choose from many different software
applications. I am going to share a few of these Embedded Systems Software Development Tools here in my
article.
1. MPLAB
 If you are working with PIC microcontroller, than you definitely need MPLAB.
 MPLAB is an integrated development environment from Microchip technology.
 It is a software that runs on your personal computer and is needed to create program for your pic
microcontroller.
 It helps in editing, debugging and programming of microchip microcontroller that you use in your embedded
system.
 The latest edition of MPLAB is MPLAB X. You can download this software free form microchip website.
 There are many important features of MPLAB which are really helpful in software development. I am going to
mention some of them:
o Free C compilers
o Macros
o Complex breakpoints
o Third party tools
o Change variables in watch window etc.
2. Arduino Software
 Arduino software is used if you are working with arduino microcontroller.
 It is also open source software just like MPLAB that runs on your personal computer.
 Arduino software helps you to create program for your microcontroller providing all the necessary
embedded software tools.
 The codes that you write on arduino software are referred to as sketches and have an extension .ino.
 Integrated development environment of arduino is very user friendly and has a lot of features that make
your job easy. For example, you can open multiple files with different extensions in one window.
 With arduino you can make use of a number of different libraries for your functions and peripherals. Some
of them are:
Liquid Crystal display ,Wi-Fi ,Audio,RTC ,Led Control, Robot,Matrix,Capacitive Sensing

3. Keil
 Keil is an integrated development environment for a wide range of microcontrollers including 8051,
251, ARM7, and C16x/ST10 microcontrollers.
 This software includes compiler, assembler, linker, debugger, simulator etc.
 This software is also easy to use and learn.

14
 The software for 8051 is used by professional embedded system developers and beginners both.
 Depending on the microcontroller, you are using you can go for the right software.
4. MATLAB
 Matlab is one of the very important tools for software developers.
 It provides you with an environment where you can solve all of your computational problems.
 You can work with matrices, graphs, vectors, functions, arrays, plots etc. You can make algorithms.
Also you can create user interfaces.
 With Matlab, you can also interface programs written in other programming languages.
 Matlab comes with additional software, Simulink that enables you to create simulation.
 It is really a helpful tool for embedded software developers, as you can work on sensors data, plot it
and see response by changing certain variables.

5. LabVIEW
 LabVIEW stands for Laboratory Virtual Instrument Engineering Workbench. This software is also used for
viewing output.
 The main functions that can be performed using Labview are data acquisition, industrial automation and
instrument control.
 This software is basically for visual programming language.
 Some of the benefits of Labview are:
o Libraries, Interfacing to devices, Parallel programming ,User community

6. PSpice
 SPICE stands for Simulation Program for Integrated Circuits Emphasis, and PSpice is its version for
personal computers.
 PSpice is simulation software that is used for simulating circuits.
 It helps in analyzing electronic circuitry, verifying circuit designs and predicting their behavior.
 It has a number of libraries for digital and analog components.
 The components that are available include
o Resistors, capacitors, voltage and current sources, Inductances etc.

7. Proteus
 Proteus is kind of simulation software where you can create circuits, make model of your embedded system
including microcontroller to see how it works, measure circuit parameters, change sensor values and much
more.
 It helps you to create PCB (printed circuit board) design for your embedded system.

15
 Microcontroller simulation is an important feature of this software where you can load a hex file to your
microcontroller in the design, connect all other components to it and see how it works.
 This software runs only on Windows operating system.

8. Visual Studio
 Visual Studio is also an integrated development environment provided by Microsoft.
 It is used for developing computer programs for Microsoft Windows.
 It can support different programming languages and basically consists of a code editor and a
debugger.
 With this software you can build different mobile apps, window apps, extensions, games etc. The
choice of language is yours.

9. EasyEDA
 EasyEDA is an online tool that you can use to create schematics, PCB designs, and simulations.
 Since it is an online tool that runs on web, there is no need for you to download and install it in your
personal computer. Instead you can run it directly.
 Also there is no need of updating your software or to remove bugs, as it is online tool and keeps
updating itself. New features are added automatically.
 Another advantage is that it runs on all types of OS (windows, linux etc.) as EasyEDA works on
your web browser.

10. Altium
 The last one on my list of embedded software tools is Altium which is also PCB designing software.
 PCB designing is very important part of developing an embedded system, so it is good to know all
the available resources for PCB design.
 The PCB designing module of altium has a lot of features including
o Adding hole tolerance
o PDF 3D export
o Live Drill Drawing
o Supporting Embedded Components etc.
So these are the 10 embedded software tools that should be known by an embedded software developer.

16

You might also like