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

Subversion Repositories or1k

[/] [or1k/] [tags/] [nog_patch_47/] [or1ksim/] [debug/] [gdb.h] - Blame information for rev 1151

Go to most recent revision | 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 1151 phoenix
#ifndef __CYGWIN__
26
#include <inttypes.h>
27
#endif /* __CYGWIN__ */
28
 
29 485 markom
#define DEBUG_SLOWDOWN (1)
30
 
31
enum enum_errors  /* modified <chris@asics.ws> CZ 24/05/01 */
32
{
33
  /* Codes > 0 are for system errors */
34
 
35
  ERR_NONE = 0,
36
  ERR_CRC = -1,
37
  ERR_MEM = -2,
38
  JTAG_PROXY_INVALID_COMMAND = -3,
39
  JTAG_PROXY_SERVER_TERMINATED = -4,
40
  JTAG_PROXY_NO_CONNECTION = -5,
41
  JTAG_PROXY_PROTOCOL_ERROR = -6,
42
  JTAG_PROXY_COMMAND_NOT_IMPLEMENTED = -7,
43
  JTAG_PROXY_INVALID_CHAIN = -8,
44
  JTAG_PROXY_INVALID_ADDRESS = -9,
45
  JTAG_PROXY_ACCESS_EXCEPTION = -10, /* Write to ROM */
46
  JTAG_PROXY_INVALID_LENGTH = -11,
47
  JTAG_PROXY_OUT_OF_MEMORY = -12,
48
};
49
 
50
/* This is repeated from gdb tm-or1k.h There needs to be
51
   a better mechanism for tracking this, but I don't see
52
   an easy way to share files between modules. */
53
 
54
typedef enum {
55
  JTAG_COMMAND_READ = 1,
56
  JTAG_COMMAND_WRITE = 2,
57
  JTAG_COMMAND_BLOCK_READ = 3,
58
  JTAG_COMMAND_BLOCK_WRITE = 4,
59
  JTAG_COMMAND_CHAIN = 5,
60
} JTAG_proxy_protocol_commands;
61
 
62
/* Each transmit structure must begin with an integer
63
   which specifies the type of command. Information
64
   after this is variable. Make sure to have all information
65
   aligned properly. If we stick with 32 bit integers, it
66
   should be portable onto every platform. These structures
67
   will be transmitted across the network in network byte
68
   order.
69
*/
70
 
71
typedef struct {
72
  uint32_t command;
73
  uint32_t length;
74
  uint32_t address;
75
  uint32_t data_H;
76
  uint32_t data_L;
77
} JTAGProxyWriteMessage;
78
 
79
typedef struct {
80
  uint32_t command;
81
  uint32_t length;
82
  uint32_t address;
83
} JTAGProxyReadMessage;
84
 
85
typedef struct {
86
  uint32_t command;
87
  uint32_t length;
88
  uint32_t address;
89
  int32_t  nRegisters;
90
  uint32_t data[1];
91
} JTAGProxyBlockWriteMessage;
92
 
93
typedef struct {
94
  uint32_t command;
95
  uint32_t length;
96
  uint32_t address;
97
  int32_t  nRegisters;
98
} JTAGProxyBlockReadMessage;
99
 
100
typedef struct {
101
  uint32_t command;
102
  uint32_t length;
103
  uint32_t chain;
104
} JTAGProxyChainMessage;
105
 
106
/* The responses are messages specific, however convention
107
   states the first word should be an error code. Again,
108
   sticking with 32 bit integers should provide maximum
109
   portability. */
110
 
111
typedef struct {
112
  int32_t status;
113
} JTAGProxyWriteResponse;
114
 
115
typedef struct {
116
  int32_t status;
117
  uint32_t data_H;
118
  uint32_t data_L;
119
} JTAGProxyReadResponse;
120
 
121
typedef struct {
122
  int32_t status;
123
} JTAGProxyBlockWriteResponse;
124
 
125
typedef struct {
126
  int32_t status;
127
  int32_t nRegisters;
128
  uint32_t data[1];
129
  /* uint32_t data[nRegisters-1] still unread */
130
} JTAGProxyBlockReadResponse;
131
 
132
typedef struct {
133
  int32_t status;
134
} JTAGProxyChainResponse;
135
 
136
#endif /* GDB_H */

powered by: WebSVN 2.1.0

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