Курсовая работа: Разработка структуры процессора на основе МПА с жесткой логикой
MBROut: out std_logic;
IRIn: out std_logic;
MEMRd: out std_logic;
Reset: inout std_logic;
RST: in std_logic;
Clk: in std_logic);
end CU;
architecture CU of CU is
signal R: std_logic;
signal InstrDecoded,i: std_logic_vector(3 downto 0);
signal CounterPacked: std_logic_vector(2 downto 0);
signal CounterDecoded,c: std_logic_vector(7 downto 0);
component Counter is
port(Q: out std_logic_vector(2 downto 0);
RST: in std_logic;
Clk: in std_logic);
end component;
component Decoder is
generic(n: integer:=2);
port(D: in std_logic_vector(n-1 downto 0);
Q: out std_logic_vector((2**n)-1 downto 0));
end component;
begin
DD0: Counter port map(Q=>CounterPacked,RST=>R,Clk=>Clk);
InstrDecoder: Decoder generic map(2)port map(D=>Instr,Q=>InstrDecoded);
CounterDecoder: Decoder generic map(3)port map(D=>CounterPacked,Q=>CounterDecoded);
c<=CounterDecoded;
i<=InstrDecoded;
MemRd<='1' when c="00000001" or c="00000100" else '0' after 5ns;