Merge pull request #603 from stineje/main

Update cvt bug that was caught with new testbench-fp
This commit is contained in:
David Harris 2024-01-30 08:52:01 -08:00 committed by GitHub
commit 06778088ab
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -99,6 +99,6 @@ module cvtshiftcalc import cvw::*; #(parameter cvw_t P) (
// determine if the result underflows ??? -> fp
// - if the first 1 is shifted out of the result then the result underflows
// - can't underflow an integer to fp conversions
assign CvtResUf = ($signed(CvtCe) < $signed({{P.NE-$clog2(P.NF){1'b1}}, ResNegNF}))&~XZero; // dh &~IntToFp not necessary because integer to float conversion never underflows
assign CvtResUf = ($signed(CvtCe) < $signed({{P.NE-$clog2(P.NF){1'b1}}, ResNegNF}))&~XZero&~IntToFp;
endmodule