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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [insight/] [utils/] [amd-udi/] [include/] [main.h] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 578 markom
/* @(#)main.h   5.19 93/07/30 16:39:56, Srini, AMD */
2
/******************************************************************************
3
 * Copyright 1991 Advanced Micro Devices, Inc.
4
 *
5
 * This software is the property of Advanced Micro Devices, Inc  (AMD)  which
6
 * specifically  grants the user the right to modify, use and distribute this
7
 * software provided this notice is not removed or altered.  All other rights
8
 * are reserved by AMD.
9
 *
10
 * AMD MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS
11
 * SOFTWARE.  IN NO EVENT SHALL AMD BE LIABLE FOR INCIDENTAL OR CONSEQUENTIAL
12
 * DAMAGES IN CONNECTION WITH OR ARISING FROM THE FURNISHING, PERFORMANCE, OR
13
 * USE OF THIS SOFTWARE.
14
 *
15
 * So that all may benefit from your experience, please report  any  problems
16
 * or  suggestions about this software to the 29K Technical Support Center at
17
 * 800-29-29-AMD (800-292-9263) in the USA, or 0800-89-1131  in  the  UK,  or
18
 * 0031-11-1129 in Japan, toll free.  The direct dial number is 512-462-4118.
19
 *
20
 * Advanced Micro Devices, Inc.
21
 * 29K Support Products
22
 * Mail Stop 573
23
 * 5900 E. Ben White Blvd.
24
 * Austin, TX 78741
25
 * 800-292-9263
26
 *****************************************************************************
27
 *      Engineer: Srini Subramanian.
28
 *****************************************************************************
29
 * This header file declares the structures defined in main.c
30
 *****************************************************************************
31
 */
32
 
33
#ifndef _MAIN_H_INCLUDED_
34
#define _MAIN_H_INCLUDED_
35
 
36
#include  "types.h"
37
 
38
#define TRUE                 1
39
#define FALSE                0
40
 
41
#define MEM_STACK_SIZE          0x6000
42
#define REG_STACK_SIZE          0x2000
43
 
44
#define MAXFILENAMELEN     256
45
 
46
/* Define BIG and LITTLE endian */
47
#define BIG                  0
48
#define LITTLE               1
49
 
50
#define MAX_SESSIONS    10
51
 
52
 
53
/*
54
** Structure for host configuration
55
*/
56
 
57
 
58
struct host_config_t {
59
   INT32  comm_interface;
60
   INT32  host_endian;
61
   INT32  target_endian;
62
   INT32  PC_port_base;
63
   INT32  PC_mem_seg;
64
   char  *comm_port;
65
   char  *baud_rate;
66
   char  *version;
67
   char  *date;
68
   };
69
typedef struct  host_config_t   HOST_CONFIG;
70
extern  HOST_CONFIG     host_config;
71
 
72
struct io_config_t {
73
   INT32  hif;
74
   INT32  io_control;
75
   INT32  cmd_ready;
76
   INT32  clear_to_send;
77
   INT32  target_running;
78
   INT32  cmd_file_io;
79
   INT32  log_mode;
80
   INT32  echo_mode;
81
   FILE   *cmd_file;
82
   char   cmd_filename[MAXFILENAMELEN];
83
   FILE   *log_file;
84
   char   log_filename[MAXFILENAMELEN];
85
   FILE   *echo_file;
86
   char   echo_filename[MAXFILENAMELEN];
87
   BYTE   io_toggle_char;
88
   };
89
typedef struct  io_config_t     IO_CONFIG;
90
extern  IO_CONFIG       io_config;
91
 
92
struct  init_info_t {
93
          ADDR32   text_start;
94
          ADDR32   text_end;
95
          ADDR32   data_start;
96
          ADDR32   data_end;
97
          ADDR32   entry_point;
98
          UINT32    mem_stack_size;
99
          UINT32    reg_stack_size;
100
          char     *argstring;
101
};
102
typedef struct  init_info_t     INIT_INFO;
103
extern  INIT_INFO       init_info;
104
 
105
 
106
struct  versions_etc_t {
107
          INT32    version;
108
          INT32    os_version;  /* os version is returned here */
109
          char     tip_version[12];/*tip_version must not exceed 12 chars*/
110
          char     tip_date[12]; /*tip_date must not exceed 12 chars*/
111
          INT32    max_msg_size;
112
          INT32    max_bkpts;
113
};
114
typedef struct  versions_etc_t  VERSIONS_ETC;
115
extern  VERSIONS_ETC    versions_etc;
116
 
117
struct  target_config_t {
118
          ADDR32   I_mem_start;
119
          INT32    I_mem_size;
120
          ADDR32   D_mem_start;
121
          INT32    D_mem_size;
122
          ADDR32   ROM_start;
123
          INT32    ROM_size;
124
          UINT32    processor_id;
125
          UINT32    coprocessor;
126
          INT32    reserved;
127
};
128
typedef struct  target_config_t TARGET_CONFIG;
129
extern  TARGET_CONFIG   target_config;
130
 
131
struct  target_status_t {
132
          INT32    status;
133
          INT32    msgs_sent;
134
          INT32    msgs_received;
135
          INT32    errors;
136
          INT32    bkpts_hit;
137
          INT32    bkpts_free;
138
          INT32    traps;
139
          INT32    fills;
140
          INT32    spills;
141
          INT32    cycles;
142
          INT32    reserved;
143
};
144
typedef struct  target_status_t TARGET_STATUS;
145
extern  TARGET_STATUS   target_status;
146
 
147
/*
148
** Structure a 29K instruction and memory address
149
*/
150
 
151
struct instr_t {
152
          BYTE  op;
153
          BYTE  c;
154
          BYTE  a;
155
          BYTE  b;
156
          };
157
 
158
struct addr_29k_t {
159
   INT32  memory_space;
160
   ADDR32 address;
161
   };
162
 
163
/* The Monitor's stdin, stdout, stderr, at all times */
164
extern  int     MON_STDIN;
165
extern  int     MON_STDOUT;
166
extern  int     MON_STDERR;
167
 
168
/* Variables declared in main.c */
169
extern  int             QuietMode;
170
extern  char            *ProgramName;
171
extern  int             Session_ids[];
172
extern  int             NumberOfConnections;
173
 
174
/*
175
** Who controls the keyboard?
176
*/
177
 
178
#define TERM_29K            (INT32) 0
179
#define TERM_USER           (INT32) 1
180
 
181
/*
182
** Processor PRLs
183
*/
184
 
185
#define PROC_AM29000         0x00
186
#define PROC_AM29005         0x10
187
#define PROC_AM29050         0x20
188
#define PROC_AM29035         0x30
189
#define PROC_AM29030         0x40
190
#define PROC_AM29200         0x50
191
#define PROC_AM29205         0x58
192
#define PROC_AM29240         0x60
193
 
194
#define MESSAGES_ON        0
195
#define MESSAGES_OFF       1
196
 
197
/* Extern decalarations for global functions defined in main.c */
198
 
199
GLOBAL  void  fatal_error PARAMS((INT32));
200
GLOBAL  void  warning PARAMS((INT32));
201
 
202
#endif /* _MAIN_H_INCLUDED _ */

powered by: WebSVN 2.1.0

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