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

Subversion Repositories mips_enhanced

[/] [mips_enhanced/] [trunk/] [grlib-gpl-1.0.19-b3188/] [lib/] [techmap/] [unisim/] [tap_unisim.vhd] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 dimamali
------------------------------------------------------------------------------
2
--  This file is a part of the GRLIB VHDL IP LIBRARY
3
--  Copyright (C) 2003, Gaisler Research
4
--
5
--  This program is free software; you can redistribute it and/or modify
6
--  it under the terms of the GNU General Public License as published by
7
--  the Free Software Foundation; either version 2 of the License, or
8
--  (at your option) any later version.
9
--
10
--  This program is distributed in the hope that it will be useful,
11
--  but WITHOUT ANY WARRANTY; without even the implied warranty of
12
--  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
--  GNU General Public License for more details.
14
--
15
--  You should have received a copy of the GNU General Public License
16
--  along with this program; if not, write to the Free Software
17
--  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
18
-----------------------------------------------------------------------------   
19
-- Entity:      tap_xilinx
20
-- File:        tap_xilinx.vhd
21
-- Author:      Edvin Catovic - Gaisler Research
22
-- Description: Xilinx TAP controllers wrappers
23
------------------------------------------------------------------------------
24
 
25
library ieee;
26
use ieee.std_logic_1164.all;
27
-- pragma translate_off
28
library unisim;
29
use unisim.BSCAN_VIRTEX;
30
-- pragma translate_on
31
 
32
entity virtex_tap is
33
port (
34
     tapi_tdo1   : in std_ulogic;
35
     tapi_tdo2   : in std_ulogic;
36
     tapo_tck    : out std_ulogic;
37
     tapo_tdi    : out std_ulogic;
38
     tapo_rst    : out std_ulogic;
39
     tapo_capt   : out std_ulogic;
40
     tapo_shft   : out std_ulogic;
41
     tapo_upd    : out std_ulogic;
42
     tapo_xsel1  : out std_ulogic;
43
     tapo_xsel2  : out std_ulogic
44
    );
45
end;
46
 
47
architecture rtl of virtex_tap is
48
  component BSCAN_VIRTEX
49
      port (CAPTURE : out STD_ULOGIC;
50
            DRCK1 : out STD_ULOGIC;
51
            DRCK2 : out STD_ULOGIC;
52
            RESET : out STD_ULOGIC;
53
            SEL1 : out STD_ULOGIC;
54
            SEL2 : out STD_ULOGIC;
55
            SHIFT : out STD_ULOGIC;
56
            TDI : out STD_ULOGIC;
57
            UPDATE : out STD_ULOGIC;
58
            TDO1 : in STD_ULOGIC;
59
            TDO2 : in STD_ULOGIC);
60
  end component;
61
 
62
  signal drck1, drck2, sel1, sel2 : std_ulogic;
63
  attribute dont_touch : boolean;
64
  attribute dont_touch of u0 : label is true;
65
begin
66
 
67
  u0 : BSCAN_VIRTEX
68
    port map (
69
              DRCK1 => drck1,
70
              DRCK2 => drck2,
71
              RESET => tapo_rst,
72
              SEL1 => sel1,
73
              SEL2 => sel2,
74
              SHIFT => tapo_shft,
75
              TDI => tapo_tdi,
76
              UPDATE => tapo_upd,
77
              TDO1 => tapi_tdo1,
78
              TDO2 => tapi_tdo2);
79
  tapo_tck <= drck1 when sel1 = '1' else drck2;
80
  tapo_xsel1 <= sel1; tapo_xsel2 <= sel2; tapo_capt <= '0';
81
end;
82
 
83
library ieee;
84
use ieee.std_logic_1164.all;
85
-- pragma translate_off
86
library unisim;
87
use unisim.BSCAN_VIRTEX2;
88
-- pragma translate_on
89
 
90
entity virtex2_tap is
91
port (
92
     tapi_tdo1   : in std_ulogic;
93
     tapi_tdo2   : in std_ulogic;
94
     tapo_tck    : out std_ulogic;
95
     tapo_tdi    : out std_ulogic;
96
     tapo_rst    : out std_ulogic;
97
     tapo_capt   : out std_ulogic;
98
     tapo_shft   : out std_ulogic;
99
     tapo_upd    : out std_ulogic;
100
     tapo_xsel1  : out std_ulogic;
101
     tapo_xsel2  : out std_ulogic
102
    );
103
end;
104
 
105
architecture rtl of virtex2_tap is
106
 
107
  component BSCAN_VIRTEX2
108
      port (CAPTURE : out STD_ULOGIC;
109
            DRCK1 : out STD_ULOGIC;
110
            DRCK2 : out STD_ULOGIC;
111
            RESET : out STD_ULOGIC;
112
            SEL1 : out STD_ULOGIC;
113
            SEL2 : out STD_ULOGIC;
114
            SHIFT : out STD_ULOGIC;
115
            TDI : out STD_ULOGIC;
116
            UPDATE : out STD_ULOGIC;
117
            TDO1 : in STD_ULOGIC;
118
            TDO2 : in STD_ULOGIC);
119
  end component;
120
 
121
  signal drck1, drck2, sel1, sel2 : std_ulogic;
122
  attribute dont_touch : boolean;
123
  attribute dont_touch of u0 : label is true;
124
 
125
begin
126
 
127
  u0 : BSCAN_VIRTEX2
128
    port map (CAPTURE => tapo_capt,
129
              DRCK1 => drck1,
130
              DRCK2 => drck2,
131
              RESET => tapo_rst,
132
              SEL1 => sel1,
133
              SEL2 => sel2,
134
              SHIFT => tapo_shft,
135
              TDI => tapo_tdi,
136
              UPDATE => tapo_upd,
137
              TDO1 => tapi_tdo1,
138
              TDO2 => tapi_tdo2);
139
  tapo_tck <= drck1 when sel1 = '1' else drck2;
140
  tapo_xsel1 <= sel1; tapo_xsel2 <= sel2;
141
end;
142
 
143
library ieee;
144
use ieee.std_logic_1164.all;
145
-- pragma translate_off
146
library unisim;
147
use unisim.BSCAN_SPARTAN3;
148
-- pragma translate_on
149
 
150
entity spartan3_tap is
151
port (
152
     tapi_tdo1   : in std_ulogic;
153
     tapi_tdo2   : in std_ulogic;
154
     tapo_tck    : out std_ulogic;
155
     tapo_tdi    : out std_ulogic;
156
     tapo_rst    : out std_ulogic;
157
     tapo_capt   : out std_ulogic;
158
     tapo_shft   : out std_ulogic;
159
     tapo_upd    : out std_ulogic;
160
     tapo_xsel1  : out std_ulogic;
161
     tapo_xsel2  : out std_ulogic
162
    );
163
end;
164
 
165
architecture rtl of spartan3_tap is
166
 
167
  component BSCAN_SPARTAN3
168
     port (CAPTURE : out STD_ULOGIC;
169
           DRCK1 : out STD_ULOGIC;
170
           DRCK2 : out STD_ULOGIC;
171
           RESET : out STD_ULOGIC;
172
           SEL1 : out STD_ULOGIC;
173
           SEL2 : out STD_ULOGIC;
174
           SHIFT : out STD_ULOGIC;
175
           TDI : out STD_ULOGIC;
176
           UPDATE : out STD_ULOGIC;
177
           TDO1 : in STD_ULOGIC;
178
           TDO2 : in STD_ULOGIC);
179
  end component;
180
 
181
  signal drck1, drck2, sel1, sel2 : std_ulogic;
182
  attribute dont_touch : boolean;
183
  attribute dont_touch of u0 : label is true;
184
begin
185
 
186
  u0 : BSCAN_SPARTAN3
187
    port map (CAPTURE => tapo_capt,
188
              DRCK1 => drck1,
189
              DRCK2 => drck2,
190
              RESET => tapo_rst,
191
              SEL1 => sel1,
192
              SEL2 => sel2,
193
              SHIFT => tapo_shft,
194
              TDI => tapo_tdi,
195
              UPDATE => tapo_upd,
196
              TDO1 => tapi_tdo1,
197
              TDO2 => tapi_tdo2);
198
  tapo_tck <=  drck1 when sel1 = '1' else drck2;
199
  tapo_xsel1 <= sel1; tapo_xsel2 <= sel2;
200
 
201
end;
202
 
203
library ieee;
204
use ieee.std_logic_1164.all;
205
-- pragma translate_off
206
library unisim;
207
use unisim.BSCAN_VIRTEX4;
208
-- pragma translate_on
209
 
210
entity virtex4_tap is
211
port (
212
     tapi_tdo1   : in std_ulogic;
213
     tapi_tdo2   : in std_ulogic;
214
     tapo_tck    : out std_ulogic;
215
     tapo_tdi    : out std_ulogic;
216
     tapo_rst    : out std_ulogic;
217
     tapo_capt   : out std_ulogic;
218
     tapo_shft   : out std_ulogic;
219
     tapo_upd    : out std_ulogic;
220
     tapo_xsel1  : out std_ulogic;
221
     tapo_xsel2  : out std_ulogic
222
    );
223
end;
224
 
225
architecture rtl of virtex4_tap is
226
  component BSCAN_VIRTEX4 generic ( JTAG_CHAIN : integer := 1);
227
     port ( CAPTURE : out std_ulogic;
228
            DRCK : out std_ulogic;
229
            RESET : out std_ulogic;
230
            SEL : out std_ulogic;
231
            SHIFT : out std_ulogic;
232
            TDI : out std_ulogic;
233
            UPDATE : out std_ulogic;
234
            TDO : in std_ulogic);
235
  end component;
236
 
237
  signal drck1, drck2, sel1, sel2 : std_ulogic;
238
  signal capt1, capt2, rst1, rst2 : std_ulogic;
239
  signal shift1, shift2, tdi1, tdi2 : std_ulogic;
240
  signal update1, update2 : std_ulogic;
241
  attribute dont_touch : boolean;
242
  attribute dont_touch of u0 : label is true;
243
  attribute dont_touch of u1 : label is true;
244
 
245
begin
246
 
247
  u0 : BSCAN_VIRTEX4
248
    generic map (JTAG_CHAIN => 1)
249
    port map (
250
      CAPTURE => capt1,
251
      DRCK => drck1,
252
      RESET => rst1,
253
      SEL => sel1,
254
      SHIFT => shift1,
255
      TDI => tdi1,
256
      UPDATE => update1,
257
      TDO => tapi_tdo1
258
      );
259
 
260
  u1 : BSCAN_VIRTEX4
261
    generic map (JTAG_CHAIN => 2)
262
    port map (
263
      CAPTURE => capt2,
264
      DRCK => drck2,
265
      RESET => rst2,
266
      SEL => sel2,
267
      SHIFT => shift2,
268
      TDI => tdi2,
269
      UPDATE => update2,
270
      TDO => tapi_tdo2
271
      );
272
 
273
  tapo_capt <= capt1 when sel1 = '1' else capt2;
274
  tapo_tck  <= drck1 when sel1 = '1' else drck2;
275
  tapo_rst  <= rst1 when sel1 = '1' else rst2;
276
  tapo_shft <= shift1 when sel1 = '1' else shift2;
277
  tapo_tdi  <= tdi1  when sel1 = '1' else tdi2;
278
  tapo_upd  <= update1 when sel1 ='1' else update2;
279
  tapo_xsel1 <= sel1; tapo_xsel2 <= sel2;
280
 
281
 
282
end;
283
 
284
 
285
library ieee;
286
use ieee.std_logic_1164.all;
287
-- pragma translate_off
288
library unisim;
289
use unisim.BSCAN_VIRTEX5;
290
-- pragma translate_on
291
 
292
entity virtex5_tap is
293
port (
294
     tapi_tdo1   : in std_ulogic;
295
     tapi_tdo2   : in std_ulogic;
296
     tapo_tck    : out std_ulogic;
297
     tapo_tdi    : out std_ulogic;
298
     tapo_rst    : out std_ulogic;
299
     tapo_capt   : out std_ulogic;
300
     tapo_shft   : out std_ulogic;
301
     tapo_upd    : out std_ulogic;
302
     tapo_xsel1  : out std_ulogic;
303
     tapo_xsel2  : out std_ulogic
304
    );
305
end;
306
 
307
architecture rtl of virtex5_tap is
308
  component BSCAN_VIRTEX5 generic ( JTAG_CHAIN : integer := 1);
309
     port ( CAPTURE : out std_ulogic;
310
            DRCK : out std_ulogic;
311
            RESET : out std_ulogic;
312
            SEL : out std_ulogic;
313
            SHIFT : out std_ulogic;
314
            TDI : out std_ulogic;
315
            UPDATE : out std_ulogic;
316
            TDO : in std_ulogic);
317
  end component;
318
 
319
  signal drck1, drck2, sel1, sel2 : std_ulogic;
320
  signal capt1, capt2, rst1, rst2 : std_ulogic;
321
  signal shift1, shift2, tdi1, tdi2 : std_ulogic;
322
  signal update1, update2 : std_ulogic;
323
  attribute dont_touch : boolean;
324
  attribute dont_touch of u0 : label is true;
325
  attribute dont_touch of u1 : label is true;
326
 
327
begin
328
 
329
  u0 : BSCAN_VIRTEX5
330
    generic map (JTAG_CHAIN => 1)
331
    port map (
332
      CAPTURE => capt1,
333
      DRCK => drck1,
334
      RESET => rst1,
335
      SEL => sel1,
336
      SHIFT => shift1,
337
      TDI => tdi1,
338
      UPDATE => update1,
339
      TDO => tapi_tdo1
340
      );
341
 
342
  u1 : BSCAN_VIRTEX5
343
    generic map (JTAG_CHAIN => 2)
344
    port map (
345
      CAPTURE => capt2,
346
      DRCK => drck2,
347
      RESET => rst2,
348
      SEL => sel2,
349
      SHIFT => shift2,
350
      TDI => tdi2,
351
      UPDATE => update2,
352
      TDO => tapi_tdo2
353
      );
354
 
355
  tapo_capt <= capt1 when sel1 = '1' else capt2;
356
  tapo_tck  <= drck1 when sel1 = '1' else drck2;
357
  tapo_rst  <= rst1 when sel1 = '1' else rst2;
358
  tapo_shft <= shift1 when sel1 = '1' else shift2;
359
  tapo_tdi  <= tdi1  when sel1 = '1' else tdi2;
360
  tapo_upd  <= update1 when sel1 ='1' else update2;
361
  tapo_xsel1 <= sel1; tapo_xsel2 <= sel2;
362
 
363
 
364
end;
365
 
366
 
367
 
368
 

powered by: WebSVN 2.1.0

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