PoC.arith.sqrt

Iterative Square Root Extractor.

Its computation requires (N+1)/2 steps for an argument bit width of N.

Entity Declaration:

 1entity arith_sqrt is
 2  generic (
 3    N : positive -- := 8                   -- Bit Width of Argument
 4  );
 5  port (
 6    -- Global Control
 7    rst : in std_logic;                -- Reset (synchronous)
 8    clk : in std_logic;                -- Clock
 9
10    -- Inputs
11    arg  : in std_logic_vector(N-1 downto 0); -- Radicand
12    start : in std_logic;                      -- Start Strobe
13
14    -- Outputs
15    sqrt : out std_logic_vector((N-1)/2 downto 0);  -- Result
16    rdy : out std_logic                           -- Ready / Done
17  );
18end entity arith_sqrt;