forked from Github_Repos/cvw
forgot a file
This commit is contained in:
parent
97ded2cdd9
commit
86cdbd90e6
15
pipelined/src/fpu/divshiftcalc.sv
Normal file
15
pipelined/src/fpu/divshiftcalc.sv
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
`include "wally-config.vh"
|
||||||
|
|
||||||
|
module divshiftcalc(
|
||||||
|
input logic [`DIVLEN+2:0] Quot,
|
||||||
|
input logic [`NE:0] DivCalcExpM,
|
||||||
|
output logic [$clog2(`NORMSHIFTSZ)-1:0] DivShiftAmt,
|
||||||
|
output logic [`NE:0] CorrDivExp
|
||||||
|
);
|
||||||
|
|
||||||
|
assign DivShiftAmt = {{$clog2(`NORMSHIFTSZ)-1{1'b0}}, ~Quot[`DIVLEN+2]};
|
||||||
|
// the quotent is in the range [.5,2)
|
||||||
|
// if the quotent < 1 and not denormal then subtract 1 to account for the normalization shift
|
||||||
|
assign CorrDivExp = DivCalcExpM - {(`NE)'(0), ~Quot[`DIVLEN+2]};
|
||||||
|
|
||||||
|
endmodule
|
Loading…
Reference in New Issue
Block a user