PoC.arith.sqrt¶
Iterative Square Root Extractor.
Its computation requires (N+1)/2 steps for an argument bit width of N.
Entity Declaration:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | entity arith_sqrt is
generic (
N : positive -- := 8 -- Bit Width of Argument
);
port (
-- Global Control
rst : in std_logic; -- Reset (synchronous)
clk : in std_logic; -- Clock
-- Inputs
arg : in std_logic_vector(N-1 downto 0); -- Radicand
start : in std_logic; -- Start Strobe
-- Outputs
sqrt : out std_logic_vector((N-1)/2 downto 0); -- Result
rdy : out std_logic -- Ready / Done
);
end entity arith_sqrt;
|