mirror of
https://github.com/openhwgroup/cvw
synced 2025-02-11 06:05:49 +00:00
remove redundant logic
This commit is contained in:
parent
7fdb419688
commit
815af68298
@ -58,7 +58,7 @@ module divremsqrtshiftcorrection import cvw::*; #(parameter cvw_t P) (
|
|||||||
// correct the shifting error caused by the LZA
|
// correct the shifting error caused by the LZA
|
||||||
// - the only possible mantissa for a plus two is all zeroes
|
// - the only possible mantissa for a plus two is all zeroes
|
||||||
// - a one has to propigate all the way through a sum. so we can leave the bottom statement alone
|
// - a one has to propigate all the way through a sum. so we can leave the bottom statement alone
|
||||||
mux2 #(P.NORMSHIFTSZ-2) lzacorrmux(Shifted[P.NORMSHIFTSZ-3:0], Shifted[P.NORMSHIFTSZ-2:1], LZAPlus1, CorrSumShifted);
|
//mux2 #(P.NORMSHIFTSZ-2) lzacorrmux(Shifted[P.NORMSHIFTSZ-3:0], Shifted[P.NORMSHIFTSZ-2:1], LZAPlus1, CorrSumShifted);
|
||||||
|
|
||||||
// correct the shifting of the divsqrt caused by producing a result in (2, .5] range
|
// correct the shifting of the divsqrt caused by producing a result in (2, .5] range
|
||||||
// condition: if the msb is 1 or the exponent was one, but the shifted quotent was < 1 (Subnorm)
|
// condition: if the msb is 1 or the exponent was one, but the shifted quotent was < 1 (Subnorm)
|
||||||
@ -70,7 +70,8 @@ module divremsqrtshiftcorrection import cvw::*; #(parameter cvw_t P) (
|
|||||||
// if the result of the divider was calculated to be subnormal, then the result was correctly normalized, so select the top shifted bits
|
// if the result of the divider was calculated to be subnormal, then the result was correctly normalized, so select the top shifted bits
|
||||||
always_comb
|
always_comb
|
||||||
//if(FmaOp) Mf = {CorrSumShifted, {P.CORRSHIFTSZ-(3*P.NF+4){1'b0}}};
|
//if(FmaOp) Mf = {CorrSumShifted, {P.CORRSHIFTSZ-(3*P.NF+4){1'b0}}};
|
||||||
if (DivOp&~DivResSubnorm) Mf = CorrQmShifted;
|
//if (DivOp&~DivResSubnorm) Mf = CorrQmShifted;
|
||||||
|
if (~DivResSubnorm) Mf = CorrQmShifted;
|
||||||
else Mf = Shifted[P.NORMSHIFTSZ-1:P.NORMSHIFTSZ-P.CORRSHIFTSZ];
|
else Mf = Shifted[P.NORMSHIFTSZ-1:P.NORMSHIFTSZ-P.CORRSHIFTSZ];
|
||||||
|
|
||||||
// Determine sum's exponent
|
// Determine sum's exponent
|
||||||
|
Loading…
Reference in New Issue
Block a user