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

Subversion Repositories or1k

[/] [or1k/] [branches/] [oc/] [gdb-5.0/] [sim/] [common/] [sim-basics.h] - Blame information for rev 106

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 106 markom
/*  This file is part of the program psim.
2
 
3
    Copyright (C) 1994-1997, Andrew Cagney <cagney@highland.com.au>
4
    Copyright (C) 1997, 1998, Free Software Foundation, Inc.
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19
 
20
    */
21
 
22
 
23
#ifndef _SIM_BASICS_H_
24
#define _SIM_BASICS_H_
25
 
26
 
27
/* Basic configuration */
28
 
29
#ifdef HAVE_CONFIG_H
30
#include "config.h"
31
#endif
32
 
33
/* Basic host dependant mess - hopefully <stdio.h> + <stdarg.h> will
34
   bring potential conflicts out in the open */
35
 
36
#include <stdarg.h>
37
#include <stdio.h>
38
#include <setjmp.h>
39
 
40
#ifdef __CYGWIN32__
41
extern int vasprintf (char **result, const char *format, va_list args);
42
extern int asprintf (char **result, const char *format, ...);
43
#endif
44
 
45
 
46
#ifndef NULL
47
#define NULL 0
48
#endif
49
 
50
 
51
 
52
/* Some versions of GCC include an attribute operator, define it */
53
 
54
#if !defined (__attribute__)
55
#if (!defined(__GNUC__) || (__GNUC__ < 2) || (__GNUC__ == 2 && __GNUC_MINOR__ < 6))
56
#define __attribute__(arg)
57
#endif
58
#endif
59
 
60
 
61
/* Global types that code manipulates */
62
 
63
typedef struct _device device;
64
struct hw;
65
struct _sim_fpu;
66
 
67
 
68
/* Generic address space (maps) and access attributes */
69
 
70
enum {
71
  read_map = 0,
72
  write_map = 1,
73
  exec_map = 2,
74
  io_map = 3,
75
  nr_maps = 32, /* something small */
76
};
77
 
78
enum {
79
  access_invalid = 0,
80
  access_read = 1 << read_map,
81
  access_write = 1 << write_map,
82
  access_exec = 1 << exec_map,
83
  access_io = 1 << io_map,
84
};
85
 
86
enum {
87
  access_read_write = (access_read | access_write),
88
  access_read_exec = (access_read | access_exec),
89
  access_write_exec = (access_write | access_exec),
90
  access_read_write_exec = (access_read | access_write | access_exec),
91
  access_read_io = (access_read | access_io),
92
  access_write_io = (access_write | access_io),
93
  access_read_write_io = (access_read | access_write | access_io),
94
  access_exec_io = (access_exec | access_io),
95
  access_read_exec_io = (access_read | access_exec | access_io),
96
  access_write_exec_io = (access_write | access_exec | access_io),
97
  access_read_write_exec_io = (access_read | access_write | access_exec | access_io),
98
};
99
 
100
 
101
/* disposition of an object when things are reset */
102
 
103
typedef enum {
104
  permenant_object,
105
  temporary_object,
106
} object_disposition;
107
 
108
 
109
/* Memory transfer types */
110
 
111
typedef enum _transfer_type {
112
  read_transfer,
113
  write_transfer,
114
} transfer_type;
115
 
116
 
117
/* directions */
118
 
119
typedef enum {
120
  bidirect_port,
121
  input_port,
122
  output_port,
123
} port_direction;
124
 
125
 
126
 
127
/* Basic definitions - ordered so that nothing calls what comes after it.  */
128
 
129
/* FIXME: conditionalizing tconfig.h on HAVE_CONFIG_H seems wrong.  */
130
#ifdef HAVE_CONFIG_H
131
#include "tconfig.h"
132
#endif
133
 
134
#include "ansidecl.h"
135
#include "callback.h"
136
#include "remote-sim.h"
137
 
138
#include "sim-config.h"
139
 
140
#include "sim-inline.h"
141
 
142
#include "sim-types.h"
143
#include "sim-bits.h"
144
#include "sim-endian.h"
145
#include "sim-signal.h"
146
#include "sim-arange.h"
147
 
148
#include "sim-utils.h"
149
 
150
/* Note: Only the simpler interfaces are defined here.  More heavy
151
   weight objects, such as core and events, are defined in the more
152
   serious sim-base.h header. */
153
 
154
#endif /* _SIM_BASICS_H_ */

powered by: WebSVN 2.1.0

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