Chargement…
Chargement…
The circuit uses restoring binary division. It processes one dividend bit per cycle instead of using a large combinational divider.
Behaviour
i_start pulse is accepted only while o_ready='1'.i_dividend and i_divisor are captured at start.o_done pulses for one cycle when o_quotient and o_remainder are ready.o_divide_by_zero and o_done pulse without starting the eight iterations. The quotient is 0 and the remainder equals the dividend.On each iteration:
1. shift the partial remainder and bring in the dividend most-significant bit;
2. compare that extended remainder with the divisor;
3. subtract the divisor when the comparison succeeds;
4. shift the quotient and insert the resulting bit;
5. shift the dividend toward the next bit.
After eight iterations, quotient and remainder must satisfy dividend = quotient * divisor + remainder, with remainder < divisor.
| Signal | Direction | Width | Description |
|---|---|---|---|
i_clk | Input | 1 bit | System clock |
i_reset | Input | 1 bit | Active-high asynchronous reset |
i_start | Input | 1 bit | Starts an operation while the block is ready |
i_dividend | Input | 8 bits | Unsigned dividend |
i_divisor | Input | 8 bits | Unsigned divisor |
o_ready | Output | 1 bit | The block can accept a new operation |
o_done | Output | 1 bit | Result valid for one cycle |
o_divide_by_zero | Output | 1 bit | Divide-by-zero error for one cycle |
o_quotient | Output | 8 bits | Integer quotient |
o_remainder | Output | 8 bits | Integer remainder |