1
0

don't mix SInt/UInt

This commit is contained in:
Andrew Waterman 2016-01-12 16:27:14 -08:00
parent 00d17abd78
commit ae98af7077

View File

@ -305,12 +305,12 @@ class IntToFP(val latency: Int) extends Module
Mux(in.bits.typ(0), in.bits.in1(31,0).zext, in.bits.in1(31,0).toSInt)) Mux(in.bits.typ(0), in.bits.in1(31,0).zext, in.bits.in1(31,0).toSInt))
val l2s = Module(new hardfloat.INToRecFN(64, 8, 24)) val l2s = Module(new hardfloat.INToRecFN(64, 8, 24))
l2s.io.signedIn := ~in.bits.typ(0) l2s.io.signedIn := ~in.bits.typ(0)
l2s.io.in := longValue l2s.io.in := longValue.toUInt
l2s.io.roundingMode := in.bits.rm l2s.io.roundingMode := in.bits.rm
val l2d = Module(new hardfloat.INToRecFN(64, 11, 53)) val l2d = Module(new hardfloat.INToRecFN(64, 11, 53))
l2d.io.signedIn := ~in.bits.typ(0) l2d.io.signedIn := ~in.bits.typ(0)
l2d.io.in := longValue l2d.io.in := longValue.toUInt
l2d.io.roundingMode := in.bits.rm l2d.io.roundingMode := in.bits.rm
when (in.bits.cmd === FCMD_CVT_FI) { when (in.bits.cmd === FCMD_CVT_FI) {