%% Saturation on Integer Overflow Coverage
% Simulate this model to collect and report Saturate on integer overflow coverage.
%
%% Enabling Saturation on integer overflow
%
% To enable the coverage metric *Saturation on integer overflow*:
%
% Click on the _Modeling_ tab in the toolstrip.
% Click on _Model Settings_.
%
% On the left pane, click on _Coverage_.
% Ensure that _Enable coverage analysis_ is checked.
%
% Expand the _Other metrics_ drop down list.
% Check the box next to _Saturation on integer overflow_.
%
%% What Saturation on integer overflow does
%
% The coverage tool identifies all the blocks that have the Saturation on
% integer overflow parameter enabled. After simulating the model, the tool
% reports the number of times each block saturates on integer overflow.
%
% In this example, the test harness supplies the Test Unit with an input
% to reach full coverage on one of the Sum blocks in the Controller
% subsystem.
%
% The other two Sum blocks in the Controller subsystem do not generate true
% cases because they do not reach their saturation thresholds.
%
%% When to use Saturation on integer overflow
%
% Saturation on integer overflow coverage helps to identify missing tests 
% for blocks and blocks that do not need the saturation on integer overflow
% parameter enabled, optimizing design efficiency.
%
% For more information, see <docid:slcoverage_ug#bs9e8_v-1 Saturate on
% Integer Overflow Coverage>.
%
% Copyright 2014-2019 The MathWorks, Inc.
%
open_system('slvnvdemo_saturation_on_overflow_coverage')
evalc('sim(''slvnvdemo_saturation_on_overflow_coverage'')');
