DO Qualification Kit: Software Model Standard
DO Qualification Kit: Software Model Standard
Revision: <Revision>
Project: <Project>
Approvals:
vii
viii
1 Introduction
This document comprises the Software Model Standard as referenced by the Software
Development Plan (SDP), according to DO-331 MB.11.2 for the project <Project>. As specified
in DO-331MB.11.23, the Software Model Standard defines the modeling techniques for each
type of model.
Within the project <Project>, this document is applicable for design models as specified in DO-
331MB.1.6.2.
You can use this document as a resource when creating a Software Model Standard document. If
you are updating an existing Software Model Standard document to support Model-Based
Design (MBD), you can use this document as a reference.
Note: With the exception of MATLAB®, Simulink®, and Stateflow®, this document does not
include definitions or information for modeling environments.
1.1 Applicable Documents
Table 1 - Regulations and Standards
ID Document Title
DO-178C Software Considerations in Airborne Systems and Equipment Certification.
RTCA, Inc., 2011
DO-330 Software Tool Qualification Considerations.
RTCA, Inc., 2011
DO-331 Model-Based Development and Verification Supplement to DO-178C and DO-278A.
RTCA, Inc., 2011.
<List additional documents here, e.g. Advisory Circulars, EASA Certification Memos, etc.>
1-2
2 Methods, Tools and Modeling
Languages
This section specifies the methods, tools, and modeling languages for the development of design
models, according to (DO-331 MB.11.23.a and MB.11.23.b).
Simulink® products from MathWorks® are an accepted standard for Model-Based Design
(MBD). Simulink, Fixed-Point Designer™, and Stateflow® software support graphical modeling
with time-based block diagrams and event-based state machines. Embedded Coder software
supports code generation for embedded systems.
Simulink
Simulink is a software package that enables you to model, simulate, and analyze dynamic
systems. Embedded Coder is a software package that enables you to generate C code for
embedded platforms. Simulink uses block diagrams as a model-based programming language
(Simulink language). Block diagrams graphically consist of blocks and lines (signals).
Simulink block diagrams define time-based relationships between signals and state variables.
The solution of a block diagram is obtained by evaluating these relationships over time. Time
starts at a user specified start time and ends at a user specified stop time. Each evaluation of
the relationships is referred to as a time step.
Signals represent quantities that change over time and are defined for all points in time
between the block diagram’s start and stop time.
A set of equations represented by blocks defines the relationships between signals and state
variables. Each block consists of a set of equations (block methods). These equations define a
relationship between the input signals, output signals, and the state variables. Inherent in the
definition of an equation is the notion of parameters, which are the coefficients found in the
equation.
Simulink contains both virtual blocks and nonvirtual blocks, as described in the Simulink User's
Guide and Simulink Reference documents. In general, implementation is defined by nonvirtual
blocks, not virtual blocks. Examples of virtual blocks include DOC blocks, subsystems used to group
blocks together in a model, and some connections inside virtual subsystems, such as inports or outports.
The modeling standards for the project should define these types of virtual blocks as not contributing to
the implementation.
The Simulink User's Guide and Simulink Reference documents provide detailed descriptions
of Simulink features.
The Embedded Coder User's Guide document provides detailed descriptions of Simulink
features that apply to code generation for embedded systems, including a list of supported
blocks.
The Simulink Code Inspector Reference document provides detailed descriptions of Simulink
features that apply to code inspection, including a list of supported blocks.
The Fixed-Point Designer User's Guide and Fixed-Point Designer Reference documents
provide detailed description of Simulink's fixed-point features.
Stateflow
Stateflow is an environment for modeling and simulating combinatorial and sequential decision
logic in the form of state transition diagrams, flow charts, state transition tables, and truth tables.
A state transition diagram is a graphical representation of a finite state machine. States and
transitions form the basic building blocks of a sequential logic system. Another way to represent
sequential logic is a state transition table, which allows you to enter the state logic in tabular
form. Combinatorial logic can also be represented in a chart with flow charts and truth tables.
Stateflow charts can be blocks in a Simulink® model. The collection of these blocks in a
Simulink model is the Stateflow machine.
A Stateflow chart enables the representation of hierarchy, parallelism, and history. You can
organize complex systems by defining a parent and offspring object structure. A system with
parallelism can have two or more orthogonal states active at the same time. You can also specify
the destination state of a transition based on historical information.
The Stateflow User's Guide and Stateflow Reference documents provide a description of
Stateflow features.
The Simulink Code Inspector Reference document provides a description of Stateflow
features that apply to code inspection.
MATLAB
MATLAB® is a high-level language and interactive environment for numerical computation,
visualization, and programming.
The MATLAB Coder User´s Guide provides a detailed description of MATLAB features that
apply to code generation, including a list of supported functions.
2-2
3 Style Guidelines and Complexity
Restrictions
This section describes the style guidelines and complexity restrictions for the use of MATLAB,
Simulink, and Stateflow, according to (DO-331 MB.11.23.c).
<The following guidelines provide a starting point for defining constraints on the use of
modeling tools within your project. The guidelines are available at the MathWorks
Documentation Center, R2015a. Tailor the following set of guidelines based on your planned
use of the tools and applicability to your project.>
3.1 Modeling Guidelines for High-Integrity Systems
Simulink Block Considerations – Math Operations
3-2
Simulink Block Considerations – Logic and Bit Operations
3-3
himl_0008: MATLAB code relational operator data types
himl_0009: MATLAB code with equal / not equal relational operators
himl_0010: MATLAB code with logical operators and functions
MISRA-C:2004 Compliance Considerations –Modeling Style
3-4
3.2 Simulink Model Advisor DO-178C/DO-331
Checks
Apply the following checks documented in the "DO Qualification Kit Simulink ® Verification
and Validation™ DO-178C/DO-331 Checks and Model Advisor User Information":
Check for blocks that do not link to requirements
Check state machine type of Stateflow charts
Check Stateflow charts for ordering of states and transitions
Check usage of lookup table blocks
Check MATLAB Code Analyzer messages
Check MATLAB code for global variables
Check for inconsistent vector indexing methods
Check for blocks not recommended for C and C++ production code deployment
Check Stateflow charts for uniquely defined data objects
Check usage of Math Operations blocks
Check usage of Signal Routing blocks
Check usage of Logic and Bit Operations blocks
Check usage of Ports and Subsystems blocks
Check for MATLAB Function interfaces with inherited properties
Check MATLAB Function metrics
Display model version information
3-5
3.3 MathWorks Automotive Advisory Board
<The MathWorks Automotive Advisory Board (MAAB) guidelines support the readability,
reusability, and overall quality of Simulink models. Consider selecting dedicated MAAB
guidelines for this Chapter.>
3-6
3.4 Company-Specific Guidelines
<Please insert your own additional guidelines here. It is recommended to specify an additional
project specific subset of MATLAB, Simulink, and Stateflow elements and settings to be used for
design models.>
3-7
3-8
4 Constraints on Modeling Tools
This section describes the constraints on the use of the modeling tools MATLAB, Simulink, and
Stateflow (DO-331MB.11.23.d).
<Please use the Simulink Modeling Guidelines for High Integrity Systems when defining your
own subset of guidelines. The guidelines are available at the MathWorks Documentation Center,
R2015a. Delete the following guidelines if they are not applicable in your project>
4.1 Modeling Guidelines for High-Integrity Systems
<Describe the means of compliance to be used for this project; normally this will reference DO-
178. This section should also include references to TC, STC, TSO, Advisory Circulars, Special
Conditions, Etc.>
4-2
hisl_0051: Configuration Parameters > Optimization > Signals and Parameters > Loop unrolling
threshold
hisl_0052: Configuration Parameters > Optimization > Data initialization
hisl_0053: Configuration Parameters > Optimization > Remove code from floating-point to
integer conversions that wraps out-of-range values
hisl_0054: Configuration Parameters > Optimization > Remove code that protects against
division arithmetic exceptions
hisl_0055: Prioritization of code generation objectives for high-integrity systems
4-3
4.2 Simulink Model Advisor DO-178C/DO-331
Checks
Apply the following checks documented in "DO Qualification Kit Simulink® Verification and
Validation™ DO-178C/DO-331 Checks and Model Advisor User Information":
4-4
4.3 Company-Specific Constraints
<Please insert your own additional constraints here. It is recommended to specify an additional
project specific subset of settings to be used for design models (e.g. settings regarding the
project specific target platform).>
4-5
4-6
5 Model Requirements and
Traceability
This section describes the method to identify and delimit the requirements contained in the
model and the means to establish traceability between requirements and other lifecycle data
(DO-331MB.11.23.e).
As defined in DO-331 MB.1.6.2, design models contain the software architecture and the
software low-level requirements. Low-level requirements are expressed by the subset of
MATLAB, Simulink, and Stateflow, as defined in Chapter 3 Style Guidelines and Complexity
Restrictions. See Chapter 7 Additional Model Elements for model elements that do not express
requirements.
Use the Simulink Verification and Validation Requirements Management Interface (RMI) to
trace between the design model and the requirements the model was developed from. Single
blocks or a combination of blocks can express and link to requirements.
Traceability between the design model and the generated code is established by comments
contained in the generated source code. The comments provide links to the design model
element.
To facilitate review, a traceability report is generated with the data between the design model
and the requirements from which the model was developed. The traceability between the design
model and the generated source code is automatically checked using the Simulink Code
Inspector™ and by reviewing the generated Code Inspector Report.
5-2
6 Derived Requirements
This section describes the method to identify and delimit the derived requirements contained in
the model. It also describes the method to provide derived requirements to the system processes,
including the system safety assessment process (DO-331MB.11.23.f).
Note: Derived requirements can be part of a design model or they can be treated like regular
requirements outside of a design model. The following information refers to derived
requirements contained in a design model.
Derived requirements that are contained in a design model will be marked by <Please insert
your strategy here> to clearly identify them as derived requirements and to provide them to the
safety assessment process. A combination of model review and model coverage analysis (as
defined in DO-331 Section 6.7) is used to verify that all derived requirements were properly
marked and analyzed. As described in DO-331 Table MB.6-1, additional test cases will be
created, based on the derived requirements contained in the design model. The additional test
cases have to be executed on the executable object code. An analysis of the results from model
coverage analysis and structural coverage analysis will verify that all derived requirements are
identified correctly.
Note: You can create test cases for derived requirements using Simulink Design Verifier ™.
6-2
7 Additional Model Elements
This section describes the means to identify each model element that does not contribute to the
representation of a software requirement or of the software architecture, and is not an input to a
subsequent software development process or activity. For example, a comment block (DO-
331MB.11.23.g).
In addition to Chapter 3 Style Guidelines and Complexity Restrictions, the following model
elements are part of a design model, but will not be subject to code generation:
<Please list all additional elements of your design model that are not subject to code generation
in here (e.g. annotations, Model Info block, DocBlock and so on).>
A model review will be performed to verify the correct use of the additional model elements and
the absence of undefined elements.
7-2
8 Suitability of Technique
This section provides a rationale for the suitability of the technique for the type of information
expressed by a Design Model (DO-331MB.11.23.h).
<Please adapt the following paragraph to your industry domain specific needs.>
Block diagrams are a well-established way of describing flow and logic-based applications for
control and monitoring systems. State charts and flow charts are a basic notation form in
information technology and other industries.
MATLAB, Simulink, and Stateflow are long-time standard tools among a wide variety of
industries. The tools documentation is available at the MathWorks Documentation Center.
People involved in a software development project can use the documentation to understand the
content of a design model.