OpenCores
URL https://opencores.org/ocsvn/gpib_controller/gpib_controller/trunk

Subversion Repositories gpib_controller

[/] [gpib_controller/] [trunk/] [vhdl/] [src/] [wrapper/] [InterruptGenerator.vhd] - Blame information for rev 3

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 3 Andrewski
--------------------------------------------------------------------------------
2
-- Entity: InterruptGenerator
3
-- Date:2011-11-25  
4
-- Author: Administrator     
5
--
6
-- Description ${cursor}
7
--------------------------------------------------------------------------------
8
library ieee;
9
use ieee.std_logic_1164.all;
10
use ieee.std_logic_unsigned.all;
11
 
12
use work.helperComponents.all;
13
 
14
 
15
entity InterruptGenerator is
16
        port (
17
                reset : std_logic;
18
                clk : in std_logic;
19
                interrupt : out std_logic;
20
                -------------------- gpib device ---------------------
21
                -- device is local controlled
22
                isLocal : in std_logic;
23
                -- input buffer ready
24
                in_buf_ready : in std_logic;
25
                -- output buffer ready
26
                out_buf_ready : in std_logic;
27
                -- clear device (DC)
28
                clr : in std_logic;
29
                -- trigger device (DT)
30
                trg : in std_logic;
31
                -- addressed to talk(L or LE)
32
                att : in std_logic;
33
                -- addressed to listen (T or TE)
34
                atl : in std_logic;
35
                -- seriall poll active
36
                spa : in std_logic;
37
                -------------------- gpib controller ---------------------
38
                -- controller write commands
39
                cwrc : in std_logic;
40
                -- controller write data
41
                cwrd : in std_logic;
42
                -- service requested
43
                srq : in std_logic;
44
                -- parallel poll ready
45
                ppr : in std_logic;
46
                -- stb received
47
                stb_received : in std_logic;
48
                REN : in std_logic;
49
                ATN : in std_logic;
50
                IFC : in std_logic
51
        );
52
end InterruptGenerator;
53
 
54
architecture arch of InterruptGenerator is
55
 
56
        constant PULSE_WIDTH : integer := 10;
57
 
58
        signal p0, p1, p2, p3, p4, p5, p6, p7 : std_logic;
59
 
60
begin
61
 
62
        interrupt <= p0 or p1 or p2 or p3 or p4 or p5 or p6 or p7;
63
 
64
 
65
        ed0: EdgeDetector generic map (RISING => '1', FALLING => '0',
66
                PULSE_WIDTH => PULSE_WIDTH) port map (
67
                reset => reset, clk => clk, in_data => in_buf_ready, pulse => p0
68
        );
69
 
70
        ed1: EdgeDetector generic map (RISING => '1', FALLING => '0',
71
                PULSE_WIDTH => PULSE_WIDTH) port map (
72
                reset => reset, clk => clk, in_data => out_buf_ready, pulse => p1
73
        );
74
 
75
        ed2: EdgeDetector generic map (RISING => '1', FALLING => '0',
76
                PULSE_WIDTH => PULSE_WIDTH) port map (
77
                reset => reset, clk => clk, in_data => clr, pulse => p2
78
        );
79
 
80
        ed3: EdgeDetector generic map (RISING => '1', FALLING => '0',
81
                PULSE_WIDTH => PULSE_WIDTH) port map (
82
                reset => reset, clk => clk, in_data => trg, pulse => p3
83
        );
84
 
85
        ed4: EdgeDetector generic map (RISING => '1', FALLING => '0',
86
                PULSE_WIDTH => PULSE_WIDTH) port map (
87
                reset => reset, clk => clk, in_data => srq, pulse => p4
88
        );
89
 
90
        ed5: EdgeDetector generic map (RISING => '1', FALLING => '0',
91
                PULSE_WIDTH => PULSE_WIDTH) port map (
92
                reset => reset, clk => clk, in_data => ppr, pulse => p5
93
        );
94
 
95
        ed6: EdgeDetector generic map (RISING => '1', FALLING => '0',
96
                PULSE_WIDTH => PULSE_WIDTH) port map (
97
                reset => reset, clk => clk, in_data => stb_received, pulse => p6
98
        );
99
 
100
        ed7: EdgeDetector generic map (RISING => '1', FALLING => '1',
101
                PULSE_WIDTH => PULSE_WIDTH) port map (
102
                reset => reset, clk => clk, in_data => isLocal, pulse => p7
103
        );
104
 
105
end arch;
106
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.