PoC.arith.div
Implementation of a Non-Performing restoring divider with a configurable radix. The multi-cycle division is controlled by ‘start’ / ‘rdy’. A new division is started by asserting ‘start’. The result Q = A/D is available when ‘rdy’ returns to ‘1’. A division by zero is identified by output Z. The Q and R outputs are undefined in this case.
Entity Declaration:
1 D_BITS : positive; -- Divisor Width
2 RAPOW : positive := 1; -- Power of Compute Radix (2**RAPOW)
3 PIPELINED : boolean := false -- Computation Pipeline
4 );
5 port (
6 -- Global Reset/Clock
7 clk : in std_logic;
8 rst : in std_logic;
9
10 -- Ready / Start
11 start : in std_logic;
12 ready : out std_logic;
13
14 -- Arguments / Result (2's complement)
15 A : in std_logic_vector(A_BITS-1 downto 0); -- Dividend
16 D : in std_logic_vector(D_BITS-1 downto 0); -- Divisor
17 Q : out std_logic_vector(A_BITS-1 downto 0); -- Quotient
18 R : out std_logic_vector(D_BITS-1 downto 0); -- Remainder
19 Z : out std_logic -- Division by Zero
20 );
21end entity arith_div;
22
23
24library IEEE;