mirror of
https://github.com/openhwgroup/cvw
synced 2025-02-11 06:05:49 +00:00
Partial divider cleanup 2
This commit is contained in:
parent
fe69513bb7
commit
775520c05a
@ -88,13 +88,14 @@ module intdivrestoring (
|
|||||||
// busy logic
|
// busy logic
|
||||||
always_ff @(posedge clk)
|
always_ff @(posedge clk)
|
||||||
if (reset) begin
|
if (reset) begin
|
||||||
BusyE = 0; done = 0; step = 0;
|
BusyE = 0; done = 0; step = 0; init = 0;
|
||||||
end else if (StartDivideE & ~StallM) begin
|
end else if (StartDivideE & ~StallM) begin
|
||||||
if (div0) done = 1;
|
if (div0) done = 1;
|
||||||
else begin
|
else begin
|
||||||
BusyE = 1; step = 0;
|
BusyE = 1; step = 0; init = 1;
|
||||||
end
|
end
|
||||||
end else if (BusyE & ~done) begin // pause one cycle at beginning of signed operations for absolute value
|
end else if (BusyE & ~done) begin // pause one cycle at beginning of signed operations for absolute value
|
||||||
|
init = 0;
|
||||||
step = step + 1;
|
step = step + 1;
|
||||||
if (step[STEPBITS]) begin
|
if (step[STEPBITS]) begin
|
||||||
step = 0;
|
step = 0;
|
||||||
@ -105,7 +106,7 @@ module intdivrestoring (
|
|||||||
done = 0;
|
done = 0;
|
||||||
BusyE = 0;
|
BusyE = 0;
|
||||||
end
|
end
|
||||||
assign init = (step == 0);
|
//assign init = (step == 0);
|
||||||
|
|
||||||
|
|
||||||
endmodule // muldiv
|
endmodule // muldiv
|
||||||
|
Loading…
Reference in New Issue
Block a user