CMX
CMX firmware code in-line documentation
 All Classes Namespaces Files Functions Variables
and_all.vhd
Go to the documentation of this file.
1 ----------------------------------------------------------------------------------
11 ----------------------------------------------------------------------------------
12 library IEEE;
13 use IEEE.STD_LOGIC_1164.ALL;
14 
15 library work;
16 use work.CMXpackage.all;
17 
18 
19 -- Uncomment the following library declaration if using
20 -- arithmetic functions with Signed or Unsigned values
21 --use IEEE.NUMERIC_STD.ALL;
22 
23 -- Uncomment the following library declaration if instantiating
24 -- any Xilinx primitives in this code.
25 --library UNISIM;
26 --use UNISIM.VComponents.all;
27 
28 entity and_all is
29  generic
30  (
31  numbits : integer := 2 -- Set to 1 to speed up sim reset
32  );
33  port (
34  DATA : in std_logic_vector(numbits - 1 downto 0);
35  and_all : out std_logic);
36 end and_all;
37 
38 architecture Behavioral of and_all is
39  signal tmp : std_logic_vector(numbits - 1 downto 0);
40 
41 begin
42 
43  tmp(0)<=DATA(0);
44  and_gen: for bitnum in 1 to (numbits-1) generate
45  tmp(bitnum) <= DATA(bitnum) and tmp(bitnum-1);
46  end generate and_gen;
47  and_all<=tmp(numbits-1);
48 
49 end Behavioral;
50 
numbitsinteger :=2
Definition: and_all.vhd:31
_library_ workwork
in DATAstd_logic_vector (numbits - 1 downto 0)
Definition: and_all.vhd:34
_library_ ieeeieee
std_logic_vector (numbits - 1 downto 0) tmp
Definition: and_all.vhd:39
out and_allstd_logic
Definition: and_all.vhd:35