simplifying functional safety certification with the arm ... · starting with some simple...

136
© LDRA 2017 LDRA tool suite v9.7.0 August 2017 Simplifying Functional Safety Certification with the ARM ® DS-5 Development Studio and the LDRA tool suite ® 1

Upload: others

Post on 05-Aug-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

© LDRA 2017 LDRA tool suite v9.7.0 August 2017

SimplifyingFunctional Safety

Certificationwith the ARM® DS-5 Development Studio

and the LDRA tool suite®

1

Page 2: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

2

Goals

▪Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM® DS-5 IDE with the Cortex-M3 VFP

▪Verify the traceability between all the requirements and the code

▪Verify every high level and low level requirement by running tests on the target

▪Verify that the code is MISRA C:2012/AMD1 compliant and also clear, maintainable and testable

▪Verify that 100% structural coverage has been attained

Page 3: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

3

Pre-requisites

▪ LDRA tool suite V9.7.0 or above

▪ARM DS-5 IDE (Tested with v5.27.1)

Page 4: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

Preparation

4

Page 5: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

5

ARM DS-5 Development Studio

▪ It is assumed that ARM DS-5 Development Studio is installed and a license obtained

Page 6: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

6

LDRA tool suite

▪ It is assumed that the LDRA tool suite is installed and licensed

Page 7: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

7

Environment Variables

▪ In order to use ARM DS-5 via the command line, it may be necessary to configure the following Environment Variables:

▪ This can be done by running a batch file similar to the following:

setx ARM_PRODUCT_PATH "C:\Program Files\DS-5 v5.27.1"

setx ARM_TOOL_VARIANT ult

setx ARMLMD_LICENSE_FILE L:\LDRA_Flexlm\Ltype\DS-5_license.dat

Page 8: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

8

Install the TLP (Target License Package)

▪ The TLP allows the LDRA tool suite to work with ARM DS-5 Development Studio

▪Run the ARM DS-5 TLP installer

▪Select the following options

Page 9: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

9

ARM DS-5 Installation Path

▪Select the path of where ARM DS-5 is installed

Page 10: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

10

ARM Compiler Installation Path

▪Select the path of where the ARM compiler is installed

Page 11: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

11

Eclipse Configuration

▪Select LDRA

Page 12: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

12

Upload Method

▪Select SCRIPT

Page 13: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

Additional Tools

▪Run the LDRA Launcher and then select “Additional Tools”

13

Page 14: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

Additional Tools

▪Select the LDRA Eclipse Plug-in

14

Page 15: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

Eclipse Plugins

▪Select the DS-5 plugins directory

15

Page 16: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

16

ARM_DS5_Workspace

▪Once installed, locate the following workspace

Page 17: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

Load the ARM_DS5_Workspace

▪Start ARM DS-5 and select the provided workspace

17

Page 18: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

Import

▪ Import the provided Projects

18

Page 19: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

Import Project: DS5_Safe_Utilities

▪ Import the following project

19

Page 20: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

20

Cortex-M3

▪ This simple project targets the Cortex-M3

Page 21: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

21

LDRA Configuration

▪Select the LDRA Configuration

Page 22: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

22

LDRA Configuration

▪An LDRA configuration is added to the project to be tested to allow any necessary options such as increased stack size, or suppression of warnings to be set

Page 23: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

23

Build

▪Build the project

Page 24: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

24

DS-5 Debugger Configuration

▪Create a DS-5 Debugger Configuration

Page 25: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

25

DS-5 Debugger

▪Create a new Debug Configuration

Page 26: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

26

DS-5 Debugger Configuration

▪Configure the DS-5 Debugger Configuration

Page 27: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

27

Debug

▪Now the program can be debugged

Page 28: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

28

target.cli

▪ Finally export the DS-5 Debugger Configuration to a file called target.cli

▪ This is a file that will be used by LDRA in order to run on the target

Page 29: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

Requirements

29

Page 30: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

30

Requirements

▪Open the Requirements folder

Page 31: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

31

System Level Requirements

▪ This is a very simple document that contains just one requirement that starts with SYS_

Page 32: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

32

High Level Requirements

▪ This document contains High Level Requirements that all start with HLR_ and which have a link to a System Level Requirement

Page 33: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

33

Styles

▪Note how in this document, styles have been used to help identify requirements ex:

Page 34: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

34

Low Level Requirements

▪ The Low Level Requirements are in an excel document and contain links to High Level Requirements

Page 35: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

35

Restore_Initial_State.bat

▪Run the Restore_Initial_State.bat file, this will create a new TBmanager project and in case the tutorial has already been started or completed, will delete any existing results

Page 36: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

36

TBmanager

▪Open the newly created TBmanager project, by double-clicking on the .tbp file

Page 37: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

37

UniView

▪By default the UniView should be shown

Page 38: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

38

Groups

▪ The following groups have been added▪ SLR: System Level Requirements

▪ HLR: High Level Requirements

▪ LLR: Low Level Requirements

▪ HLT: High Level Tests

▪ LLT: Low Level Tests

Page 39: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

39

Import System Level Requirements

▪We want to import the System Level Requirements from the Word document into the Group SLR

▪ First switch to the documents view, where we can see that the Requirements documents have already been added

Page 40: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

40

Import from Word Document…

▪Select the Safe_Utilities_SLR.docx file, right-click and select “Import from Word Document…”

Page 41: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

41

Regular Expressions

▪Note how regular expressions have previously been created, to extract the System Level Requirements

Page 42: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

42

Preview

▪Click on Refresh Preview to see that the regular expressions have correctly identified the requirement: number, name and body

▪Note also that the requirements will be imported into the group SLR

Page 43: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

43

Import

▪Click on OK to first view the requirements, then on OK again to import them

Page 44: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

44

Imported Requirement

▪We should now be able to see the imported requirement in the Project Tree

Page 45: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

45

Import High Level Requirements

▪Next we want to import the High Level Requirements from the Word document into the Group HLR

▪Select the Safe_Utilities_HLR.docx file and “Import from Word Document…”

Page 46: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

46

Rule 1: Requirement_ID Style

▪ This time since styles have been used, it is much easier to identify the requirements. Different rules have been created for each style ex:

Page 47: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

47

Rules 2 & 3

▪Similarly rules have been created for the styles Requirement_Text and Traceability_Data

Page 48: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

48

Preview

▪As before, refresh the preview to check the rules

▪Check also that the requirements will be imported into the group HLR

Page 49: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

49

Import

▪Click on OK to first view the requirements, then on OK again to import them

Page 50: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

50

Imported Requirements

▪We should now be able to see the imported requirements in the Project Tree, nested below SYS_100, since they all have a link to that requirement

Page 51: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

51

Import Low Level Requirements

▪Next we want to import the Low Level Requirements from the Excel document into the Group LLR

▪Select the Safe_Utilities_LLR.xlsx file, right-click and select “Configure .xlsx Format…”

Page 52: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

52

Columns

▪Each column is identified as a specific attribute ex: requirement: number, name, body, …

Page 53: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

53

Group LLR

▪ The first row is ignored and the requirements will be imported into the group LLR

Page 54: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

54

Get Requirements from File

▪Click OK to close this menu, then to import the requirements, select “Get Requirements from File”

Page 55: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

55

Imported Requirements

▪We should now be able to see the imported requirements in the Project Tree

Page 56: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

56

Relationships View

▪Switch to the relationships view

Page 57: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

57

SLR Requirements

▪Right-click in the 1st column and add all the requirements from the group: SLR

Page 58: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

58

Traceability

▪Now we can observe the upstream and downstream traceability by clicking on any requirement

Page 59: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

59

UniView

▪Switch to the UniView view

Page 60: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

60

Traceability Matrix

▪Right-Click on the HLR group and select “Traceability Matrix Report to Requirement”, then select Group: LLR

Page 61: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

61

High level Requirement <Not Covered>

▪We can see clearly that one High Level Requirement is not covered!

Page 62: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

Traceability to Code

62

Page 63: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

63

Source Code

▪We now need to look at the traceability between the source code and the Low Level Requirements

▪ First we need to analyse the source code, the simplest way to do this is via the LDRA Eclipse plug-in in ARM DS-5

▪Start ARM DS-5

▪Select the LDRA Perspective

Page 64: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

64

Set As Active Project

▪Ensure that the Active Configuration is LDRA

▪Right-click on the project and set as LDRA Active Project

Page 65: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

65

Analysis

▪Now perform the analysis

Page 66: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

66

Source Code

▪We now need to look at the traceability between the source code and the Low Level Requirements

▪ First we need to analyse the source code

▪ In the Project Tree, right-click on Source Code and select “Add Compiler Project…”

Page 67: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

67

Code Violations

▪As can be seen, there are a number of detected violations, we will look at these later

▪But for now, close ARM DS-5

Page 68: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

68

TBmanager

▪Back in TBmanager, right-click on Source Code and select “Add Multiple Files as Set…”

Page 69: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

69

DS5_Safe_Utiltiies

▪Select the set that was created by the LDRA plug-in called DS5_Safe_Utilties

Page 70: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

70

Map Source View

▪Switch to the Map Source View and expand each file

Page 71: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

71

Map Source Code

▪Map each function (except main) to the appropriate Low Level Requirement by dragging and dropping

Page 72: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

72

Relationships View

▪Switch to the Relationships view and note that every function should now trace back to a requirement

Page 73: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

Tests

73

Page 74: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

74

Tests

▪Before testing against the requirements, we also want to perform the following tests:▪ Check that the code is compliant to MISRA C:2012/AMD1

▪ Check that the code is clear, maintainable and testable

▪ Then after testing against the requirements, we will want to perform the following test:▪ Check that we have 100% Structural Coverage

Page 75: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

75

TCI Grid View

▪Switch to the TCI Grid View

Page 76: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

76

Map TCIs to Set

▪Map each TCI (Test Case Identifier) to the System Set by dragging and dropping ex:

Page 77: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

77

Map Source View

▪Switch to the Map Source View and the TCIs should be shown

Page 78: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

78

Code Review

▪Right-click on the TCI_CodeReview and select “Verify with LDRA tool suite…”

Page 79: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

79

Code is Not Compliant

▪ The Green dots indicate that there are no Mandatory or Advisory violations, but there are some Required violations

Page 80: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

80

Callgraph

▪Drag the System Set onto the Output Callgraph placeholder

Page 81: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

81

Callgraph – Programming Standards

▪Double-click to open the callgraph

Page 82: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

82

Violations

▪Clicking on a function, highlights the coding standard violations

Page 83: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

83

Code Review Report

▪Alternatively double-click on the Code Review Report

Page 84: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

84

View Results with LDRA tool suite

▪Or view the results with the LDRA tool suite

Page 85: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

85

Quality Review

▪Next verify the quality of the code

▪Right-click on the TCI_QualityReview and select “Verify with LDRA tool suite…”

Page 86: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

86

Code is Clear, Maintainable and Testable

▪ The Green dots indicate that the quality of the code is good, it is clear, maintainable and testable. All the measured metrics are within the specified thresholds

Page 87: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

87

Callgraph

▪Drag the System Set onto the Output Callgraph placeholder, then double-click to open the Callgraph

Page 88: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

88

Maintainability View

▪Select the Maintainability View

Page 89: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

89

Sort Metrics

▪Clicking on the column title, sorts the metrics by value, making it easy to locate the most complex function

▪ The flowgraph for each function can be viewed ex:

Page 90: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

90

Flowgraph

Page 91: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

High Level Tests

91

Page 92: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

92

High Level Tests

▪Next we want to verify the High Level Requirements

▪ The Safe_Utilities_HLT.xslx file contains just a single High Level Test

Page 93: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

93

High Level Tests

▪ For this test, we are simply going to execute the main which exercises every function and afterwards check the structural coverage

Page 94: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

94

Import High Level Tests

▪Switch to the Documents View, select the Safe_Utilities_HLT.xslx file and “Get Test Cases from File”

Page 95: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

95

Set External Task

▪Set the External Task to be the following

Page 96: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

96

Build Instrumented

▪As the code executes, we need to measure the structural coverage. In order to do this, we first need to instrument the source code and then to perform a build

▪ This can be done by executing the batch file Build_Instrumented.bat

▪Click on the following menu to do this

Page 97: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

97

Verify with External Task

▪Now we can right-click on the HLT and verify with External Task

Page 98: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

98

Execution History

▪At the end of the execution, the compressed execution history is uploaded to the host

▪ This can now be processed by running the batch file Get_Coverage.bat

▪Click on the following menu to do this

Page 99: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

99

Code Coverage

▪Now switch to the Map Source View and verify the code coverage

Page 100: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

100

Callgraph

▪Drag the System Set onto the Output Callgraph placeholder

▪Double-click to view the pass/fail coverage Callgraph

Page 101: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

101

Callgraph

▪As expected, every function has been invoked, but of course we don’t have 100% coverage

Page 102: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

102

Flowgraph

▪View the Coverage Pass/Fail Flowgraph for the function safe_uncompress

Page 103: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

103

Defensive Programming

▪Since the code checks that the parameters aStringand anArray are not NULL, we don’t have 100% structural coverage

▪ In order to test this “defensive programming”, we will need to perform unit testing

Page 104: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

Low Level Tests

104

Page 105: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

105

Low Level Tests

▪Next we want to verify the Low Level Requirements

▪ The Safe_Utilities_LLT.xslx file contains the Low Level Tests

Page 106: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

106

Import Low Level Tests

▪Switch to the Documents View, select the Safe_Utilities_LLT.xslx file and “Get Test Cases from File”

Page 107: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

107

Associated Test Case File (.tcf)

▪With each Low Level Test, there is an associated Test Case File which contains a sequence of test cases

▪ TCF files can be regressed using TBrun

▪Select the following Low Level Test and “Verify Test Interactively in TBrun...”

Page 108: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

108

TBrun

▪ For each Test Case, we can see the list of inputs and expected outputs

Page 109: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

109

Run

▪ The Test Cases can now be compiled, linked and executed on the target

▪ The Test Cases all pass with 100% coverage

Page 110: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

110

Test Passes

▪Exiting TBrun will update the status of the Low Level Tests in TBmanager

▪Now verify the next Low Level Test

Page 111: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

111

Failed Test Case

▪ This time the Test Case fails

Page 112: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

112

Failed Test Case

▪ This is exactly why we unit test, the function safe_uncompress does not work correctly and must be modified

Page 113: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

113

Regression Report

▪Viewing the Regression Report shows why the test case failed

Page 114: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

114

Fail

▪Since the Test failed, it has a red dot

Page 115: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

115

TCI Grid

▪Switch to the TCI Grid

Page 116: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

116

Filter

▪Press “Control + L” to create the following filter

Page 117: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

117

2nd Filter

▪Press “+” to create a second filter as shown

Page 118: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

118

Regress All Unverified Tests

▪Press “Control + A” to select all the unverified Test Cases, then regress them

Page 119: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

119

One Unverified Test Case Identifier

▪Once the filter is refreshed, there should now be just the single unverified Test Case Identifier

Page 120: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

120

Code Coverage

▪Now that all the unit tests have been run, check that we have 100% structural coverage

Page 121: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

121

Objectives

▪Next import the objectives from a standard

Page 122: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

122

ISO 26262

▪Any standard can be imported, but for the moment, select ISO 26262 and click OK

Page 123: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

123

Standards

▪ The existing standards can be customised or additional standards added ex:

Page 124: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

124

Objectives View

▪Switch to the Objectives View

Page 125: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

125

Placeholders

▪ For each objective, it is possible to add placeholders for all the various artifacts / assets that need to be created or produced in order to satisfy it

Page 126: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

126

Placeholders

▪Expand the objective “Part 6: Section 5: Table 1: 1a”

▪Note the placeholders for Artifacts that need to be created/produced in order to satisfy this objective

Page 127: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

127

Realising Objectives

▪As the Artifacts/Assets get produced, they can be used to satisfy the placeholders

▪Right-click on each placeholder and associate the appropriate document ex:

Page 128: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

128

Satisfied Placeholders

Page 129: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

129

Fulfilled Objective

▪Once the associated documents, have been reviewed, the status of the objective can be changed to Fulfilled

Page 130: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

130

Objectives Report

▪Generate an Objective Summary Report and navigate from it to view the documents

Page 131: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

131

Reports

▪ Finally, reports such as the Project Coverage Detailed Report can be generated

Page 132: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

132

Command Line

▪Everything that was performed manually in this tutorial can be automated from a batch file

▪Close TBmanager and try running the following batch file

Page 133: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

Summary

133

Page 134: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

134

Summary

▪ In this simple example, we have seen:▪ How the traceability from requirements to code can be

verified

▪ How the code in a ARM DS-5 project can be analysed and checked for MISRA C:2012/AMD1 compliance as well as ensuring that it is clear, maintainable and testable

▪ How the High Level Requirements and Low Level Requirements can be verified by executing tests on the target

▪ How the Structural Coverage can be measured

▪ How everything can be automated from a batch file

Page 135: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

135

For More Information

▪ For more information, please view the following tutorials

Page 136: Simplifying Functional Safety Certification with the ARM ... · Starting with some simple requirements written in Word & Excel, show how a project can be developed using the ARM®

.com

Need more information?

[email protected]

Contact Us

136