1 |
3 |
nyawn |
//////////////////////////////////////////////////////////////////////
|
2 |
|
|
//// ////
|
3 |
|
|
//// adbg_or1k_defines.v ////
|
4 |
|
|
//// ////
|
5 |
|
|
//// ////
|
6 |
|
|
//// This file is part of the SoC Advanced Debug Interface. ////
|
7 |
|
|
//// ////
|
8 |
|
|
//// Author(s): ////
|
9 |
|
|
//// Nathan Yawn (nathan.yawn@opencores.org) ////
|
10 |
|
|
//// ////
|
11 |
|
|
//// ////
|
12 |
|
|
//// ////
|
13 |
|
|
//////////////////////////////////////////////////////////////////////
|
14 |
|
|
//// ////
|
15 |
|
|
//// Copyright (C) 2008 Authors ////
|
16 |
|
|
//// ////
|
17 |
|
|
//// This source file may be used and distributed without ////
|
18 |
|
|
//// restriction provided that this copyright statement is not ////
|
19 |
|
|
//// removed from the file and that any derivative work contains ////
|
20 |
|
|
//// the original copyright notice and the associated disclaimer. ////
|
21 |
|
|
//// ////
|
22 |
|
|
//// This source file is free software; you can redistribute it ////
|
23 |
|
|
//// and/or modify it under the terms of the GNU Lesser General ////
|
24 |
|
|
//// Public License as published by the Free Software Foundation; ////
|
25 |
|
|
//// either version 2.1 of the License, or (at your option) any ////
|
26 |
|
|
//// later version. ////
|
27 |
|
|
//// ////
|
28 |
|
|
//// This source is distributed in the hope that it will be ////
|
29 |
|
|
//// useful, but WITHOUT ANY WARRANTY; without even the implied ////
|
30 |
|
|
//// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR ////
|
31 |
|
|
//// PURPOSE. See the GNU Lesser General Public License for more ////
|
32 |
|
|
//// details. ////
|
33 |
|
|
//// ////
|
34 |
|
|
//// You should have received a copy of the GNU Lesser General ////
|
35 |
|
|
//// Public License along with this source; if not, download it ////
|
36 |
|
|
//// from http://www.opencores.org/lgpl.shtml ////
|
37 |
|
|
//// ////
|
38 |
|
|
//////////////////////////////////////////////////////////////////////
|
39 |
|
|
//
|
40 |
|
|
// CVS Revision History
|
41 |
|
|
//
|
42 |
|
|
// $Log: adbg_or1k_defines.v,v $
|
43 |
|
|
// Revision 1.2 2009/05/17 20:54:56 Nathan
|
44 |
|
|
// Changed email address to opencores.org
|
45 |
|
|
//
|
46 |
|
|
// Revision 1.1 2008/07/22 20:28:31 Nathan
|
47 |
|
|
// Changed names of all files and modules (prefixed an a, for advanced). Cleanup, indenting. No functional changes.
|
48 |
|
|
//
|
49 |
|
|
// Revision 1.3 2008/07/06 20:02:54 Nathan
|
50 |
|
|
// Fixes for synthesis with Xilinx ISE (also synthesizable with
|
51 |
|
|
// Quartus II 7.0). Ran through dos2unix.
|
52 |
|
|
//
|
53 |
|
|
// Revision 1.2 2008/06/26 20:52:31 Nathan
|
54 |
|
|
// OR1K module tested and working. Added copyright / license info
|
55 |
|
|
// to _define files. Other cleanup.
|
56 |
|
|
//
|
57 |
|
|
|
58 |
|
|
|
59 |
|
|
// These relate to the number of internal registers, and how
|
60 |
|
|
// many bits are required in the Reg. Select register
|
61 |
|
|
`define DBG_OR1K_REGSELECT_SIZE 1
|
62 |
|
|
`define DBG_OR1K_NUM_INTREG 1
|
63 |
|
|
|
64 |
|
|
// Register index definitions for module-internal registers
|
65 |
|
|
// Index 0 is the Status register, used for stall and reset
|
66 |
|
|
`define DBG_OR1K_INTREG_STATUS 1'b0
|
67 |
|
|
|
68 |
|
|
`define DBG_OR1K_STATUS_LEN 2
|
69 |
|
|
|
70 |
|
|
// Valid commands/opcodes for the or1k debug module
|
71 |
|
|
// 0000 NOP
|
72 |
|
|
// 0001 - 0010 Reserved
|
73 |
|
|
// 0011 Write burst, 32-bit access
|
74 |
|
|
// 0100 - 0110 Reserved
|
75 |
|
|
// 0111 Read burst, 32-bit access
|
76 |
|
|
// 1000 Reserved
|
77 |
|
|
// 1001 Internal register select/write
|
78 |
|
|
// 1010 - 1100 Reserved
|
79 |
|
|
// 1101 Internal register select
|
80 |
|
|
// 1110 - 1111 Reserved
|
81 |
|
|
|
82 |
|
|
|
83 |
|
|
`define DBG_OR1K_CMD_BWRITE32 4'h3
|
84 |
|
|
`define DBG_OR1K_CMD_BREAD32 4'h7
|
85 |
|
|
`define DBG_OR1K_CMD_IREG_WR 4'h9
|
86 |
|
|
`define DBG_OR1K_CMD_IREG_SEL 4'hd
|