2 use ieee.std_logic_1164.all;
3 use ieee.std_logic_unsigned.all;
6 port ( a, b, m : in std_logic_vector (7 downto 0);
7 o : out std_logic_vector (7 downto 0);
10 n, v, z : out std_logic;
15 architecture rtl of alu is
17 port ( a, b : in std_logic_vector (7 downto 0);
18 sum : out std_logic_vector (7 downto 0);
21 n, v, z : out std_logic
25 port ( a, b : in std_logic_vector (7 downto 0);
26 and_o : out std_logic_vector (7 downto 0);
30 signal adc_o : std_logic_vector (7 downto 0);
31 signal adc_cout, adc_n, adc_v, adc_z : std_logic;
32 signal and_o : std_logic_vector (7 downto 0);
33 signal and_n, and_z : std_logic;
35 adc_port : alu_adc port map (a, b, adc_o, cin, adc_cout, adc_n, adc_v, adc_z);
36 and_port : alu_and port map (a, b, and_o, and_n, and_z);
38 p : process (a, b, m, cin, adc_o, and_o)
40 -- m is form of "aaabbbcc"
41 if m(1 downto 0) = "01" then
59 elsif m(1 downto 0) = "10" then
61 elsif m(1 downto 0) = "00" then