PoC.arith.prefix_and

Prefix AND computation: y(i) <= '1' when x(i downto 0) = (i downto 0 => '1') else '0'; This implementation uses carry chains for wider implementations.

Entity Declaration:

1
2
3
4
5
6
7
8
9
entity arith_prefix_and is
  generic (
    N : positive
  );
  port (
    x : in  std_logic_vector(N-1 downto 0);
    y : out std_logic_vector(N-1 downto 0)
  );
end entity;