Курсовая работа: Разработка структуры процессора на основе МПА с жесткой логикой
----------------------------------------------------------------------------------
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
entity PC is
port(D: in std_logic_vector(7 downto 0);
Q: out std_logic_vector(7 downto 0);
EI: in std_logic;
Inc: in std_logic;
RST: in std_logic;
Clk: in std_logic);
end PC;
architecture PC of PC is
signal master, slave, slave_inc: std_logic_vector(7 downto 0);
begin
Q<=slave;
slave_inc<=slave+1 after 2ns;
process(D,RST,Clk,EI,Inc,slave_inc)
begin
if Clk='0' then
if RST='1' then master<=(others => '0') after 2ns;
elsif EI='1' then master<=D after 2ns;
elsif Inc='1' then master<=slave_inc after 2ns;
end if;
end if;
end process;
process(master,Clk)
begin
if Clk='1'then slave<=master after 2ns;