1 |
3 |
Andrewski |
--------------------------------------------------------------------------------
|
2 |
|
|
-- Entity: components
|
3 |
|
|
-- Date: 23:15 10/12/2011
|
4 |
|
|
-- Author: apaluch
|
5 |
|
|
--------------------------------------------------------------------------------
|
6 |
|
|
library IEEE;
|
7 |
|
|
use IEEE.STD_LOGIC_1164.ALL;
|
8 |
|
|
|
9 |
|
|
package gpibComponents is
|
10 |
|
|
|
11 |
|
|
component if_func_AH is
|
12 |
|
|
port(
|
13 |
|
|
-- device inputs
|
14 |
|
|
clk : in std_logic; -- clock
|
15 |
|
|
pon : in std_logic; -- power on
|
16 |
|
|
rdy : in std_logic; -- ready for next message
|
17 |
|
|
tcs : in std_logic; -- take control synchronously
|
18 |
|
|
-- state inputs
|
19 |
|
|
LACS : in std_logic; -- listener active state
|
20 |
|
|
LADS : in std_logic; -- listener addressed state
|
21 |
|
|
-- interface inputs
|
22 |
|
|
ATN : in std_logic; -- attention
|
23 |
|
|
DAV : in std_logic; -- data accepted
|
24 |
|
|
-- interface outputs
|
25 |
|
|
RFD : out std_logic; -- ready for data
|
26 |
|
|
DAC : out std_logic; -- data accepted
|
27 |
|
|
-- reported state
|
28 |
|
|
ANRS : out std_logic; -- acceptor not ready state
|
29 |
|
|
ACDS : out std_logic -- accept data state
|
30 |
|
|
);
|
31 |
|
|
end component;
|
32 |
|
|
|
33 |
|
|
component if_func_SH is
|
34 |
|
|
port(
|
35 |
|
|
-- device inputs
|
36 |
|
|
clk : in std_logic; -- clock
|
37 |
|
|
-- settingd
|
38 |
|
|
T1 : in std_logic_vector (7 downto 0);
|
39 |
|
|
-- local commands
|
40 |
|
|
pon : in std_logic; -- power on
|
41 |
|
|
nba : in std_logic; -- new byte available
|
42 |
|
|
-- state inputs
|
43 |
|
|
TACS : in std_logic; -- talker active state
|
44 |
|
|
SPAS : in std_logic; -- seriall poll active state
|
45 |
|
|
CACS : in std_logic; -- controller active state
|
46 |
|
|
CTRS : in std_logic; -- controller transfer state
|
47 |
|
|
-- interface inputs
|
48 |
|
|
ATN : in std_logic; -- attention
|
49 |
|
|
DAC : in std_logic; -- data accepted
|
50 |
|
|
RFD : in std_logic; -- ready for data
|
51 |
|
|
-- remote instructions
|
52 |
|
|
DAV : out std_logic; -- data address valid
|
53 |
|
|
-- device outputs
|
54 |
|
|
wnc : out std_logic; -- wait for new cycle
|
55 |
|
|
-- reported states
|
56 |
|
|
STRS : out std_logic; -- source transfer state
|
57 |
|
|
SDYS : out std_logic -- source delay state
|
58 |
|
|
);
|
59 |
|
|
end component;
|
60 |
|
|
|
61 |
|
|
component if_func_L_LE is
|
62 |
|
|
port(
|
63 |
|
|
-- clock
|
64 |
|
|
clk : in std_logic; -- clock
|
65 |
|
|
-- function settings
|
66 |
|
|
isLE : in std_logic;
|
67 |
|
|
-- local commands
|
68 |
|
|
pon : in std_logic; -- power on
|
69 |
|
|
ltn : in std_logic; -- listen
|
70 |
|
|
lun : in std_logic; -- local unlisten
|
71 |
|
|
lon : in std_logic; -- listen only
|
72 |
|
|
-- state inputs
|
73 |
|
|
ACDS : in std_logic; -- accept data state (AH)
|
74 |
|
|
CACS : in std_logic; -- controller active state (C)
|
75 |
|
|
TPAS : in std_logic; -- talker primary address state (T)
|
76 |
|
|
-- remote commands
|
77 |
|
|
ATN : in std_logic; -- attention
|
78 |
|
|
IFC : in std_logic; -- interface clear
|
79 |
|
|
MLA : in std_logic; -- my listen address
|
80 |
|
|
MTA : in std_logic; -- my talk address
|
81 |
|
|
UNL : in std_logic; -- unlisten
|
82 |
|
|
PCG : in std_logic; -- primary command group
|
83 |
|
|
MSA : in std_logic; -- my secondary address
|
84 |
|
|
-- reported states
|
85 |
|
|
LACS : out std_logic; -- listener active state
|
86 |
|
|
LADS : out std_logic; -- listener addressed state
|
87 |
|
|
LPAS : out std_logic -- listener primary addressed state
|
88 |
|
|
;debug1 : out std_logic
|
89 |
|
|
);
|
90 |
|
|
end component;
|
91 |
|
|
|
92 |
|
|
component if_func_T_TE is
|
93 |
|
|
port(
|
94 |
|
|
-- clock
|
95 |
|
|
clk : in std_logic; -- clock
|
96 |
|
|
-- function settings
|
97 |
|
|
isTE : in std_logic;
|
98 |
|
|
-- local instruction inputs
|
99 |
|
|
pon : in std_logic; -- power on
|
100 |
|
|
ton : in std_logic; -- talk only
|
101 |
|
|
endOf : in std_logic; -- end of byte string
|
102 |
|
|
-- state inputs
|
103 |
|
|
ACDS : in std_logic; -- accept data state (AH)
|
104 |
|
|
APRS : in std_logic; -- affirmative poll response
|
105 |
|
|
LPAS : in std_logic; -- listener primary state (LE)
|
106 |
|
|
-- remote instruction inputs
|
107 |
|
|
ATN : in std_logic; -- attention
|
108 |
|
|
IFC : in std_logic; -- interface clear
|
109 |
|
|
SPE : in std_logic; -- serial poll enable
|
110 |
|
|
SPD : in std_logic; -- serial poll disable
|
111 |
|
|
MTA : in std_logic; -- my talk address
|
112 |
|
|
OTA : in std_logic; -- other talk address
|
113 |
|
|
MLA : in std_logic; -- my listen address
|
114 |
|
|
OSA : in std_logic; -- other secondary address
|
115 |
|
|
MSA : in std_logic; -- my secondary address
|
116 |
|
|
PCG : in std_logic; -- primary command group
|
117 |
|
|
-- remote instruction outputs
|
118 |
|
|
END_OF : out std_logic; -- end of data
|
119 |
|
|
RQS : out std_logic; -- data accepted
|
120 |
|
|
DAB : out std_logic; -- data byte
|
121 |
|
|
EOS : out std_logic; -- end of string
|
122 |
|
|
STB : out std_logic; -- status byte
|
123 |
|
|
-- local instruction outputs
|
124 |
|
|
tac : out std_logic; -- talker active
|
125 |
|
|
-- reported states
|
126 |
|
|
SPAS : out std_logic; -- serial poll active state
|
127 |
|
|
TPAS : out std_logic; -- transmitter active state
|
128 |
|
|
TADS : out std_logic; -- talker addressed state
|
129 |
|
|
TACS : out std_logic -- talker active state
|
130 |
|
|
);
|
131 |
|
|
end component;
|
132 |
|
|
|
133 |
|
|
component if_func_C is
|
134 |
|
|
port(
|
135 |
|
|
-- device inputs
|
136 |
|
|
clk : in std_logic; -- clock
|
137 |
|
|
pon : in std_logic; -- power on
|
138 |
|
|
gts : in std_logic; -- go to standby
|
139 |
|
|
rpp : in std_logic; -- request parallel poll
|
140 |
|
|
tcs : in std_logic; -- take control synchronously
|
141 |
|
|
tca : in std_logic; -- take control asynchronously
|
142 |
|
|
sic : in std_logic; -- send interface clear
|
143 |
|
|
rsc : in std_logic; -- request system control
|
144 |
|
|
sre : in std_logic; -- send remote enable
|
145 |
|
|
-- state inputs
|
146 |
|
|
TADS : in std_logic; -- talker addressed state (T or TE)
|
147 |
|
|
ACDS : in std_logic; -- accept data state (AH)
|
148 |
|
|
ANRS : in std_logic; -- acceptor not ready state (AH)
|
149 |
|
|
STRS : in std_logic; -- source transfer state (SH)
|
150 |
|
|
SDYS : in std_logic; -- source delay state (SH)
|
151 |
|
|
-- command inputs
|
152 |
|
|
ATN_in : in std_logic; -- attention
|
153 |
|
|
IFC_in : in std_logic; -- interface clear
|
154 |
|
|
TCT_in : in std_logic; -- take control
|
155 |
|
|
SRQ_in : in std_logic; -- service request
|
156 |
|
|
-- command outputs
|
157 |
|
|
ATN_out : out std_logic; -- attention
|
158 |
|
|
IFC_out : out std_logic; -- interface clear
|
159 |
|
|
TCT_out : out std_logic; -- take control
|
160 |
|
|
IDY_out : out std_logic; -- identify
|
161 |
|
|
REN_out : out std_logic; -- remote enable
|
162 |
|
|
-- reported states
|
163 |
|
|
CACS : out std_logic; -- controller active state
|
164 |
|
|
CTRS : out std_logic; -- controller transfer state
|
165 |
|
|
CSBS : out std_logic; -- controller standby state
|
166 |
|
|
CPPS : out std_logic; -- controller parallel poll state
|
167 |
|
|
CSRS : out std_logic; -- controller service requested state
|
168 |
|
|
SACS : out std_logic -- system control active state
|
169 |
|
|
);
|
170 |
|
|
end component;
|
171 |
|
|
|
172 |
|
|
component if_func_DC is
|
173 |
|
|
port(
|
174 |
|
|
-- device inputs
|
175 |
|
|
clk : in std_logic; -- clock
|
176 |
|
|
-- state inputs
|
177 |
|
|
LADS : in std_logic; -- listener addressed state (L or LE)
|
178 |
|
|
ACDS : in std_logic; -- accept data state (AH)
|
179 |
|
|
-- instructions
|
180 |
|
|
DCL : in std_logic; -- my listen address
|
181 |
|
|
SDC : in std_logic; -- unlisten
|
182 |
|
|
-- local instructions
|
183 |
|
|
clr : out std_logic -- clear device
|
184 |
|
|
);
|
185 |
|
|
end component;
|
186 |
|
|
|
187 |
|
|
component if_func_DT is
|
188 |
|
|
port(
|
189 |
|
|
-- device inputs
|
190 |
|
|
clk : in std_logic; -- clock
|
191 |
|
|
-- state inputs
|
192 |
|
|
LADS : in std_logic; -- listener addressed state (L or LE)
|
193 |
|
|
ACDS : in std_logic; -- accept data state (AH)
|
194 |
|
|
-- instructions
|
195 |
|
|
GET : in std_logic; -- group execute trigger
|
196 |
|
|
-- local instructions
|
197 |
|
|
trg : out std_logic -- trigger
|
198 |
|
|
);
|
199 |
|
|
end component;
|
200 |
|
|
|
201 |
|
|
component if_func_PP is
|
202 |
|
|
port(
|
203 |
|
|
-- device inputs
|
204 |
|
|
clk : in std_logic; -- clock
|
205 |
|
|
-- settings
|
206 |
|
|
lpeUsed : std_logic;
|
207 |
|
|
fixedPpLine : in std_logic_vector (2 downto 0);
|
208 |
|
|
-- local commands
|
209 |
|
|
pon : in std_logic; -- power on
|
210 |
|
|
lpe : in std_logic; -- local poll enable
|
211 |
|
|
ist : in std_logic; -- individual status
|
212 |
|
|
-- state inputs
|
213 |
|
|
ACDS : in std_logic; -- accept data state
|
214 |
|
|
LADS : in std_logic; -- listener address state (L or LE)
|
215 |
|
|
-- data input
|
216 |
|
|
dio_data : in std_logic_vector(3 downto 0); -- byte from data lines
|
217 |
|
|
-- remote command inputs
|
218 |
|
|
IDY : in std_logic; -- identify
|
219 |
|
|
PPE : in std_logic; -- parallel poll enable
|
220 |
|
|
PPD : in std_logic; -- parallel poll disable
|
221 |
|
|
PPC : in std_logic; -- parallel poll configure
|
222 |
|
|
PPU : in std_logic; -- parallel poll unconfigure
|
223 |
|
|
PCG : in std_logic; -- primary command group
|
224 |
|
|
-- remote command outputs
|
225 |
|
|
PPR : out std_logic; -- paralel poll response
|
226 |
|
|
-- PPR command data
|
227 |
|
|
ppBitValue : out std_logic; -- bit value
|
228 |
|
|
ppLineNumber : out std_logic_vector (2 downto 0);
|
229 |
|
|
-- reported states
|
230 |
|
|
PPAS : out std_logic -- parallel poll active state
|
231 |
|
|
);
|
232 |
|
|
end component;
|
233 |
|
|
|
234 |
|
|
component if_func_RL is
|
235 |
|
|
port(
|
236 |
|
|
-- device inputs
|
237 |
|
|
clk : in std_logic; -- clock
|
238 |
|
|
pon : in std_logic; -- power on
|
239 |
|
|
rtl : in std_logic; -- return to local
|
240 |
|
|
-- state inputs
|
241 |
|
|
ACDS : in std_logic; -- listener active state (AH)
|
242 |
|
|
LADS : in std_logic; -- listener addressed state (L or LE)
|
243 |
|
|
-- instructions
|
244 |
|
|
REN : in std_logic; -- remote enable
|
245 |
|
|
LLO : in std_logic; -- local lockout
|
246 |
|
|
MLA : in std_logic; -- my listen address
|
247 |
|
|
GTL : in std_logic; -- go to local
|
248 |
|
|
-- reported state
|
249 |
|
|
LOCS : out std_logic; -- local state
|
250 |
|
|
LWLS : out std_logic -- local with lockout state
|
251 |
|
|
);
|
252 |
|
|
end component;
|
253 |
|
|
|
254 |
|
|
component if_func_SR is
|
255 |
|
|
port(
|
256 |
|
|
-- device inputs
|
257 |
|
|
clk : in std_logic; -- clock
|
258 |
|
|
pon : in std_logic; -- power on
|
259 |
|
|
rsv : in std_logic; -- service request
|
260 |
|
|
-- state inputs
|
261 |
|
|
SPAS : in std_logic; -- serial poll active state (T or TE)
|
262 |
|
|
-- output instructions
|
263 |
|
|
SRQ : out std_logic; -- service request
|
264 |
|
|
-- reported states
|
265 |
|
|
APRS : out std_logic -- affirmative poll response state
|
266 |
|
|
);
|
267 |
|
|
end component;
|
268 |
|
|
|
269 |
|
|
component commandEcoder is
|
270 |
|
|
port (
|
271 |
|
|
-- data
|
272 |
|
|
data : in std_logic_vector (7 downto 0);
|
273 |
|
|
-- status byte
|
274 |
|
|
status_byte : in std_logic_vector (7 downto 0);
|
275 |
|
|
-- PPR command data
|
276 |
|
|
ppBitValue : in std_logic;
|
277 |
|
|
ppLineNumber : in std_logic_vector (2 downto 0);
|
278 |
|
|
-- func states
|
279 |
|
|
APRS : in std_logic; -- affirmative poll response state
|
280 |
|
|
CACS : in std_logic; -- controller active state (C)
|
281 |
|
|
-- commands
|
282 |
|
|
ATN : in std_logic;
|
283 |
|
|
END_OF : in std_logic;
|
284 |
|
|
IDY : in std_logic;
|
285 |
|
|
DAC : in std_logic;
|
286 |
|
|
RFD : in std_logic;
|
287 |
|
|
DAV : in std_logic;
|
288 |
|
|
IFC : in std_logic;
|
289 |
|
|
REN : in std_logic;
|
290 |
|
|
SRQ : in std_logic; -- request for service
|
291 |
|
|
DAB : in std_logic;
|
292 |
|
|
EOS : in std_logic;
|
293 |
|
|
RQS : in std_logic; -- part of STB
|
294 |
|
|
STB : in std_logic;
|
295 |
|
|
TCT : in std_logic;
|
296 |
|
|
PPR : in std_logic;
|
297 |
|
|
-------------------------------------------
|
298 |
|
|
-- data lines -----------------------------
|
299 |
|
|
-------------------------------------------
|
300 |
|
|
DO : out std_logic_vector (7 downto 0);
|
301 |
|
|
output_valid : out std_logic;
|
302 |
|
|
-------------------------------------------
|
303 |
|
|
-- control lines --------------------------
|
304 |
|
|
-------------------------------------------
|
305 |
|
|
-- DAV line
|
306 |
|
|
DAV_line : out std_logic;
|
307 |
|
|
-- NRFD line
|
308 |
|
|
NRFD_line : out std_logic;
|
309 |
|
|
-- NDAC line
|
310 |
|
|
NDAC_line : out std_logic;
|
311 |
|
|
-- ATN line
|
312 |
|
|
ATN_line : out std_logic;
|
313 |
|
|
-- EOI line
|
314 |
|
|
EOI_line : out std_logic;
|
315 |
|
|
-- SRQ line
|
316 |
|
|
SRQ_line : out std_logic;
|
317 |
|
|
-- IFC line
|
318 |
|
|
IFC_line : out std_logic;
|
319 |
|
|
-- REN line
|
320 |
|
|
REN_line : out std_logic
|
321 |
|
|
);
|
322 |
|
|
end component;
|
323 |
|
|
|
324 |
|
|
component commandDecoder is
|
325 |
|
|
port (
|
326 |
|
|
|
327 |
|
|
-------------------------------------------
|
328 |
|
|
-- data lines -----------------------------
|
329 |
|
|
-------------------------------------------
|
330 |
|
|
DI : in std_logic_vector (7 downto 0);
|
331 |
|
|
|
332 |
|
|
-------------------------------------------
|
333 |
|
|
-- control lines --------------------------
|
334 |
|
|
-------------------------------------------
|
335 |
|
|
-- DAV line
|
336 |
|
|
DAV_line : in std_logic;
|
337 |
|
|
-- NRFD line
|
338 |
|
|
NRFD_line : in std_logic;
|
339 |
|
|
-- NDAC line
|
340 |
|
|
NDAC_line : in std_logic;
|
341 |
|
|
-- ATN line
|
342 |
|
|
ATN_line : in std_logic;
|
343 |
|
|
-- EOI line
|
344 |
|
|
EOI_line : in std_logic;
|
345 |
|
|
-- SRQ line
|
346 |
|
|
SRQ_line : in std_logic;
|
347 |
|
|
-- IFC line
|
348 |
|
|
IFC_line : in std_logic;
|
349 |
|
|
-- REN line
|
350 |
|
|
REN_line : in std_logic;
|
351 |
|
|
|
352 |
|
|
-------------------------------------------
|
353 |
|
|
-- internal settiongs ---------------------
|
354 |
|
|
-------------------------------------------
|
355 |
|
|
-- eos mark
|
356 |
|
|
eosMark : in std_logic_vector (7 downto 0);
|
357 |
|
|
-- eos used
|
358 |
|
|
eosUsed : in std_logic;
|
359 |
|
|
-- my listen address
|
360 |
|
|
myListAddr : in std_logic_vector (4 downto 0);
|
361 |
|
|
-- my talk address
|
362 |
|
|
myTalkAddr : in std_logic_vector (4 downto 0);
|
363 |
|
|
-- secondary address detected
|
364 |
|
|
secAddrDetected : in std_logic;
|
365 |
|
|
|
366 |
|
|
-------------------------------------------
|
367 |
|
|
-- internal states ------------------------
|
368 |
|
|
-------------------------------------------
|
369 |
|
|
-- serial poll active state (T or TE)
|
370 |
|
|
SPAS : in std_logic;
|
371 |
|
|
|
372 |
|
|
-------------------------------------------
|
373 |
|
|
-- single line commands -------------------
|
374 |
|
|
-------------------------------------------
|
375 |
|
|
-- attention
|
376 |
|
|
ATN : out std_logic;
|
377 |
|
|
-- data accepted
|
378 |
|
|
DAC : out std_logic;
|
379 |
|
|
-- data valid
|
380 |
|
|
DAV : out std_logic;
|
381 |
|
|
-- end
|
382 |
|
|
END_c : out std_logic;
|
383 |
|
|
-- identify
|
384 |
|
|
IDY : out std_logic;
|
385 |
|
|
-- interface clear
|
386 |
|
|
IFC : out std_logic;
|
387 |
|
|
-- remote enable
|
388 |
|
|
REN : out std_logic;
|
389 |
|
|
-- ready for data
|
390 |
|
|
RFD : out std_logic;
|
391 |
|
|
-- service request
|
392 |
|
|
SRQ : out std_logic;
|
393 |
|
|
|
394 |
|
|
-------------------------------------------
|
395 |
|
|
-- multi line commands --------------------
|
396 |
|
|
-------------------------------------------
|
397 |
|
|
-- addressed command group
|
398 |
|
|
ACG : out std_logic;
|
399 |
|
|
-- data byte
|
400 |
|
|
DAB : out std_logic;
|
401 |
|
|
-- device clear
|
402 |
|
|
DCL : out std_logic;
|
403 |
|
|
-- end of string
|
404 |
|
|
EOS : out std_logic;
|
405 |
|
|
-- group execute trigger
|
406 |
|
|
GET : out std_logic;
|
407 |
|
|
-- go to local
|
408 |
|
|
GTL : out std_logic;
|
409 |
|
|
-- listen address group
|
410 |
|
|
LAG : out std_logic;
|
411 |
|
|
-- local lockout
|
412 |
|
|
LLO : out std_logic;
|
413 |
|
|
-- my listen address
|
414 |
|
|
MLA : out std_logic;
|
415 |
|
|
-- my talk address
|
416 |
|
|
MTA : out std_logic;
|
417 |
|
|
-- my secondary address
|
418 |
|
|
MSA : out std_logic;
|
419 |
|
|
-- null byte
|
420 |
|
|
NUL : out std_logic;
|
421 |
|
|
-- other secondary address
|
422 |
|
|
OSA : out std_logic;
|
423 |
|
|
-- other talk address
|
424 |
|
|
OTA : out std_logic;
|
425 |
|
|
-- primary command group
|
426 |
|
|
PCG : out std_logic;
|
427 |
|
|
-- parallel poll configure
|
428 |
|
|
PPC : out std_logic;
|
429 |
|
|
-- parallel poll enable
|
430 |
|
|
PPE : out std_logic;
|
431 |
|
|
-- parallel poll disable
|
432 |
|
|
PPD : out std_logic;
|
433 |
|
|
-- parallel poll response
|
434 |
|
|
PPR : out std_logic;
|
435 |
|
|
-- parallel poll unconfigure
|
436 |
|
|
PPU : out std_logic;
|
437 |
|
|
-- request service
|
438 |
|
|
RQS : out std_logic;
|
439 |
|
|
-- secondary command group
|
440 |
|
|
SCG : out std_logic;
|
441 |
|
|
-- selected device clear
|
442 |
|
|
SDC : out std_logic;
|
443 |
|
|
-- serial poll disable
|
444 |
|
|
SPD : out std_logic;
|
445 |
|
|
-- serial poll enable
|
446 |
|
|
SPE : out std_logic;
|
447 |
|
|
-- status byte
|
448 |
|
|
STB : out std_logic;
|
449 |
|
|
-- talk address group
|
450 |
|
|
TAG : out std_logic;
|
451 |
|
|
-- take control
|
452 |
|
|
TCT : out std_logic;
|
453 |
|
|
-- universal command group
|
454 |
|
|
UCG : out std_logic;
|
455 |
|
|
-- unlisten
|
456 |
|
|
UNL : out std_logic;
|
457 |
|
|
-- untalk
|
458 |
|
|
UNT : out std_logic
|
459 |
|
|
);
|
460 |
|
|
end component;
|
461 |
|
|
|
462 |
|
|
component SecondaryAddressDecoder is
|
463 |
|
|
port (
|
464 |
|
|
-- secondary address mask
|
465 |
|
|
secAddrMask : in std_logic_vector (31 downto 0);
|
466 |
|
|
-- data input
|
467 |
|
|
DI : in std_logic_vector (4 downto 0);
|
468 |
|
|
-- secondary address detected
|
469 |
|
|
secAddrDetected : out std_logic
|
470 |
|
|
);
|
471 |
|
|
end component;
|
472 |
|
|
|
473 |
|
|
component SecAddrSaver is
|
474 |
|
|
port (
|
475 |
|
|
reset : in std_logic;
|
476 |
|
|
------------------- gpib ----------------------
|
477 |
|
|
TADS : in std_logic;
|
478 |
|
|
TPAS : in std_logic;
|
479 |
|
|
LADS : in std_logic;
|
480 |
|
|
LPAS : in std_logic;
|
481 |
|
|
MSA_Dec : in std_logic;
|
482 |
|
|
DI : in std_logic_vector(4 downto 0);
|
483 |
|
|
currentSecAddr : out std_logic_vector(4 downto 0)
|
484 |
|
|
);
|
485 |
|
|
end component;
|
486 |
|
|
|
487 |
|
|
component gpibInterface is port (
|
488 |
|
|
clk : in std_logic;
|
489 |
|
|
reset : std_logic;
|
490 |
|
|
-- application interface
|
491 |
|
|
isLE : in std_logic;
|
492 |
|
|
isTE : in std_logic;
|
493 |
|
|
lpeUsed : in std_logic;
|
494 |
|
|
fixedPpLine : in std_logic_vector (2 downto 0);
|
495 |
|
|
eosUsed : in std_logic;
|
496 |
|
|
eosMark : in std_logic_vector (7 downto 0);
|
497 |
|
|
myListAddr : in std_logic_vector (4 downto 0);
|
498 |
|
|
myTalkAddr : in std_logic_vector (4 downto 0);
|
499 |
|
|
secAddrMask : in std_logic_vector (31 downto 0);
|
500 |
|
|
data : in std_logic_vector (7 downto 0);
|
501 |
|
|
status_byte : in std_logic_vector (7 downto 0);
|
502 |
|
|
T1 : in std_logic_vector (7 downto 0);
|
503 |
|
|
-- local commands to interface
|
504 |
|
|
rdy : in std_logic; -- ready for next message (AH)
|
505 |
|
|
nba : in std_logic; -- new byte available (SH)
|
506 |
|
|
ltn : in std_logic; -- listen (L, LE)
|
507 |
|
|
lun : in std_logic; -- local unlisten (L, LE)
|
508 |
|
|
lon : in std_logic; -- listen only (L, LE)
|
509 |
|
|
ton : in std_logic; -- talk only (T, TE)
|
510 |
|
|
endOf : in std_logic; -- end of byte string (T, TE)
|
511 |
|
|
gts : in std_logic; -- go to standby (C)
|
512 |
|
|
rpp : in std_logic; -- request parallel poll (C)
|
513 |
|
|
tcs : in std_logic; -- take control synchronously (C, AH)
|
514 |
|
|
tca : in std_logic; -- take control asynchronously (C)
|
515 |
|
|
sic : in std_logic; -- send interface clear (C)
|
516 |
|
|
rsc : in std_logic; -- request system control (C)
|
517 |
|
|
sre : in std_logic; -- send remote enable (C)
|
518 |
|
|
rtl : in std_logic; -- return to local (RL)
|
519 |
|
|
rsv : in std_logic; -- request service (SR)
|
520 |
|
|
ist : in std_logic; -- individual status (PP)
|
521 |
|
|
lpe : in std_logic; -- local poll enable (PP)
|
522 |
|
|
|
523 |
|
|
-- local commands from interface
|
524 |
|
|
dvd : out std_logic; -- data valid (AH)
|
525 |
|
|
wnc : out std_logic; -- wait for new cycle (SH)
|
526 |
|
|
tac : out std_logic; -- talker active (T, TE)
|
527 |
|
|
lac : out std_logic; -- listener active (L, LE)
|
528 |
|
|
cwrc : out std_logic; -- controller write commands
|
529 |
|
|
cwrd : out std_logic; -- controller write data
|
530 |
|
|
clr : out std_logic; -- clear device (DC)
|
531 |
|
|
trg : out std_logic; -- trigger device (DT)
|
532 |
|
|
atl : out std_logic; -- addressed to listen (T or TE)
|
533 |
|
|
att : out std_logic; -- addressed to talk(L or LE)
|
534 |
|
|
mla : out std_logic; -- my listen addres decoded (L or LE)
|
535 |
|
|
lsb : out std_logic; -- last byte
|
536 |
|
|
spa : out std_logic; -- seriall poll active
|
537 |
|
|
ppr : out std_logic; -- parallel poll ready
|
538 |
|
|
sreq : out std_logic; -- service requested
|
539 |
|
|
isLocal : out std_logic; -- device is local controlled
|
540 |
|
|
currentSecAddr : out std_logic_vector (4 downto 0); -- current sec addr
|
541 |
|
|
-- interface signals
|
542 |
|
|
DI : in std_logic_vector (7 downto 0);
|
543 |
|
|
DO : out std_logic_vector (7 downto 0);
|
544 |
|
|
output_valid : out std_logic;
|
545 |
|
|
-- attention
|
546 |
|
|
ATN_in : in std_logic;
|
547 |
|
|
ATN_out : out std_logic;
|
548 |
|
|
-- data valid
|
549 |
|
|
DAV_in : in std_logic;
|
550 |
|
|
DAV_out : out std_logic;
|
551 |
|
|
-- not ready for data
|
552 |
|
|
NRFD_in : in std_logic;
|
553 |
|
|
NRFD_out : out std_logic;
|
554 |
|
|
-- no data accepted
|
555 |
|
|
NDAC_in : in std_logic;
|
556 |
|
|
NDAC_out : out std_logic;
|
557 |
|
|
-- end or identify
|
558 |
|
|
EOI_in : in std_logic;
|
559 |
|
|
EOI_out : out std_logic;
|
560 |
|
|
-- service request
|
561 |
|
|
SRQ_in : in std_logic;
|
562 |
|
|
SRQ_out : out std_logic;
|
563 |
|
|
-- interface clear
|
564 |
|
|
IFC_in : in std_logic;
|
565 |
|
|
IFC_out : out std_logic;
|
566 |
|
|
-- remote enable
|
567 |
|
|
REN_in : in std_logic;
|
568 |
|
|
REN_out : out std_logic
|
569 |
|
|
;debug1 : out std_logic
|
570 |
|
|
);
|
571 |
|
|
end component;
|
572 |
|
|
|
573 |
|
|
end gpibComponents;
|