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

Subversion Repositories gpib_controller

[/] [gpib_controller/] [trunk/] [vhdl/] [src/] [common/] [helperComponents.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: helperComponents
3
-- Date:2011-11-10  
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
 
13
package helperComponents is
14
 
15
        component gpibReader is
16
                port (
17
                        -- clock
18
                        clk : in std_logic;
19
                        -- reset
20
                        reset : std_logic;
21
                        ------------------------------------------------------------------------
22
                        ------ GPIB interface --------------------------------------------------
23
                        ------------------------------------------------------------------------
24
                        -- input data
25
                        data_in : in std_logic_vector (7 downto 0);
26
                        -- data valid
27
                        dvd : in std_logic;
28
                        -- listener active
29
                        lac : in std_logic;
30
                        -- last byte
31
                        lsb : in std_logic;
32
                        -- ready to next byte
33
                        rdy : out std_logic;
34
                        ------------------------------------------------------------------------
35
                        ------ external interface ----------------------------------------------
36
                        ------------------------------------------------------------------------
37
                        -- is LE function active
38
                        isLE : in std_logic;
39
                        -- current secondary address
40
                        secAddr : in std_logic_vector (4 downto 0);
41
                        -- secondary address of data
42
                        dataSecAddr : out std_logic_vector (4 downto 0);
43
                        -- buffer ready interrupt
44
                        buf_interrupt : out std_logic;
45
                        -- indicates end of stream
46
                        end_of_stream : out std_logic;
47
                        -- resets reader
48
                        reset_reader : in std_logic;
49
                        ------------------ fifo --------------------------------------
50
                        -- indicates fifo full
51
                        fifo_full : in std_logic;
52
                        -- indicates fifo ready to write
53
                        fifo_ready_to_write : in std_logic;
54
                        -- indicates at least one byte in fifo
55
                        at_least_one_byte_in_fifo : in std_logic;
56
                        -- output data
57
                        data_out : out std_logic_vector (7 downto 0);
58
                        -- fifo strobe
59
                        fifo_strobe : out std_logic
60
                );
61
        end component;
62
 
63
        component gpibWriter is
64
                port (
65
                        -- clock
66
                        clk : in std_logic;
67
                        -- reset
68
                        reset : std_logic;
69
                        ------------------------------------------------------------------------
70
                        ------ GPIB interface --------------------------------------------------
71
                        ------------------------------------------------------------------------
72
                        -- output data
73
                        data_out : out std_logic_vector (7 downto 0);
74
                        -- wait for new cycle
75
                        wnc : in std_logic;
76
                        -- seriall poll active
77
                        spa : in std_logic;
78
                        -- new byte available
79
                        nba : out std_logic;
80
                        -- end of string
81
                        endOf : out std_logic;
82
                        -- talker active
83
                        tac : in std_logic;
84
                        -- controller write command
85
                        cwrc : in std_logic;
86
                        ------------------------------------------------------------------------
87
                        ------ external interface ----------------------------------------------
88
                        ------------------------------------------------------------------------
89
                        -- TE is extended
90
                        isTE : in std_logic;
91
                        -- current secondary address
92
                        secAddr : in std_logic_vector (4 downto 0);
93
                        -- secondary address of data
94
                        dataSecAddr : in std_logic_vector (4 downto 0);
95
                        -- buffer consumed
96
                        buf_interrupt : out std_logic;
97
                        -- indicates end of stream
98
                        end_of_stream : in std_logic;
99
                        -- resets writer
100
                        reset_writer : in std_logic;
101
                        -- enables writer
102
                        writer_enable : in std_logic;
103
                        ---------------- fifo ---------------------------
104
                        availableFifoBytesCount : in std_logic_vector(10 downto 0);
105
                        -- fifo read strobe
106
                        fifo_read_strobe : out std_logic;
107
                        -- indicates fifo ready to read
108
                        fifo_ready_to_read : in std_logic;
109
                        -- input data
110
                        fifo_data_in : in std_logic_vector (7 downto 0)
111
                );
112
        end component;
113
 
114
        component SerialPollCoordinator is
115
        port (
116
                -- clock
117
                clk : in std_logic;
118
                -- reset
119
                reset : in std_logic;
120
                -- data accepted
121
                DAC : in std_logic;
122
                -- receive status byte
123
                rec_stb : in std_logic;
124
                -- attention in
125
                ATN_in : in std_logic;
126
                -- attention out
127
                ATN_out : out std_logic;
128
                -- output valid in
129
                output_valid_in : in std_logic;
130
                -- output valid out
131
                output_valid_out : out std_logic;
132
                -- stb received
133
                stb_received : out std_logic
134
        );
135
        end component;
136
 
137
        component MemoryBlock is
138
                port (
139
                        reset : in std_logic;
140
                        clk : in std_logic;
141
                        -------------------------------------------------
142
                        p1_addr : in std_logic_vector(10 downto 0);
143
                        p1_data_in : in std_logic_vector(7 downto 0);
144
                        p1_strobe : in std_logic;
145
                        p1_data_out : out std_logic_vector(7 downto 0);
146
                        -------------------------------------------------
147
                        p2_addr : in std_logic_vector(10 downto 0);
148
                        p2_data_in : in std_logic_vector(7 downto 0);
149
                        p2_strobe : in std_logic;
150
                        p2_data_out : out std_logic_vector(7 downto 0)
151
                );
152
        end component;
153
 
154
        component Fifo8b is
155
                generic (
156
                        MAX_ADDR_BIT_NUM : integer := 10
157
                );
158
                port (
159
                        reset : in std_logic;
160
                        clk : in std_logic;
161
                        -------------- fifo --------------------
162
                        bytesAvailable : out std_logic;
163
                        availableBytesCount : out std_logic_vector(MAX_ADDR_BIT_NUM downto 0);
164
                        bufferFull : out std_logic;
165
                        resetFifo : in std_logic;
166
                        ----------------------------------------
167
                        data_in : in std_logic_vector(7 downto 0);
168
                        ready_to_write :out std_logic;
169
                        strobe_write : in std_logic;
170
                        ----------------------------------------
171
                        data_out : out std_logic_vector(7 downto 0);
172
                        ready_to_read : out std_logic;
173
                        strobe_read : in std_logic
174
                );
175
        end component;
176
 
177
        component Clk2x is
178
                port (
179
                        reset: in std_logic;
180
                        clk : in std_logic;
181
                        clk2x : out std_logic
182
                );
183
        end component;
184
 
185
        component SinglePulseGenerator is
186
                generic (
187
                        WIDTH : integer := 3
188
                );
189
 
190
                port (
191
                        reset : in std_logic;
192
                        clk : in std_logic;
193
                        t_in: in std_logic;
194
                        t_out : out std_logic;
195
                        pulse : out std_logic
196
                );
197
        end component;
198
 
199
        component EdgeDetector is
200
                generic (
201
                        RISING : std_logic := '1';
202
                        FALLING : std_logic := '0';
203
                        PULSE_WIDTH : integer := 10
204
                );
205
 
206
                port (
207
                        reset : in std_logic;
208
                        clk : in std_logic;
209
                        in_data : in std_logic;
210
                        pulse : out std_logic
211
                );
212
        end component;
213
 
214
        component EventMem is
215
                port (
216
                        reset : std_logic;
217
                        -- event occured
218
                        occured : in std_logic;
219
                        -- event approved
220
                        approved : in std_logic;
221
                        -- output
222
                        output : out std_logic
223
                );
224
        end component;
225
 
226
        component GpibSynchronizer is
227
                port (
228
                        -- clk
229
                        clk : std_logic;
230
                        -- DIO
231
                        DI : in std_logic_vector (7 downto 0);
232
                        DO : out std_logic_vector (7 downto 0);
233
                        -- attention
234
                        ATN_in : in std_logic;
235
                        ATN_out : out std_logic;
236
                        -- data valid
237
                        DAV_in : in std_logic;
238
                        DAV_out : out std_logic;
239
                        -- not ready for data
240
                        NRFD_in : in std_logic;
241
                        NRFD_out : out std_logic;
242
                        -- no data accepted
243
                        NDAC_in : in std_logic;
244
                        NDAC_out : out std_logic;
245
                        -- end or identify
246
                        EOI_in : in std_logic;
247
                        EOI_out : out std_logic;
248
                        -- service request
249
                        SRQ_in : in std_logic;
250
                        SRQ_out : out std_logic;
251
                        -- interface clear
252
                        IFC_in : in std_logic;
253
                        IFC_out : out std_logic;
254
                        -- remote enable
255
                        REN_in : in std_logic;
256
                        REN_out : out std_logic
257
                );
258
        end component;
259
 
260
end helperComponents;
261
 

powered by: WebSVN 2.1.0

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