74 lines
1.8 KiB
VHDL
74 lines
1.8 KiB
VHDL
library ieee;
|
|
use ieee.std_logic_1164.all;
|
|
use ieee.numeric_std.all;
|
|
|
|
library work;
|
|
use work.reg32.all;
|
|
use work.task.all;
|
|
|
|
entity task_add is
|
|
port (
|
|
clk : in std_logic;
|
|
reset : in std_logic;
|
|
|
|
address : in std_logic_vector( 3 downto 0 );
|
|
read : in std_logic;
|
|
readdata : out std_logic_vector( 31 downto 0 );
|
|
write : in std_logic;
|
|
writedata : in std_logic_vector( 31 downto 0 );
|
|
|
|
signal_a_read : out std_logic;
|
|
signal_a_readdata : in std_logic_vector( 31 downto 0 );
|
|
|
|
signal_b_read : out std_logic;
|
|
signal_b_readdata : in std_logic_vector( 31 downto 0 );
|
|
|
|
signal_write : out std_logic;
|
|
signal_writedata : out std_logic_vector( 31 downto 0 )
|
|
);
|
|
end entity task_add;
|
|
|
|
architecture struct of task_add is
|
|
|
|
signal task_start : std_logic;
|
|
signal task_state : work.task.State := work.task.TASK_IDLE;
|
|
signal task_config : work.reg32.RegArray( 0 to 2 );
|
|
|
|
begin
|
|
u_control: entity work.hardware_task_control
|
|
port map (
|
|
clk => clk,
|
|
reset => reset,
|
|
|
|
address => address,
|
|
read => read,
|
|
readdata => readdata,
|
|
write => write,
|
|
writedata => writedata,
|
|
|
|
task_start => task_start,
|
|
task_state => task_state,
|
|
task_config => task_config
|
|
);
|
|
|
|
u_add: entity work.add
|
|
port map (
|
|
clk => clk,
|
|
reset => reset,
|
|
|
|
task_start => task_start,
|
|
task_state => task_state,
|
|
|
|
signal_a_read => signal_a_read,
|
|
signal_a_readdata => signal_a_readdata,
|
|
|
|
signal_b_read => signal_b_read,
|
|
signal_b_readdata => signal_b_readdata,
|
|
|
|
signal_write => signal_write,
|
|
signal_writedata => signal_writedata
|
|
);
|
|
|
|
end architecture struct;
|
|
|