2018-07-26 21:44:35 +02:00
|
|
|
library ieee;
|
|
|
|
|
|
|
|
use ieee.std_logic_1164.all;
|
|
|
|
|
|
|
|
entity CPLD1 is
|
|
|
|
port (
|
|
|
|
func: in std_logic_vector(3 downto 0);
|
2020-02-24 22:15:34 +01:00
|
|
|
accu: in std_logic_vector(5 downto 0);
|
|
|
|
ram: in std_logic_vector(5 downto 0);
|
|
|
|
result: out std_logic_vector(5 downto 0);
|
2018-07-26 21:44:35 +02:00
|
|
|
carry_out: out std_logic
|
|
|
|
);
|
|
|
|
end CPLD1;
|
|
|
|
|
|
|
|
architecture rtl of CPLD1 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 => true
|
|
|
|
) port map (
|
|
|
|
func => func,
|
|
|
|
accu => accu,
|
|
|
|
ram => ram,
|
|
|
|
carry_in => '0',
|
|
|
|
result => result,
|
|
|
|
carry_out => carry_out
|
|
|
|
);
|
|
|
|
|
|
|
|
end rtl;
|