Structural Coverage Report for LighTsControl_SIL

Top Model: LTC_R2017

Model Coverage Results:

   Complexity       Condition    Decision    MCDC
 
TOTAL COVERAGE          67%
   
   82%
   
   50%
   
 
1. . . . LTC_R2017 7       67%
   
   82%
   
   50%
   

S-Function Code Coverage Results:

   Complexity       Condition    Decision    MCDC
 
TOTAL COVERAGE          67%
   
   82%
   
   50%
   
 
1. . . . LighTsControl_SIL_SFun 11       67%
   
   82%
   
   50%
   

S-Function Coverage Summary Report for LighTsControl_SIL_SFun

Table Of Contents

  1. Analysis Information
  2. Tests
  3. Summary

Analysis Information

Model Information

Model version 1.442
Author TechDirector
Last saved Tue Oct 09 11:20:54 2018
Justify or Exclude

S-Function Instance

Included instance: LTC_R2017/LighTsControl/LighTsControl_SIL/EZTEST_SFun  

Tests

Test# Started execution Ended execution
Test 1 09-Oct-2018 11:20:55 09-Oct-2018 11:20:55

Summary

File/Complexity   Test 1
    Decision Condition MCDC
TOTAL COVERAGE 11 82%
67%
50%
1. . . . EZTEST_wrapper.c 3 --
--
--
2. . . . LighTsControl.c 8 82%
67%
50%

Coverage Report for LTC_R2017

Table of Contents

  1. Analysis Information
  2. Tests
  3. Summary
  4. Details

Analysis Information

Model Information

  Model version   1.442
  Author   TechDirector
  Last saved   Tue Oct 09 11:20:54 2018

Simulation Optimization Options

  Default parameter behavior   inlined
  Block reduction   off
  Conditional branch optimization   off

Coverage Options

  Analyzed model   LTC_R2017/LighTsControl/LighTsControl_SIL
  Logic block short circuiting   off
  MCDC mode   masking
  Filter filename   LighTsControl_SIL.cvf

Tests

Test# Started execution Ended execution
Test 1 09-Oct-2018 11:20:55 09-Oct-2018 11:20:56

Summary

Model Hierarchy/Complexity Test 1  
Decision Condition MCDC  
1. LighTsControl_SIL 7 82%
   
67%
   
50%
   
 

Details

1. SubSystem block "LighTsControl_SIL"


Metric Coverage (this object) Coverage (inc. descendants)
Cyclomatic Complexity 1 7
Condition NA 67% (8/12) condition outcomes
Decision NA 82% (9/11) decision outcomes
MCDC NA 50% (1/2) conditions reversed the outcome

   S-Function block "EZTEST_SFun"

Justify or Exclude
Parent: LTC_R2017/LighTsControl/LighTsControl_SIL

Metric Coverage
Cyclomatic Complexity 6
Condition 67% (8/12) condition outcomes
Decision 82% (9/11) decision outcomes
MCDC 50% (1/2) conditions reversed the outcome

Detailed Report: LTC_R2017_LighTsControl_SIL_SFun_instance_1_summary_cov

S-Function Coverage Report for EZTEST_wrapper.c

Table Of Contents

  1. Analysis Information
  2. Tests
  3. Summary
  4. Details
  5. Code

Analysis Information

File Information

Creation time 29-Jan-2018 00:00:31
Last modified time 13-Apr-2018 15:04:38
File size 950 B
MD5 checksum 1A5F503218D5C06EB525BC4ECDCB00D8

Tests

Test# Started execution Ended execution
Test 1 09-Oct-2018 11:20:55 09-Oct-2018 11:20:55

Summary

File Contents/Complexity   Test 1
   
1 . EZTEST_wrapper.c 3
2 . . . EZTEST_init 1
3 . . . EZTEST_step 1
4 . . . EZTEST_term 1

Details

1. File EZTEST_wrapper.c

Function: EZTEST_init (line 7)
EZTEST_step (line 19)
EZTEST_term (line 31)

Metric Coverage
Cyclomatic Complexity 3

2. Function EZTEST_init (line 7)

File: EZTEST_wrapper.c (code)

Metric Coverage
Cyclomatic Complexity 1

3. Function EZTEST_step (line 19)

File: EZTEST_wrapper.c (code)

Metric Coverage
Cyclomatic Complexity 1

4. Function EZTEST_term (line 31)

File: EZTEST_wrapper.c (code)

Metric Coverage
Cyclomatic Complexity 1

Code

        
1/* Wrapper for TRACE32-PIL */
2
3#include "EZTEST_wrapper.h"
4#include "QFP.h"
5#include "LighTsControl.h"
6
7void EZTEST_init(ez_uint32 EZTEST_HysteresisStepsOff, ez_uint32 EZTEST_HysteresisStepsOn, ez_uint32 EZTEST_MinLightOff, ez_uint32 EZTEST_MinLightOn)
8{
9 /* Call mapped function */
10 INIT_LighTsControl();
11
12 /* Set model parameters */
13 QFParams.HysteresisStepsOff = EZTEST_HysteresisStepsOff;
14 QFParams.HysteresisStepsOn = EZTEST_HysteresisStepsOn;
15 QFParams.MinLightOff = EZTEST_MinLightOff;
16 QFParams.MinLightOn = EZTEST_MinLightOn;
17}
18
19void EZTEST_step(ez_uint32 EZTEST_light_switch, ez_uint32 EZTEST_light_intensity, ez_boolean EZTEST_headlight[1])
20{
21 /* Declare persistent matrix variables */
22 static ez_boolean headlight = 0;
23
24 /* Call mapped function */
25 STEP_LighTsControl(EZTEST_light_switch, EZTEST_light_intensity, EZTEST_headlight);
26
27 /* Store matrix content */
28 headlight = EZTEST_headlight[0];
29}
30
31void EZTEST_term(void)
32{
33}
34

S-Function Coverage Report for LighTsControl.c

Table Of Contents

  1. Analysis Information
  2. Tests
  3. Summary
  4. Details
  5. Code

Analysis Information

File Information

Creation time 06-Feb-2016 21:35:33
Last modified time 09-Dec-2016 15:07:55
File size 4.6 KB
MD5 checksum B77542AFEA1232A95D9B6CA52B8CB1BF

Tests

Test# Started execution Ended execution
Test 1 09-Oct-2018 11:20:55 09-Oct-2018 11:20:55

Summary

File Contents/Complexity   Test 1
    Decision Condition MCDC
1 . LighTsControl.c 8 82%
67%
50%
2 . . . STEP_LighTsControl 7 82%
67%
50%
3 . . . INIT_LighTsControl 1 --
--
--

Details

1. File LighTsControl.c

Justify or Exclude
Function: STEP_LighTsControl (line 27)
INIT_LighTsControl (line 139)

Metric Coverage
Cyclomatic Complexity 8
Decision (D1) 82% (9/11) decision outcomes
Condition (C1) 67% (8/12) condition outcomes
MCDC (C1) 50% (1/2) conditions reversed the outcome

2. Function STEP_LighTsControl (line 27)

Justify or Exclude
File: LighTsControl.c (code)
Covered expressions: (LighTsControl_UnitDelay1 >= QFParams.HysteresisStepsOff) || rtb_intensity_isOn (line 47)
LighTsControl_UnitDelay3 (line 50)
light_intensity > QFParams.MinLightOff (line 67)
light_intensity < QFParams.MinLightOn (line 88)
light_switch (line 107)
LighTsControl_UnitDelay2 >= QFParams.HysteresisStepsOn (line 37)
rtb_intensity_isOn (line 48)
light_intensity <= QFParams.MinLightOff (line 56)
LighTsControl_UnitDelay (line 117)

Metric Coverage
Cyclomatic Complexity 7
Decision (D1) 82% (9/11) decision outcomes
Condition (C1) 67% (8/12) condition outcomes
MCDC (C1) 50% (1/2) conditions reversed the outcome
Full Coverage

Covered expressions Metric
LighTsControl_UnitDelay3 (line 50) Decision
light_switch (line 107) Decision
LighTsControl_UnitDelay2 >= QFParams.HysteresisStepsOn (line 37) Condition

2.1. Decision/Condition (LighTsControl_UnitDelay1 >= QFParams.HysteresisStepsOff) || rtb_intensity_isOn (line 47)

Justify or Exclude
Function: STEP_LighTsControl

Metric Coverage
Decision (D1) 100% (2/2) decision outcomes
Condition (C1) 75% (3/4) condition outcomes
MCDC (C1) 50% (1/2) conditions reversed the outcome
Conditions analyzed:
Description: True False
LighTsControl_UnitDelay1 >= QFParams.HysteresisStepsOff 0 30
rtb_intensity_isOn 26 4
MC/DC analysis (combinations in parentheses did not occur)
decision outcomes: True Out False Out
Conditions:
LighTsControl_UnitDelay1 >= QFParams.HysteresisStepsOff (Tx) FF
rtb_intensity_isOn FT FF

2.2. Decision light_intensity > QFParams.MinLightOff (line 67)

Justify or Exclude
Function: STEP_LighTsControl

Metric Coverage
Decision (D1) 50% (1/2) decision outcomes
Decisions analyzed:
light_intensity > QFParams.MinLightOff 50%
false 30/30
true 0/30

2.3. Decision light_intensity < QFParams.MinLightOn (line 88)

Justify or Exclude
Function: STEP_LighTsControl

Metric Coverage
Decision (D1) 50% (1/2) decision outcomes
Decisions analyzed:
light_intensity < QFParams.MinLightOn 50%
false 0/30
true 30/30

2.4. Condition rtb_intensity_isOn (line 48)

Justify or Exclude
Function: STEP_LighTsControl

Metric Coverage
Condition (C1) 50% (1/2) condition outcomes
Conditions analyzed:
Description: True False
rtb_intensity_isOn 26 0

2.5. Condition light_intensity <= QFParams.MinLightOff (line 56)

Justify or Exclude
Function: STEP_LighTsControl

Metric Coverage
Condition (C1) 50% (1/2) condition outcomes
Conditions analyzed:
Description: True False
light_intensity <= QFParams.MinLightOff 2 0

2.6. Condition LighTsControl_UnitDelay (line 117)

Justify or Exclude
Function: STEP_LighTsControl

Metric Coverage
Condition (C1) 50% (1/2) condition outcomes
Conditions analyzed:
Description: True False
LighTsControl_UnitDelay 6 0

3. Function INIT_LighTsControl (line 139)

File: LighTsControl.c (code)

Metric Coverage
Cyclomatic Complexity 1

Code

        
1/*
2 * File: LighTsControl.c
3 *
4 * Code generated for Simulink model 'LighTsControl'.
5 *
6 * Model version : 1.284
7 * Simulink Coder version : 8.7 (R2014b) 08-Sep-2014
8 * C/C++ source code generated on : Fri Dec 09 15:07:50 2016
9 *
10 * Target selection: ert.tlc
11 * Embedded hardware selection: 32-bit Generic
12 * Code generation objectives: Unspecified
13 * Validation result: Not run
14 */
15
16#include "LighTsControl.h"
17
18/* Exported data definition */
19
20/* Definition for custom storage class: FileScope */
21static boolean_T LighTsControl_UnitDelay;
22static uint32_T LighTsControl_UnitDelay1;
23static uint32_T LighTsControl_UnitDelay2;
24static boolean_T LighTsControl_UnitDelay3;
25
26/* Model step function */
27void STEP_LighTsControl(const uint32_T light_switch, const uint32_T
28 light_intensity, boolean_T *headlight)
29{
30 boolean_T rtb_intensity_isOn;
31
32 /* Outputs for Atomic SubSystem: '<Root>/LighTsControl' */
33 /* RelationalOperator: '<S1>/RelationalOperator1' incorporates:
34 * Constant: '<S1>/HysteresisStepsOn'
35 * UnitDelay: '<S3>/LighTsControl_UnitDelay2'
36 */
37 rtb_intensity_isOn = (LighTsControl_UnitDelay2 >= QFParams.HysteresisStepsOn);
38
39 /* Switch: '<S1>/Switch1' incorporates:
40 * Constant: '<S1>/HysteresisStepsOff'
41 * Logic: '<S1>/switchheadlighttoonoroff'
42 * RelationalOperator: '<S1>/RelationalOperator2'
43 * Switch: '<S1>/Switch'
44 * UnitDelay: '<S1>/LighTsControl_UnitDelay3'
45 * UnitDelay: '<S2>/LighTsControl_UnitDelay1'
46 */
47 if ((LighTsControl_UnitDelay1 >= QFParams.HysteresisStepsOff) || rtb_intensity_isOn) {
48 LighTsControl_UnitDelay = rtb_intensity_isOn;
49 } else {
50 if (LighTsControl_UnitDelay3) {
51 /* Switch: '<S1>/Switch' incorporates:
52 * Constant: '<S1>/MinLightOff'
53 * Inport: '<Root>/light_intensity'
54 * RelationalOperator: '<S1>/RelationalOperator'
55 */
56 LighTsControl_UnitDelay = (light_intensity <= QFParams.MinLightOff);
57 }
58 }
59
60 /* End of Switch: '<S1>/Switch1' */
61
62 /* Switch: '<S2>/counttime1' incorporates:
63 * Constant: '<S1>/MinLightOff1'
64 * Inport: '<Root>/light_intensity'
65 * RelationalOperator: '<S1>/RelationalOperator3'
66 */
67 if (light_intensity > QFParams.MinLightOff) {
68 /* Update for UnitDelay: '<S2>/LighTsControl_UnitDelay1' incorporates:
69 * Constant: '<S2>/Constant'
70 * Sum: '<S2>/Add1'
71 * UnitDelay: '<S2>/LighTsControl_UnitDelay1'
72 */
73 LighTsControl_UnitDelay1 = LighTsControl_UnitDelay1 + 1U;
74 } else {
75 /* Update for UnitDelay: '<S2>/LighTsControl_UnitDelay1' incorporates:
76 * Constant: '<S2>/Constant3'
77 */
78 LighTsControl_UnitDelay1 = 0U;
79 }
80
81 /* End of Switch: '<S2>/counttime1' */
82
83 /* Switch: '<S3>/counttime1' incorporates:
84 * Constant: '<S1>/MinLightOn'
85 * Inport: '<Root>/light_intensity'
86 * RelationalOperator: '<S1>/RelationalOperator4'
87 */
88 if (light_intensity < QFParams.MinLightOn) {
89 /* Update for UnitDelay: '<S3>/LighTsControl_UnitDelay2' incorporates:
90 * Constant: '<S3>/Constant'
91 * Sum: '<S3>/Add1'
92 * UnitDelay: '<S3>/LighTsControl_UnitDelay2'
93 */
94 LighTsControl_UnitDelay2 = LighTsControl_UnitDelay2 + 1U;
95 } else {
96 /* Update for UnitDelay: '<S3>/LighTsControl_UnitDelay2' incorporates:
97 * Constant: '<S3>/Constant3'
98 */
99 LighTsControl_UnitDelay2 = 0U;
100 }
101
102 /* End of Switch: '<S3>/counttime1' */
103
104 /* MultiPortSwitch: '<S1>/MultiportSwitch' incorporates:
105 * Inport: '<Root>/light_switch'
106 */
107 switch (light_switch) {
108 case 0:
109 /* Outport: '<Root>/headlight' incorporates:
110 * Constant: '<S1>/Constant'
111 */
112 *headlight = false;
113 break;
114
115 case 1:
116 /* Outport: '<Root>/headlight' */
117 *headlight = LighTsControl_UnitDelay;
118 break;
119
120 default:
121 /* Outport: '<Root>/headlight' incorporates:
122 * Constant: '<S1>/Constant1'
123 */
124 *headlight = true;
125 break;
126 }
127
128 /* End of MultiPortSwitch: '<S1>/MultiportSwitch' */
129
130 /* Update for UnitDelay: '<S1>/LighTsControl_UnitDelay3' incorporates:
131 * Constant: '<S1>/Constant2'
132 */
133 LighTsControl_UnitDelay3 = false;
134
135 /* End of Outputs for SubSystem: '<Root>/LighTsControl' */
136}
137
138/* Model initialize function */
139void INIT_LighTsControl(void)
140{
141 /* Registration code */
142
143 /* states (dwork) */
144
145 /* custom states */
146 LighTsControl_UnitDelay2 = 0U;
147 LighTsControl_UnitDelay1 = 0U;
148 LighTsControl_UnitDelay = false;
149 LighTsControl_UnitDelay3 = false;
150
151 /* InitializeConditions for Atomic SubSystem: '<Root>/LighTsControl' */
152 /* InitializeConditions for UnitDelay: '<S1>/LighTsControl_UnitDelay3' */
153 LighTsControl_UnitDelay3 = true;
154
155 /* End of InitializeConditions for SubSystem: '<Root>/LighTsControl' */
156}
157
158/*
159 * File trailer for generated code.
160 *
161 * [EOF]
162 */
163

S-Function Coverage Summary Report for LighTsControl_SIL_SFun

Table Of Contents

  1. Analysis Information
  2. Tests
  3. Summary

Analysis Information

Model Information

Model version 1.442
Author TechDirector
Last saved Tue Oct 09 11:20:54 2018
Justify or Exclude

S-Function Instance

Included instance: LTC_R2017/LighTsControl/LighTsControl_SIL/EZTEST_SFun  

Tests

Test# Started execution Ended execution
Test 1 09-Oct-2018 11:20:55 09-Oct-2018 11:20:55

Summary

File/Complexity   Test 1
    Decision Condition MCDC
TOTAL COVERAGE 11 82%
67%
50%
1. . . . EZTEST_wrapper.c 3 --
--
--
2. . . . LighTsControl.c 8 82%
67%
50%