library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity mainmoduleexam is
port (clk , c0 , c1 , start : in std_logic ;
pli : in std_logic_vector (4 downto 1);
sli, sri : in std_logic ;
po: out std_logic_vector (4 downto 1)
);
end mainmoduleexam;
architecture Behavioral of mainmoduleexam is
component datapath is
port (clk , sl , sr, pl : in std_logic ;
sil , sir : in std_logic ;
pli: in std_logic_vector (4 downto 1);
pl0: out std_logic_vector (4 downto 1 )
);
end component;
component controller is
port (clk , start , c0 ,c1 : in std_logic ;
sl, sr , pl : out std_logic );
end component;
signal s_sl , s_sr , s_pl : std_logic ;
begin
data : datapath port map(clk , s_sl , s_sr , s_pl , sli , sri , pli , po);
control : controller port map ( clk,start , c0 ,c1, s_sl , s_sr , s_pl ) ;
end Behavioral;