function hdlblkmask_mathlib_rsqrt(curr_blk_name, iterations,OutDataTypeStr,latencyMode,customLatencyValue)
%

%   Copyright 2021-2023 The MathWorks, Inc.
if(isnumerictype(OutDataTypeStr) || isa(OutDataTypeStr, 'Simulink.NumericType'))
    OutDataTypeStr = fixed.internal.type.toStringNumericType(OutDataTypeStr);
end
set_param([curr_blk_name,'/rSqrt'], 'AlgorithmType','Newton-Raphson');
set_param([curr_blk_name,'/rSqrt'], 'Iterations',num2str(iterations));
set_param([curr_blk_name,'/rSqrt'], 'OutDataTypeStr',OutDataTypeStr);

switch(latencyMode)
    case 1
        latencyString ='Max';
    case 2
        latencyString ='Min';         
    case 3
        latencyString ='Custom';
    case 4
        latencyString ='Zero';
    otherwise
        latencyString ='Max';
end

hdlset_param([curr_blk_name,'/rSqrt'], 'LatencyStrategy',latencyString);
hdlset_param([curr_blk_name,'/rSqrt'], 'CustomLatency',customLatencyValue);

end
