Professional Documents
Culture Documents
USE ieee.std_logic_1164.all;
USE ieee.std_logic_unsigned.all;
ENTITY PROJETO_MIC IS
PORT (CLK : IN STD_LOGIC;
RESET : IN STD_LOGIC;
AMUX : IN STD_LOGIC;
ALU : IN STD_LOGIC_VECTOR(1 DOWNTO 0);
MBR : IN STD_LOGIC;
MAR : IN STD_LOGIC;
RD : IN STD_LOGIC;
WR : IN STD_LOGIC;
ENC : IN STD_LOGIC;
C : IN STD_LOGIC_VECTOR(3 DOWNTO 0);
B : IN STD_LOGIC_VECTOR(3 DOWNTO 0);
A : IN STD_LOGIC_VECTOR(3 DOWNTO 0);
SH : IN STD_LOGIC_VECTOR(1 DOWNTO 0);
MEM_TO_MBR : IN STD_LOGIC_VECTOR(15 DOWNTO 0);
DATA_OK : IN STD_LOGIC;
COMPONENT MIC_Banck_Registers
PORT (
Reset : IN std_logic;
Clk : IN std_logic;
Enc : IN std_logic;
A_Address : IN std_logic_vector(3 DOWNTO 0);
B_Address : IN std_logic_vector(3 DOWNTO 0);
C_Address : IN std_logic_vector(3 DOWNTO 0);
C_Input : IN std_logic_vector(15 DOWNTO 0);
A_Output : OUT std_logic_vector(15 DOWNTO 0);
B_Output : OUT std_logic_vector(15 DOWNTO 0));
END COMPONENT;
COMPONENT MIC_amux_alu
PORT (
amux : IN std_logic;
alu : IN std_logic_vector(1 downto 0);
sh : IN std_logic_vector(1 downto 0);
A_Input : IN std_logic_vector(15 DOWNTO 0);
B_Input : IN std_logic_vector(15 DOWNTO 0);
MBR_Input : IN std_logic_vector(15 DOWNTO 0);
N : OUT std_logic;
Z : OUT std_logic;
SH_Output : OUT std_logic_vector(15 DOWNTO 0));
END COMPONENT;
BEGIN
Registers: MIC_Banck_Registers
PORT MAP (
Reset => RESET, -- Segundo Reset é interface do MIC
Clk => CLK, -- Segundo CLK é interface do MIC
Enc => ENC, -- Segundo ENC é interface do MIC
A_Address => A, -- A é interface do MIC
B_Address => B, -- B é interface do MIC
C_Address => C, -- C é interface do MIC
C_Input => C_BUS, -- C_BUS é sinal da arquitetura
A_Output => A_BUS, -- A_BUS é sinal da arquitetura
B_Output => B_BUS -- B_BUS é sinal da arquitetura
);
MUX_ALU_DESLOCADOR: MIC_amux_alu
PORT MAP (
amux => AMUX, -- Segundo AMUX é interface do MIC
alu => ALU, -- segundo ALU é interface do MIC
sh => SH, -- segundo sinal é interface do MIC
A_Input => A_BUS, -- segundo sinal é sinal deste arquivo
B_Input => B_BUS, -- segundo sinal é sinal deste arquivo
MBR_Input => REG_MBR_IN, -- REG_MBR_IN é sinal deste arquivo
N => N, -- Segundo N é interface do MIC
Z => Z, -- Segundo Z é interface do MIC
SH_Output => C_BUS -- C_BUS é sinal deste arquivo
);
END comportamental;