2018-07-26 21:44:35 +02:00
|
|
|
library ieee;
|
|
|
|
|
|
|
|
use ieee.std_logic_1164.all;
|
|
|
|
|
|
|
|
entity CPLD2 is
|
|
|
|
port (
|
|
|
|
func: in std_logic_vector(3 downto 0);
|
2020-02-24 22:15:34 +01:00
|
|
|
accu: in std_logic_vector(11 downto 6);
|
|
|
|
ram: in std_logic_vector(11 downto 6);
|
2018-07-26 21:44:35 +02:00
|
|
|
carry_in: in std_logic;
|
2020-02-24 22:15:34 +01:00
|
|
|
result: out std_logic_vector(11 downto 6)
|
2018-07-26 21:44:35 +02:00
|
|
|
);
|
|
|
|
end CPLD2;
|
|
|
|
|
|
|
|
architecture rtl of CPLD2 is
|
|
|
|
begin
|
|
|
|
|
|
|
|
alu: entity work.alu generic map (
|
2020-02-24 22:15:34 +01:00
|
|
|
WIDTH => 6,
|
2018-07-26 21:44:35 +02:00
|
|
|
FIRST => false
|
|
|
|
) port map (
|
|
|
|
func => func,
|
|
|
|
accu => accu,
|
|
|
|
ram => ram,
|
|
|
|
carry_in => carry_in,
|
|
|
|
result => result,
|
|
|
|
carry_out => open
|
|
|
|
);
|
|
|
|
|
|
|
|
end rtl;
|