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 133

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 133 jt_eaton
#(parameter  CHIP_ID_VAL=32'h00000000 )
64 131 jt_eaton
(
65
 
66 133 jt_eaton
input   wire           tdo_i,
67 131 jt_eaton
output  wire           shiftcapture_dr_clk_o,
68
output  wire           tdi_o,
69
output  wire           test_logic_reset_o,
70
output  wire           shift_dr_o,
71
output  wire           capture_dr_o,
72
output  wire           update_dr_clk_o,
73 133 jt_eaton
output  wire           select_o,
74
 
75
 
76
input   wire           aux_tdo_i,
77
output  wire           aux_shiftcapture_dr_clk_o,
78
output  wire           aux_tdi_o,
79
output  wire           aux_test_logic_reset_o,
80
output  wire           aux_shift_dr_o,
81
output  wire           aux_capture_dr_o,
82
output  wire           aux_update_dr_clk_o,
83
output  wire           aux_select_o
84
 
85 131 jt_eaton
);
86
 
87
wire       update_dr_i;
88
 
89
 
90
BSCAN_SPARTAN3
91
BSCAN_SPARTAN3_inst (
92
   .CAPTURE (capture_dr_o),         // CAPTURE output from TAP controller
93
   .DRCK1   (user1_clk_i),          // shiftcapture clk for USER1 functions
94
   .DRCK2   (user2_clk_i),          // shiftcapture clk for USER2 functions
95
   .RESET   (test_logic_reset_o),   // Reset output from TAP controller
96 133 jt_eaton
   .SEL1    (select_o),             // USER1 active output
97
   .SEL2    (aux_select_o),         // USER2 active output
98 131 jt_eaton
   .SHIFT   (shift_dr_o),           // SHIFT output from TAP controller
99
   .TDI     (tdi_o),                // TDI output from TAP controller
100
   .UPDATE  (update_dr_i),          // UPDATE output from TAP controller
101 133 jt_eaton
   .TDO1    (tdo_i),                // Data input for USER1 function
102
   .TDO2    (aux_tdo_i)             // Data input for USER2 function
103 131 jt_eaton
);
104
 
105
// Since we don't generate a update_clk we make one from the update state decode
106
BUFG
107
update_buf (
108
   .O       (update_dr_clk_o),        // Clock buffer output
109
   .I       (update_dr_i)             // Clock buffer input
110
            );
111
 
112
 
113
BUFG
114 133 jt_eaton
aux_update_buf (
115
   .O       (aux_update_dr_clk_o),        // Clock buffer output
116
   .I       (update_dr_i)             // Clock buffer input
117
            );
118
 
119
 
120
 
121
 
122
 
123
BUFG
124 131 jt_eaton
user1_clk_buf (
125
   .O       (shiftcapture_dr_clk_o),              // Clock buffer output
126
   .I       (user1_clk_i && user2_clk_i )             // Clock buffer input
127
            );
128
 
129
 
130 133 jt_eaton
 BUFG
131
user2_clk_buf (
132
   .O       (aux_shiftcapture_dr_clk_o),              // Clock buffer output
133
   .I       (user1_clk_i && user2_clk_i )             // Clock buffer input
134
            );
135 131 jt_eaton
 
136
 
137
 
138 133 jt_eaton
assign     aux_tdi_o               = tdi_o;
139
assign     aux_test_logic_reset_o  = test_logic_reset_o ;
140
assign     aux_shift_dr_o          = shift_dr_o ;
141
assign     aux_capture_dr_o        = capture_dr_o;
142 131 jt_eaton
 
143 133 jt_eaton
 
144 131 jt_eaton
 
145 133 jt_eaton
endmodule

powered by: WebSVN 2.1.0

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