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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [insight/] [sim/] [tic80/] [sim-main.h] - Blame information for rev 1783

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

Line No. Rev Author Line
1 578 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, Free Software Foundation
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_MAIN_H_
24
#define _SIM_MAIN_H_
25
 
26
 
27
#include "sim-basics.h"
28
#include "sim-signal.h"
29
 
30
#include <signal.h> /* For kill() in insns:do_trap */
31
 
32
#include <errno.h>
33
#ifdef HAVE_UNISTD_H
34
#include <unistd.h>
35
#endif
36
 
37
/* These are generated files.  */
38
#include "itable.h"
39
#include "idecode.h"
40
#include "idecode.h"
41
 
42
typedef instruction_address sim_cia;
43
static const sim_cia null_cia = {0}; /* Dummy */
44
#define NULL_CIA null_cia
45
/* FIXME: Perhaps igen should generate access macros for
46
   `instruction_address' that we could use.  */
47
#define CIA_ADDR(cia) ((cia).ip)
48
 
49
#define WITH_WATCHPOINTS 1
50
 
51
#include "sim-base.h"
52
 
53
#include "alu.h"
54
#include "cpu.h"
55
 
56
 
57
struct sim_state {
58
 
59
  /* the processors proper */
60
  sim_cpu cpu;
61
#define STATE_CPU(sd, n) (&(sd)->cpu)
62
 
63
  /* The base class.  */
64
  sim_state_base base;
65
 
66
};
67
 
68
/* (re) initialize the simulator */
69
 
70
extern void engine_init
71
(SIM_DESC sd);
72
 
73
 
74
#ifndef HAVE_GETPID
75
#define getpid() 42
76
#endif
77
 
78
#ifndef HAVE_KILL
79
#define kill(sig, pid) (errno = EINVAL, -1)
80
#endif
81
#endif

powered by: WebSVN 2.1.0

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