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

Subversion Repositories socgen

[/] [socgen/] [trunk/] [Projects/] [digilentinc.com/] [Nexys2/] [ip/] [jtag/] [rtl/] [verilog/] [syn/] [jtag_tap.v] - Blame information for rev 131

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

Line No. Rev Author Line
1 131 jt_eaton
/**********************************************************************/
2
/*                                                                    */
3
/*             -------                                                */
4
/*            /   SOC  \                                              */
5
/*           /    GEN   \                                             */
6
/*          /    TARGET  \                                            */
7
/*          ==============                                            */
8
/*          |            |                                            */
9
/*          |____________|                                            */
10
/*                                                                    */
11
/*  Jtag tap controller for xilinx spartan 3e fpga                    */
12
/*                                                                    */
13
/*                                                                    */
14
/*  Author(s):                                                        */
15
/*      - John Eaton, jt_eaton@opencores.org                          */
16
/*                                                                    */
17
/**********************************************************************/
18
/*                                                                    */
19
/*    Copyright (C) <2010>  <Ouabache Design Works>                   */
20
/*                                                                    */
21
/*  This source file may be used and distributed without              */
22
/*  restriction provided that this copyright statement is not         */
23
/*  removed from the file and that any derivative work contains       */
24
/*  the original copyright notice and the associated disclaimer.      */
25
/*                                                                    */
26
/*  This source file is free software; you can redistribute it        */
27
/*  and/or modify it under the terms of the GNU Lesser General        */
28
/*  Public License as published by the Free Software Foundation;      */
29
/*  either version 2.1 of the License, or (at your option) any        */
30
/*  later version.                                                    */
31
/*                                                                    */
32
/*  This source is distributed in the hope that it will be            */
33
/*  useful, but WITHOUT ANY WARRANTY; without even the implied        */
34
/*  warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR           */
35
/*  PURPOSE.  See the GNU Lesser General Public License for more      */
36
/*  details.                                                          */
37
/*                                                                    */
38
/*  You should have received a copy of the GNU Lesser General         */
39
/*  Public License along with this source; if not, download it        */
40
/*  from http://www.opencores.org/lgpl.shtml                          */
41
/*                                                                    */
42
/**********************************************************************/
43
 
44
//////////////////////////////////////////////////////////////////////
45
//                                                                  //
46
// This file is a wrapper for the various Xilinx internal BSCAN     //
47
// TAP devices.  It is designed to take the place of a separate TAP //
48
// controller in Xilinx systems, to allow a user to access a CPU    //
49
// debug module (such as that of the OR1200) through the FPGA's     //
50
// dedicated JTAG / configuration port.                             //
51
//                                                                  //
52
//////////////////////////////////////////////////////////////////////
53
//
54
 
55
// Note that the SPARTAN BSCAN controllers have more than one channel.
56
// This implementation always uses channel 1, this is not configurable.
57
// If you want to use another channel, then it is probably because you
58
// want to attach multiple devices to the BSCAN device, which means
59
// you'll be making changes to this file anyway.
60
 
61
 
62
module cde_jtag_tap
63
   #( parameter
64
      JTAG_SEL=2
65
    )
66
 
67
(
68
 
69
input   wire [ 1:0 ]   tdo_i,
70
output  wire           shiftcapture_dr_clk_o,
71
output  wire           tdi_o,
72
output  wire           test_logic_reset_o,
73
output  wire           shift_dr_o,
74
output  wire           capture_dr_o,
75
output  wire           update_dr_clk_o,
76
output  wire [ 1:0 ]   select_o
77
 
78
);
79
 
80
wire       update_dr_i;
81
 
82
 
83
BSCAN_SPARTAN3
84
BSCAN_SPARTAN3_inst (
85
   .CAPTURE (capture_dr_o),         // CAPTURE output from TAP controller
86
   .DRCK1   (user1_clk_i),          // shiftcapture clk for USER1 functions
87
   .DRCK2   (user2_clk_i),          // shiftcapture clk for USER2 functions
88
   .RESET   (test_logic_reset_o),   // Reset output from TAP controller
89
   .SEL1    (select_o[0]),          // USER1 active output
90
   .SEL2    (select_o[1]),          // USER2 active output
91
   .SHIFT   (shift_dr_o),           // SHIFT output from TAP controller
92
   .TDI     (tdi_o),                // TDI output from TAP controller
93
   .UPDATE  (update_dr_i),          // UPDATE output from TAP controller
94
   .TDO1    (tdo_i[0]),             // Data input for USER1 function
95
   .TDO2    (tdo_i[1])              // Data input for USER2 function
96
);
97
 
98
// Since we don't generate a update_clk we make one from the update state decode
99
BUFG
100
update_buf (
101
   .O       (update_dr_clk_o),        // Clock buffer output
102
   .I       (update_dr_i)             // Clock buffer input
103
            );
104
 
105
 
106
BUFG
107
user1_clk_buf (
108
   .O       (shiftcapture_dr_clk_o),              // Clock buffer output
109
   .I       (user1_clk_i && user2_clk_i )             // Clock buffer input
110
            );
111
 
112
 
113
 
114
 
115
 
116
 
117
 
118
 
119
 
120
endmodule

powered by: WebSVN 2.1.0

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