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

Subversion Repositories test_project

[/] [test_project/] [trunk/] [rtl/] [verilog/] [components/] [debug_if/] [dbg_defines_old.v] - Blame information for rev 22

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

Line No. Rev Author Line
1 18 unneback
//////////////////////////////////////////////////////////////////////
2
////                                                              ////
3
////  dbg_defines.v                                               ////
4
////                                                              ////
5
////                                                              ////
6
////  This file is part of the SoC/OpenRISC Development Interface ////
7
////  http://www.opencores.org/cores/DebugInterface/              ////
8
////                                                              ////
9
////                                                              ////
10
////  Author(s):                                                  ////
11
////       Igor Mohor                                             ////
12
////       igorm@opencores.org                                    ////
13
////                                                              ////
14
////                                                              ////
15
////  All additional information is avaliable in the README.txt   ////
16
////  file.                                                       ////
17
////                                                              ////
18
//////////////////////////////////////////////////////////////////////
19
////                                                              ////
20
//// Copyright (C) 2000,2001 Authors                              ////
21
////                                                              ////
22
//// This source file may be used and distributed without         ////
23
//// restriction provided that this copyright statement is not    ////
24
//// removed from the file and that any derivative work contains  ////
25
//// the original copyright notice and the associated disclaimer. ////
26
////                                                              ////
27
//// This source file is free software; you can redistribute it   ////
28
//// and/or modify it under the terms of the GNU Lesser General   ////
29
//// Public License as published by the Free Software Foundation; ////
30
//// either version 2.1 of the License, or (at your option) any   ////
31
//// later version.                                               ////
32
////                                                              ////
33
//// This source is distributed in the hope that it will be       ////
34
//// useful, but WITHOUT ANY WARRANTY; without even the implied   ////
35
//// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR      ////
36
//// PURPOSE.  See the GNU Lesser General Public License for more ////
37
//// details.                                                     ////
38
////                                                              ////
39
//// You should have received a copy of the GNU Lesser General    ////
40
//// Public License along with this source; if not, download it   ////
41
//// from http://www.opencores.org/lgpl.shtml                     ////
42
////                                                              ////
43
//////////////////////////////////////////////////////////////////////
44
//
45
// CVS Revision History
46
//
47
// $Log: dbg_defines.v,v $
48
// Revision 1.2  2004/01/08 12:49:54  simont
49
// change defines.
50
//
51
// Revision 1.13  2003/10/21 09:48:31  simons
52
// Mbist support added.
53
//
54
// Revision 1.12  2003/09/17 14:38:57  simons
55
// WB_CNTL register added, some syncronization fixes.
56
//
57
// Revision 1.11  2003/08/28 13:55:21  simons
58
// Three more chains added for cpu debug access.
59
//
60
// Revision 1.10  2003/07/31 12:19:49  simons
61
// Multiple cpu support added.
62
//
63
// Revision 1.9  2002/05/07 14:43:59  mohor
64
// mon_cntl_o signals that controls monitor mux added.
65
//
66
// Revision 1.8  2002/01/25 07:58:34  mohor
67
// IDCODE bug fixed, chains reused to decreas size of core. Data is shifted-in
68
// not filled-in. Tested in hw.
69
//
70
// Revision 1.7  2001/12/06 10:08:06  mohor
71
// Warnings from synthesys tools fixed.
72
//
73
// Revision 1.6  2001/11/28 09:38:30  mohor
74
// Trace disabled by default.
75
//
76
// Revision 1.5  2001/10/15 09:55:47  mohor
77
// Wishbone interface added, few fixes for better performance,
78
// hooks for boundary scan testing added.
79
//
80
// Revision 1.4  2001/09/24 14:06:42  mohor
81
// Changes connected to the OpenRISC access (SPR read, SPR write).
82
//
83
// Revision 1.3  2001/09/20 10:11:25  mohor
84
// Working version. Few bugs fixed, comments added.
85
//
86
// Revision 1.2  2001/09/18 14:13:47  mohor
87
// Trace fixed. Some registers changed, trace simplified.
88
//
89
// Revision 1.1.1.1  2001/09/13 13:49:19  mohor
90
// Initial official release.
91
//
92
// Revision 1.3  2001/06/01 22:22:35  mohor
93
// This is a backup. It is not a fully working version. Not for use, yet.
94
//
95
// Revision 1.2  2001/05/18 13:10:00  mohor
96
// Headers changed. All additional information is now avaliable in the README.txt file.
97
//
98
// Revision 1.1.1.1  2001/05/18 06:35:08  mohor
99
// Initial release
100
//
101
//
102
 
103
 
104
 
105
// Enable TRACE
106
//`define TRACE_ENABLED  // Uncomment this define to activate the trace
107
 
108
// Define number of cpus supported by the dbg interface
109
`define RISC_NUM 1
110
 
111
// Define IDCODE Value
112
`define IDCODE_VALUE  32'h14951185
113
 
114
// Define master clock (RISC clock)
115
//`define       RISC_CLOCK  50   // Half period = 50 ns => MCLK = 10 Mhz
116
`define RISC_CLOCK  2.5   // Half period = 5 ns => MCLK = 200 Mhz
117
 
118
// Length of the Instruction register
119
`define IR_LENGTH       4
120
 
121
// Length of the Data register (must be equal to the longest scan chain for shifting the data in)
122
`define DR_LENGTH       74
123
 
124
// Length of the CHAIN ID register
125
`define CHAIN_ID_LENGTH 4
126
 
127
// Length of the CRC
128
`define CRC_LENGTH      8
129
 
130
// Trace buffer size and counter and write/read pointer width. This can be expanded when more RAM is avaliable
131
`define TRACECOUNTERWIDTH        5
132
`define TRACEBUFFERLENGTH        32 // 2^5
133
 
134
`define TRACESAMPLEWIDTH         36
135
 
136
// OpSelect width
137
`define OPSELECTWIDTH            3
138
`define OPSELECTIONCOUNTER       8    //2^3
139
 
140
// OpSelect (dbg_op_i) signal meaning
141
`define DEBUG_READ_0               0
142
`define DEBUG_WRITE_0              1
143
`define DEBUG_READ_1               2
144
`define DEBUG_WRITE_1              3
145
`define DEBUG_READ_2               4
146
`define DEBUG_WRITE_2              5
147
`define DEBUG_READ_3               6
148
`define DEBUG_WRITE_3              7
149
 
150
// Supported Instructions
151
`define EXTEST          4'b0000
152
`define SAMPLE_PRELOAD  4'b0001
153
`define IDCODE          4'b0010
154
`define CHAIN_SELECT    4'b0011
155
`define INTEST          4'b0100
156
`define CLAMP           4'b0101
157
`define CLAMPZ          4'b0110
158
`define HIGHZ           4'b0111
159
`define DEBUG           4'b1000
160
`define MBIST           4'b1001
161
`define BYPASS          4'b1111
162
 
163
// Chains
164
`define GLOBAL_BS_CHAIN     4'b0000
165
`define RISC_DEBUG_CHAIN_2  4'b0001
166
`define RISC_TEST_CHAIN     4'b0010
167
`define TRACE_TEST_CHAIN    4'b0011
168
`define REGISTER_SCAN_CHAIN 4'b0100
169
`define WISHBONE_SCAN_CHAIN 4'b0101
170
`define RISC_DEBUG_CHAIN_0  4'b0110
171
`define RISC_DEBUG_CHAIN_1  4'b0111
172
`define RISC_DEBUG_CHAIN_3  4'b1000
173
 
174
// Registers addresses
175
`define MODER_ADR           5'h00
176
`define TSEL_ADR            5'h01
177
`define QSEL_ADR            5'h02
178
`define SSEL_ADR            5'h03
179
`define RISCOP_ADR          5'h04
180
`define RISCSEL_ADR         5'h05
181
`define RECSEL_ADR          5'h10
182
`define MON_CNTL_ADR        5'h11
183
`define WB_CNTL_ADR         5'h12
184
 
185
 
186
// Registers default values (after reset)
187
`define MODER_DEF           2'h0
188
`define TSEL_DEF            32'h00000000
189
`define QSEL_DEF            32'h00000000
190
`define SSEL_DEF            32'h00000000
191
`define RISCOP_DEF          2'h0
192
`define RECSEL_DEF          7'h0
193
`define MON_CNTL_DEF        4'h0

powered by: WebSVN 2.1.0

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