Generated on 2021-09-29 19:16:25

The following table shows fixed point instrumentation results

Fixed-Point Report DSP

Simulation Coverage Code
100%
function OutputA = DSP(InputA)
%#codegen
persistent out0; %Retains variable value between function calls.
Once
if isempty(out0) %Initialize the value for the first call.
    out0 = 0;
end
100%

upperThreshold = floor(2^15/10); %Set the upper threshold to 1/10 of the full positive range.
lowerThreshold = -floor(2^15/10); %Set the lower threshold to 1/10 of the full negative range.
 
14%
if InputA >upperThreshold %Logic to perform the Schmitt trigger function.
    out0 = 2^15-1;
9%
elseif InputA <lowerThreshold
    out0 = 0;
end
100%

OutputA = out0; %Assign variable out0 to the output.
end
Variable NameTypeSim MinSim MaxStatic MinStatic MaxWhole NumberProposedType
(Best For WL = 14)
InputA*double-71707432Yesnumerictype(1, 16, 0)
OutputA*double032767Yesnumerictype(1, 16, 0)
lowerThresholddouble-3276-3276Yesnumerictype(1, 13, 0)
out0double032767Yesnumerictype(0, 15, 0)
upperThresholddouble32763276Yesnumerictype(0, 12, 0)