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

Subversion Repositories dbg_interface

[/] [dbg_interface/] [tags/] [highland_ver1/] [rtl/] [verilog/] [dbg_defines.v] - Blame information for rev 57

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

Line No. Rev Author Line
1 2 mohor
//////////////////////////////////////////////////////////////////////
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: not supported by cvs2svn $
48 57 simons
// Revision 1.9  2002/05/07 14:43:59  mohor
49
// mon_cntl_o signals that controls monitor mux added.
50
//
51 47 mohor
// Revision 1.8  2002/01/25 07:58:34  mohor
52
// IDCODE bug fixed, chains reused to decreas size of core. Data is shifted-in
53
// not filled-in. Tested in hw.
54
//
55 30 mohor
// Revision 1.7  2001/12/06 10:08:06  mohor
56
// Warnings from synthesys tools fixed.
57
//
58 27 mohor
// Revision 1.6  2001/11/28 09:38:30  mohor
59
// Trace disabled by default.
60
//
61 23 mohor
// Revision 1.5  2001/10/15 09:55:47  mohor
62
// Wishbone interface added, few fixes for better performance,
63
// hooks for boundary scan testing added.
64
//
65 12 mohor
// Revision 1.4  2001/09/24 14:06:42  mohor
66
// Changes connected to the OpenRISC access (SPR read, SPR write).
67
//
68 11 mohor
// Revision 1.3  2001/09/20 10:11:25  mohor
69
// Working version. Few bugs fixed, comments added.
70
//
71 9 mohor
// Revision 1.2  2001/09/18 14:13:47  mohor
72
// Trace fixed. Some registers changed, trace simplified.
73
//
74 5 mohor
// Revision 1.1.1.1  2001/09/13 13:49:19  mohor
75
// Initial official release.
76
//
77 2 mohor
// Revision 1.3  2001/06/01 22:22:35  mohor
78
// This is a backup. It is not a fully working version. Not for use, yet.
79
//
80
// Revision 1.2  2001/05/18 13:10:00  mohor
81
// Headers changed. All additional information is now avaliable in the README.txt file.
82
//
83
// Revision 1.1.1.1  2001/05/18 06:35:08  mohor
84
// Initial release
85
//
86
//
87
 
88
 
89
 
90
// Enable TRACE
91 23 mohor
//`define TRACE_ENABLED  // Uncomment this define to activate the trace
92 2 mohor
 
93 57 simons
// Define number of cpus supported by the dbg interface
94
`define RISC_NUM 8
95 2 mohor
 
96
// Define IDCODE Value
97
`define IDCODE_VALUE  32'hdeadbeef
98
 
99
// Define master clock (RISC clock)
100 5 mohor
//`define       RISC_CLOCK  50   // Half period = 50 ns => MCLK = 10 Mhz
101
`define RISC_CLOCK  2.5   // Half period = 5 ns => MCLK = 200 Mhz
102 2 mohor
 
103
// Length of the Instruction register
104
`define IR_LENGTH       4
105
 
106 30 mohor
// Length of the Data register (must be equal to the longest scan chain for shifting the data in)
107 27 mohor
`define DR_LENGTH       74
108 2 mohor
 
109
// Length of the CHAIN ID register
110
`define CHAIN_ID_LENGTH 4
111
 
112
// Length of the CRC
113
`define CRC_LENGTH      8
114
 
115 9 mohor
// Trace buffer size and counter and write/read pointer width. This can be expanded when more RAM is avaliable
116
`define TRACECOUNTERWIDTH        5
117
`define TRACEBUFFERLENGTH        32 // 2^5
118
 
119 2 mohor
`define TRACESAMPLEWIDTH         36
120
 
121
// OpSelect width
122
`define OPSELECTWIDTH            3
123
`define OPSELECTIONCOUNTER       8    //2^3
124
 
125 11 mohor
// OpSelect (dbg_op_i) signal meaning
126
`define DEBUG_READ_PC            0
127
`define DEBUG_READ_LSEA          1
128
`define DEBUG_READ_LDATA         2
129
`define DEBUG_READ_SDATA         3
130
`define DEBUG_READ_SPR           4
131
`define DEBUG_WRITE_SPR          5
132
`define DEBUG_READ_INSTR         6
133
//`define Reserved                 7
134
 
135 2 mohor
// Supported Instructions
136 30 mohor
`define EXTEST          4'b0000
137
`define SAMPLE_PRELOAD  4'b0001
138
`define IDCODE          4'b0010
139
`define CHAIN_SELECT    4'b0011
140
`define INTEST          4'b0100
141
`define CLAMP           4'b0101
142
`define CLAMPZ          4'b0110
143
`define HIGHZ           4'b0111
144
`define DEBUG           4'b1000
145
`define BYPASS          4'b1111
146 2 mohor
 
147
// Chains
148
`define GLOBAL_BS_CHAIN     4'b0000
149
`define RISC_DEBUG_CHAIN    4'b0001
150
`define RISC_TEST_CHAIN     4'b0010
151
`define TRACE_TEST_CHAIN    4'b0011
152
`define REGISTER_SCAN_CHAIN 4'b0100
153 12 mohor
`define WISHBONE_SCAN_CHAIN 4'b0101
154 2 mohor
 
155
// Registers addresses
156
`define MODER_ADR           5'h00
157
`define TSEL_ADR            5'h01
158
`define QSEL_ADR            5'h02
159
`define SSEL_ADR            5'h03
160 5 mohor
`define RISCOP_ADR          5'h04
161 57 simons
`define RISCSEL_ADR         5'h05
162 5 mohor
`define RECSEL_ADR          5'h10
163 47 mohor
`define MON_CNTL_ADR        5'h11
164 2 mohor
 
165
 
166
// Registers default values (after reset)
167 5 mohor
`define MODER_DEF           2'h0
168 2 mohor
`define TSEL_DEF            32'h00000000
169
`define QSEL_DEF            32'h00000000
170
`define SSEL_DEF            32'h00000000
171 5 mohor
`define RISCOP_DEF          2'h0
172 9 mohor
`define RECSEL_DEF          7'h0
173 47 mohor
`define MON_CNTL_DEF        4'h0

powered by: WebSVN 2.1.0

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