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

Subversion Repositories or1k

[/] [or1k/] [branches/] [stable_0_2_x/] [or1ksim/] [debug/] [gdb.h] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 485 markom
/* config.h -- Simulator configuration header file
2
   Copyright (C) 2001 Chris Ziomkowski, chris@asics.ws
3
 
4
   This file is part of OpenRISC 1000 Architectural Simulator.
5
 
6
   This program is free software; you can redistribute it and/or modify
7
   it under the terms of the GNU General Public License as published by
8
   the Free Software Foundation; either version 2 of the License, or
9
   (at your option) any later version.
10
 
11
   This program is distributed in the hope that it will be useful,
12
   but WITHOUT ANY WARRANTY; without even the implied warranty of
13
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
   GNU General Public License for more details.
15
 
16
   You should have received a copy of the GNU General Public License
17
   along with this program; if not, write to the Free Software
18
   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
19
 
20
#ifndef GDB_H
21
#define GDB_H
22
 
23
#include <sys/types.h>
24
 
25
#define DEBUG_SLOWDOWN (1)
26
 
27
enum enum_errors  /* modified <chris@asics.ws> CZ 24/05/01 */
28
{
29
  /* Codes > 0 are for system errors */
30
 
31
  ERR_NONE = 0,
32
  ERR_CRC = -1,
33
  ERR_MEM = -2,
34
  JTAG_PROXY_INVALID_COMMAND = -3,
35
  JTAG_PROXY_SERVER_TERMINATED = -4,
36
  JTAG_PROXY_NO_CONNECTION = -5,
37
  JTAG_PROXY_PROTOCOL_ERROR = -6,
38
  JTAG_PROXY_COMMAND_NOT_IMPLEMENTED = -7,
39
  JTAG_PROXY_INVALID_CHAIN = -8,
40
  JTAG_PROXY_INVALID_ADDRESS = -9,
41
  JTAG_PROXY_ACCESS_EXCEPTION = -10, /* Write to ROM */
42
  JTAG_PROXY_INVALID_LENGTH = -11,
43
  JTAG_PROXY_OUT_OF_MEMORY = -12,
44
};
45
 
46
/* This is repeated from gdb tm-or1k.h There needs to be
47
   a better mechanism for tracking this, but I don't see
48
   an easy way to share files between modules. */
49
 
50
typedef enum {
51
  JTAG_COMMAND_READ = 1,
52
  JTAG_COMMAND_WRITE = 2,
53
  JTAG_COMMAND_BLOCK_READ = 3,
54
  JTAG_COMMAND_BLOCK_WRITE = 4,
55
  JTAG_COMMAND_CHAIN = 5,
56
} JTAG_proxy_protocol_commands;
57
 
58
/* Each transmit structure must begin with an integer
59
   which specifies the type of command. Information
60
   after this is variable. Make sure to have all information
61
   aligned properly. If we stick with 32 bit integers, it
62
   should be portable onto every platform. These structures
63
   will be transmitted across the network in network byte
64
   order.
65
*/
66
 
67
typedef struct {
68
  uint32_t command;
69
  uint32_t length;
70
  uint32_t address;
71
  uint32_t data_H;
72
  uint32_t data_L;
73
} JTAGProxyWriteMessage;
74
 
75
typedef struct {
76
  uint32_t command;
77
  uint32_t length;
78
  uint32_t address;
79
} JTAGProxyReadMessage;
80
 
81
typedef struct {
82
  uint32_t command;
83
  uint32_t length;
84
  uint32_t address;
85
  int32_t  nRegisters;
86
  uint32_t data[1];
87
} JTAGProxyBlockWriteMessage;
88
 
89
typedef struct {
90
  uint32_t command;
91
  uint32_t length;
92
  uint32_t address;
93
  int32_t  nRegisters;
94
} JTAGProxyBlockReadMessage;
95
 
96
typedef struct {
97
  uint32_t command;
98
  uint32_t length;
99
  uint32_t chain;
100
} JTAGProxyChainMessage;
101
 
102
/* The responses are messages specific, however convention
103
   states the first word should be an error code. Again,
104
   sticking with 32 bit integers should provide maximum
105
   portability. */
106
 
107
typedef struct {
108
  int32_t status;
109
} JTAGProxyWriteResponse;
110
 
111
typedef struct {
112
  int32_t status;
113
  uint32_t data_H;
114
  uint32_t data_L;
115
} JTAGProxyReadResponse;
116
 
117
typedef struct {
118
  int32_t status;
119
} JTAGProxyBlockWriteResponse;
120
 
121
typedef struct {
122
  int32_t status;
123
  int32_t nRegisters;
124
  uint32_t data[1];
125
  /* uint32_t data[nRegisters-1] still unread */
126
} JTAGProxyBlockReadResponse;
127
 
128
typedef struct {
129
  int32_t status;
130
} JTAGProxyChainResponse;
131
 
132
#endif /* GDB_H */

powered by: WebSVN 2.1.0

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