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

Subversion Repositories or1k

[/] [or1k/] [tags/] [nog_patch_61/] [or1ksim/] [debug/] [gdb.h] - Blame information for rev 485

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

powered by: WebSVN 2.1.0

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