-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathteste_interrup.vhd
50 lines (44 loc) · 1.83 KB
/
teste_interrup.vhd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
-------------------------------------------------------------------------------
-- Title : Gerencia as interrupcoes
-- Project :
-------------------------------------------------------------------------------
-- File : BancoInterrup.vhd
-- Author : Jose Rodrigues
-- Standard : VHDL'87
-------------------------------------------------------------------------------
-- Description: Arquivo ainda em construcao
-------------------------------------------------------------------------------
library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
Entity teste is
Generic (n :natural := 16);
Port(outint :unsigned(n-1 downto 0));
End entity;
Architecture estrutural of teste is
Signal clk : std_logic := '0';
Signal rst : std_logic;
Signal we : std_logic := '1';
Signal jal : std_logic; -- ocorreu um jal;
Signal hab : std_logic; -- habilita as interrupcoes;
Signal VetorInterrup : unsigned(n-1 downto 0):=(others => '1'); -- OBS1;
Signal VetorHabilita : unsigned(n-1 downto 0); -- OBS2;
Signal RegHab : unsigned(n-1 downto 0); -- indica as interrupcoes que estao habilitadas no programa utilizado;
Signal pulo : std_logic; -- manda o processador fazer um jal;
Signal InstrucInterrup : unsigned(n-1 downto 0); -- instrucao a ser mandada no para o pipeline;
Signal IntEnCo, IntEnOv: std_logic;
Begin
Interrup: Entity work.interrupcoes
generic map(n) port map(clk,rst,we,jal,hab,VetorInterrup,VetorHabilita,RegHab,pulo,InstrucInterrup,IntEnCo, IntEnOv);
process(clk)
Begin
clk <= not clk after 5ns;
end process;
process
Begin
VetorInterrup <= (others =>'0') after 9ns;
end process;
hab <= '1';
rst <= '1';
VetorHabilita <= to_unsigned(33,n);
end estrutural;