RISC-V has some specific "quirks" in its handling of rounding, tininess and NaN handling, which need to be specifically catered for.
http://www.jhauser.us/arithmetic/HardFloat-1/doc/HardFloat-Verilog.html http://www.jhauser.us/arithmetic/HardFloat.html source is a .zip archive. there is an extremely clean and clear function, roundRawFNtoRecFN in there which has all of the logic for rounding.
not doing RISC-V.