mirror of
https://github.com/openhwgroup/cvw
synced 2025-02-11 06:05:49 +00:00
removed duplicate quotient mux
This commit is contained in:
parent
1e65bfd058
commit
6ae25537ea
@ -102,14 +102,12 @@ module fdivsqrtpostproc(
|
||||
|
||||
if (`IDIV_ON_FPU) begin
|
||||
logic [`DIVBLEN:0] NormShiftM;
|
||||
logic [`DIVb:0] NormQuotM;
|
||||
logic [`DIVb+3:0] IntQuotM, IntRemM, NormRemM, NormRemDM;
|
||||
|
||||
assign W = $signed(Sum) >>> `LOGR;
|
||||
assign DM = {4'b0001, D};
|
||||
|
||||
// Integer division: sign handling for div and rem
|
||||
mux2 #(`DIVb+1) normquotmux(FirstU, FirstUM, NegStickyM, NormQuotM);
|
||||
// Integer remainder: sticky and sign correction muxes
|
||||
mux2 #(`DIVb+4) normremdmux(W, W+DM, NegStickyM, NormRemDM);
|
||||
mux2 #(`DIVb+4) normremsmux(NormRemDM, -NormRemDM, AsM, NormRemM);
|
||||
|
||||
@ -129,7 +127,7 @@ module fdivsqrtpostproc(
|
||||
IntRemM = '0;
|
||||
end
|
||||
end else begin
|
||||
PreIntQuotM = {3'b000, NormQuotM};
|
||||
PreIntQuotM = {3'b000, PreQmM};
|
||||
IntRemM = NormRemM;
|
||||
end
|
||||
// flip sign if necessary
|
||||
@ -147,7 +145,7 @@ module fdivsqrtpostproc(
|
||||
end
|
||||
|
||||
|
||||
// division takes the result from the next cycle, which is shifted to the left one more time so the square root also needs to be shifted
|
||||
// integer division takes the result from the next cycle, which is shifted to the left one more time so the square root also needs to be shifted
|
||||
|
||||
assign PreFPIntDivResultM = $signed(PreResultM >>> NormShiftM);
|
||||
assign SpecialFPIntDivResultM = BZeroM ? (RemOpM ? AM : {(`XLEN){1'b1}}) : PreFPIntDivResultM[`XLEN-1:0]; // special cases
|
||||
|
Loading…
Reference in New Issue
Block a user