forked from Github_Repos/cvw
Added more pipeline stage suffixes to divider
This commit is contained in:
parent
b3bded9e6c
commit
418e9cd6e6
@ -63,12 +63,12 @@ module intdivrestoring (
|
||||
|
||||
// Take absolute value for signed operations
|
||||
neg #(`XLEN) negd(DSavedE, DnE);
|
||||
mux2 #(`XLEN) dabsmux(DSavedE, DnE, SignedDivideE & SignDE, Din); // take absolute value for signed operations
|
||||
mux2 #(`XLEN) dabsmux(DnE, DSavedE, SignedDivideE & SignDE, DAbsB); // take absolute value for signed operations, and negate for subtraction setp
|
||||
neg #(`XLEN) negx(XSavedE, XnE);
|
||||
mux2 #(`XLEN) xabsmux(XSavedE, XnE, SignedDivideE & SignXE, Xinit); // need original X as remainder if doing divide by 0
|
||||
|
||||
// Negate D for subtraction
|
||||
assign DAbsB = ~Din;
|
||||
//assign DAbsB = ~Din;
|
||||
// *** merge this into dabsmux if possible
|
||||
// Put suffixes on Xinit, init->DivInitE, Wn, XQn
|
||||
|
||||
|
@ -33,7 +33,7 @@ module intdivrestoringstep(
|
||||
logic qi, qib;
|
||||
|
||||
assign {WShift, XQOut} = {W[`XLEN-2:0], XQ, qi};
|
||||
assign {qib, WPrime} = {1'b0, WShift} + {1'b1, DAbsB} + 1; // subtractor, carry out determines quotient bit ***replace with add
|
||||
assign {qib, WPrime} = {1'b0, WShift} + {1'b1, DAbsB} /*+ 1*/; // subtractor, carry out determines quotient bit ***replace with add
|
||||
assign qi = ~qib;
|
||||
mux2 #(`XLEN) wrestoremux(WShift, WPrime, qi, WOut);
|
||||
endmodule
|
||||
|
Loading…
Reference in New Issue
Block a user