%#codegen
function y = fi_toint(u)
coder.inline('always');
if isfi(u)    
    nt = numerictype(u);
    s = nt.SignednessBool;
    wl = nt.WordLength;
    y = int32(fi(u, s, wl, 0, hdlfimath));
else
    y = int32(u);
end

end

