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

Subversion Repositories adv_debug_sys

[/] [adv_debug_sys/] [trunk/] [Hardware/] [actel_ujtag/] [rtl/] [verilog/] [actel_ujtag.v] - Blame information for rev 42

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 42 nyawn
//////////////////////////////////////////////////////////////////////
2
////                                                              ////
3
////  actel_ujtag.v                                               ////
4
////                                                              ////
5
////                                                              ////
6
////                                                              ////
7
////  Author(s):                                                  ////
8
////       Nathan Yawn (nathan.yawn@opencores.org)                ////
9
////                                                              ////
10
////                                                              ////
11
////                                                              ////
12
//////////////////////////////////////////////////////////////////////
13
////                                                              ////
14
//// Copyright (C) 2010 Authors                                   ////
15
////                                                              ////
16
//// This source file may be used and distributed without         ////
17
//// restriction provided that this copyright statement is not    ////
18
//// removed from the file and that any derivative work contains  ////
19
//// the original copyright notice and the associated disclaimer. ////
20
////                                                              ////
21
//// This source file is free software; you can redistribute it   ////
22
//// and/or modify it under the terms of the GNU Lesser General   ////
23
//// Public License as published by the Free Software Foundation; ////
24
//// either version 2.1 of the License, or (at your option) any   ////
25
//// later version.                                               ////
26
////                                                              ////
27
//// This source is distributed in the hope that it will be       ////
28
//// useful, but WITHOUT ANY WARRANTY; without even the implied   ////
29
//// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR      ////
30
//// PURPOSE.  See the GNU Lesser General Public License for more ////
31
//// details.                                                     ////
32
////                                                              ////
33
//// You should have received a copy of the GNU Lesser General    ////
34
//// Public License along with this source; if not, download it   ////
35
//// from http://www.opencores.org/lgpl.shtml                     ////
36
////                                                              ////
37
//////////////////////////////////////////////////////////////////////
38
//                                                                  //
39
// This file is a wrapper for the Actel UJTAG                       //
40
// TAP devices.  It is designed to take the place of a separate TAP //
41
// controller in Actel systems, to allow a user to access a CPU     //
42
// debug module (such as that of the OR1200) through the FPGA's     //
43
// dedicated JTAG / configuration port.                             //
44
//                                                                  //
45
//////////////////////////////////////////////////////////////////////
46
 
47
`define UJTAG_DEBUG_IR 8'h44
48
 
49
module actel_ujtag (
50
 
51
        // These must be routed to the top-level module, where they must
52
        // connected to top-level ports called TCK, TMS, TDI, TDO, and 
53
        // TRSTB.  But, these ports must NOT be connected to IO pins.
54
        tck_pad_i,
55
        tms_pad_i,
56
        tdi_pad_i,
57
        tdo_pad_o,
58
        trstb_pad_i,
59
 
60
        // These are to/from the debug unit
61
        tck_o,
62
        debug_tdo_i,
63
        tdi_o,
64
        test_logic_reset_o,
65
        run_test_idle_o,
66
        shift_dr_o,
67
        capture_dr_o,
68
        pause_dr_o,
69
        update_dr_o,
70
        debug_select_o
71
);
72
 
73
 
74
input debug_tdo_i;
75
output tck_o;
76
output tdi_o;
77
output test_logic_reset_o;
78
output run_test_idle_o;
79
output shift_dr_o;
80
output capture_dr_o;
81
output pause_dr_o;
82
output update_dr_o;
83
output debug_select_o;
84
input tck_pad_i;
85
input tms_pad_i;
86
input tdi_pad_i;
87
output tdo_pad_o;
88
input trstb_pad_i;
89
 
90
wire debug_tdo_i;
91
wire tck_o;
92
wire tdi_o;
93
wire test_logic_reset_o;
94
wire run_test_idle_o;
95
wire shift_dr_o;
96
wire pause_dr_o;
97
wire update_dr_o;
98
wire debug_select_o;
99
 
100
wire [7:0] inst_reg;
101
 
102
wire tck_pad_i;
103
wire tms_pad_i;
104
wire tdi_pad_i;
105
wire tdo_pad_o;
106
wire trstb_pad_i;
107
 
108
UJTAG ujtag_inst (
109
.URSTB(test_logic_reset_o),
110
.UTDO(debug_tdo_i),
111
.UDRCK(tck_o),
112
.UDRCAP(capture_dr_o),
113
.UDRSH(shift_dr_o),
114
.UDRUPD(update_dr_o),
115
.UTDI(tdi_o),
116
.UIREG0(inst_reg[0]),
117
.UIREG1(inst_reg[1]),
118
.UIREG2(inst_reg[2]),
119
.UIREG3(inst_reg[3]),
120
.UIREG4(inst_reg[4]),
121
.UIREG5(inst_reg[5]),
122
.UIREG6(inst_reg[6]),
123
.UIREG7(inst_reg[7]),
124
.TCK(tck_pad_i),
125
.TDO(tdo_pad_o),
126
.TDI(tdi_pad_i),
127
.TMS(tms_pad_i),
128
.TRSTB(trstb_pad_i)
129
);
130
 
131
 
132
assign debug_select_o = (inst_reg == `UJTAG_DEBUG_IR) ? 1'b1 : 1'b0;
133
 
134
assign pause_dr_o = 1'b0;
135
assign run_test_idle_o = 1'b0;
136
 
137
endmodule

powered by: WebSVN 2.1.0

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