1 |
6 |
julius |
//////////////////////////////////////////////////////////////////////
|
2 |
|
|
//// ////
|
3 |
|
|
//// dbg_wb_defines.v ////
|
4 |
|
|
//// ////
|
5 |
|
|
//// ////
|
6 |
|
|
//// This file is part of the SoC Debug Interface. ////
|
7 |
|
|
//// http://www.opencores.org/projects/DebugInterface/ ////
|
8 |
|
|
//// ////
|
9 |
|
|
//// Author(s): ////
|
10 |
|
|
//// Igor Mohor (igorm@opencores.org) ////
|
11 |
|
|
//// ////
|
12 |
|
|
//// ////
|
13 |
|
|
//// All additional information is avaliable in the README.txt ////
|
14 |
|
|
//// file. ////
|
15 |
|
|
//// ////
|
16 |
|
|
//////////////////////////////////////////////////////////////////////
|
17 |
|
|
//// ////
|
18 |
|
|
//// Copyright (C) 2000 - 2004 Authors ////
|
19 |
|
|
//// ////
|
20 |
|
|
//// This source file may be used and distributed without ////
|
21 |
|
|
//// restriction provided that this copyright statement is not ////
|
22 |
|
|
//// removed from the file and that any derivative work contains ////
|
23 |
|
|
//// the original copyright notice and the associated disclaimer. ////
|
24 |
|
|
//// ////
|
25 |
|
|
//// This source file is free software; you can redistribute it ////
|
26 |
|
|
//// and/or modify it under the terms of the GNU Lesser General ////
|
27 |
|
|
//// Public License as published by the Free Software Foundation; ////
|
28 |
|
|
//// either version 2.1 of the License, or (at your option) any ////
|
29 |
|
|
//// later version. ////
|
30 |
|
|
//// ////
|
31 |
|
|
//// This source is distributed in the hope that it will be ////
|
32 |
|
|
//// useful, but WITHOUT ANY WARRANTY; without even the implied ////
|
33 |
|
|
//// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR ////
|
34 |
|
|
//// PURPOSE. See the GNU Lesser General Public License for more ////
|
35 |
|
|
//// details. ////
|
36 |
|
|
//// ////
|
37 |
|
|
//// You should have received a copy of the GNU Lesser General ////
|
38 |
|
|
//// Public License along with this source; if not, download it ////
|
39 |
|
|
//// from http://www.opencores.org/lgpl.shtml ////
|
40 |
|
|
//// ////
|
41 |
|
|
//////////////////////////////////////////////////////////////////////
|
42 |
|
|
//
|
43 |
|
|
// CVS Revision History
|
44 |
|
|
//
|
45 |
|
|
// $Log: dbg_wb_defines.v,v $
|
46 |
|
|
// Revision 1.7 2004/03/31 14:34:08 igorm
|
47 |
|
|
// data_cnt_lim length changed to reduce number of warnings.
|
48 |
|
|
//
|
49 |
|
|
// Revision 1.6 2004/03/28 20:27:02 igorm
|
50 |
|
|
// New release of the debug interface (3rd. release).
|
51 |
|
|
//
|
52 |
|
|
// Revision 1.5 2004/03/22 16:35:46 igorm
|
53 |
|
|
// Temp version before changing dbg interface.
|
54 |
|
|
//
|
55 |
|
|
// Revision 1.4 2004/01/16 14:51:33 mohor
|
56 |
|
|
// cpu registers added.
|
57 |
|
|
//
|
58 |
|
|
// Revision 1.3 2004/01/08 17:53:36 mohor
|
59 |
|
|
// tmp version.
|
60 |
|
|
//
|
61 |
|
|
// Revision 1.2 2004/01/06 17:15:19 mohor
|
62 |
|
|
// temp3 version.
|
63 |
|
|
//
|
64 |
|
|
// Revision 1.1 2003/12/23 15:09:04 mohor
|
65 |
|
|
// New directory structure. New version of the debug interface.
|
66 |
|
|
//
|
67 |
|
|
//
|
68 |
|
|
//
|
69 |
|
|
|
70 |
|
|
// Defining length of the command
|
71 |
|
|
`define DBG_WB_CMD_LEN 3'd4
|
72 |
|
|
`define DBG_WB_CMD_CNT_WIDTH 3
|
73 |
|
|
|
74 |
|
|
// Defining length of the access_type field
|
75 |
|
|
`define DBG_WB_ACC_TYPE_LEN 3'd4
|
76 |
|
|
|
77 |
|
|
// Defining length of the address
|
78 |
|
|
`define DBG_WB_ADR_LEN 6'd32
|
79 |
|
|
|
80 |
|
|
// Defining length of the length register
|
81 |
|
|
`define DBG_WB_LEN_LEN 5'd16
|
82 |
|
|
|
83 |
|
|
// Defining total length of the DR needed
|
84 |
|
|
`define DBG_WB_DR_LEN (`DBG_WB_ACC_TYPE_LEN + `DBG_WB_ADR_LEN + `DBG_WB_LEN_LEN)
|
85 |
|
|
|
86 |
|
|
// Defining length of the CRC
|
87 |
|
|
`define DBG_WB_CRC_LEN 6'd32
|
88 |
|
|
`define DBG_WB_CRC_CNT_WIDTH 6
|
89 |
|
|
|
90 |
|
|
// Defining length of status
|
91 |
|
|
`define DBG_WB_STATUS_LEN 3'd4
|
92 |
|
|
`define DBG_WB_STATUS_CNT_WIDTH 3
|
93 |
|
|
|
94 |
|
|
// Defining length of the data
|
95 |
|
|
`define DBG_WB_DATA_CNT_WIDTH (`DBG_WB_LEN_LEN + 3)
|
96 |
|
|
`define DBG_WB_DATA_CNT_LIM_WIDTH `DBG_WB_LEN_LEN
|
97 |
|
|
|
98 |
|
|
//Defining commands
|
99 |
|
|
`define DBG_WB_GO 4'h0
|
100 |
|
|
`define DBG_WB_RD_COMM 4'h1
|
101 |
|
|
`define DBG_WB_WR_COMM 4'h2
|
102 |
|
|
|
103 |
|
|
// Defining access types for wishbone
|
104 |
|
|
`define DBG_WB_WRITE8 4'h0
|
105 |
|
|
`define DBG_WB_WRITE16 4'h1
|
106 |
|
|
`define DBG_WB_WRITE32 4'h2
|
107 |
|
|
`define DBG_WB_READ8 4'h4
|
108 |
|
|
`define DBG_WB_READ16 4'h5
|
109 |
|
|
`define DBG_WB_READ32 4'h6
|
110 |
|
|
|
111 |
|
|
|