본문 바로가기

과제모음

PC-(Program Counter)

반응형
Library IEEE;
use IEEE.std_logic_1164.all;
use IEEE.std_logic_arith.all;
use IEEE.std_logic_unsigned.all;

entity PC is
port(PCce : in std_logic;
 clk : in std_logic;
 rst_n : in std_logic;
 sum : in std_logic_vector(7 downto 0);
 pc_out : out std_logic_vector(7 downto 0));
end PC;

architecture BEHAV of PC is
begin
process(clk, rst_n, Pcce)
begin
if(rst_n = '0')then
pc_out <= (others => '0');

elsif(clk ='0' and clk'event)then
if(PCce = '1') then
pc_out <= sum;
end if;
end if; 
end process;

end BEHAV;

항공대 09 디지털논리실험 프로젝트자료
반응형