Sipo VHDL Code
Sipo VHDL Code
library ieee;
use ieee.std_logic_1164.all;
entity sipo is
sin: in std_logic;
clk: in std_logic;
end sipo;
begin
begin
if(res='1') then
temp<="0000";
temp(3)<=sin;
temp(2)<=temp(3);
temp(1)<=temp(2);
temp(0)<=temp(1);
end if;
end process;
pout<=temp;
end beh;
LIBRARY ieee;
USE ieee.std_logic_1164.ALL;
ENTITY sr IS
END sr;
ARCHITECTURE behavior OF sr IS
COMPONENT sipo
PORT(
res : IN std_logic;
sin : IN std_logic;
clk : IN std_logic;
);
END COMPONENT;
--Inputs
--Outputs
BEGIN
);
clk_process :process
begin
-- Stimulus process
stim_proc: process
begin
sin<='0';
sin<='0';
sin<='1';
sin<='1';
sin<='0';
sin<='1';
sin<='0';
sin<='1';
sin<='0';
sin<='1';
sin<='0';
sin<='0';
wait;
wait;
end process;
END;