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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [or1ksim/] [or1ksim.h] - Blame information for rev 82

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

Line No. Rev Author Line
1 19 jeremybenn
/* or1ksim.h -- Simulator library header file
2
 
3
   Copyright (C) 2008 Embecosm Limited
4
 
5
   Contributor Jeremy Bennett <jeremy.bennett@embecosm.com>
6
 
7
   This file is part of OpenRISC 1000 Architectural Simulator.
8
 
9
   This program is free software; you can redistribute it and/or modify it
10
   under the terms of the GNU General Public License as published by the Free
11
   Software Foundation; either version 3 of the License, or (at your option)
12
   any later version.
13
 
14
   This program is distributed in the hope that it will be useful, but WITHOUT
15
   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
16
   FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
17
   more details.
18
 
19
   You should have received a copy of the GNU General Public License along
20
   with this program.  If not, see <http://www.gnu.org/licenses/>. */
21
 
22
 
23
/* Header file definining the interface to the Or1ksim library. */
24
 
25
 
26
#ifndef OR1KSIM__H
27
#define OR1KSIM__H
28
 
29
 
30
/* The bus width */
31
 
32
/* #define BUSWIDTH  32 */
33
 
34
/* The return codes */
35
 
36
enum  or1ksim_rc {
37
  OR1KSIM_RC_OK,                /* No error */
38
 
39
  OR1KSIM_RC_BADINIT,           /* Couldn't initialize */
40
  OR1KSIM_RC_BRKPT              /* Hit a breakpoint */
41
};
42
 
43
/* The interface methods */
44
 
45
#ifdef __cplusplus
46
extern "C" {
47
#endif
48
 
49 82 jeremybenn
int  or1ksim_init (const char         *config_file,
50 19 jeremybenn
                   const char         *image_file,
51
                   void               *class_ptr,
52 82 jeremybenn
                   unsigned long int (*upr) (void              *class_ptr,
53 19 jeremybenn
                                             unsigned long int  addr,
54
                                             unsigned long int  mask),
55 82 jeremybenn
                   void              (*upw) (void              *class_ptr,
56 19 jeremybenn
                                             unsigned long int  addr,
57
                                             unsigned long int  mask,
58 82 jeremybenn
                                             unsigned long int  wdata));
59 19 jeremybenn
 
60 82 jeremybenn
int  or1ksim_run (double  duration);
61 19 jeremybenn
 
62 82 jeremybenn
void  or1ksim_reset_duration (double duration);
63 19 jeremybenn
 
64 82 jeremybenn
void  or1ksim_set_time_point ();
65 19 jeremybenn
 
66 82 jeremybenn
double  or1ksim_get_time_period ();
67 19 jeremybenn
 
68 82 jeremybenn
int  or1ksim_is_le ();
69 19 jeremybenn
 
70
unsigned long int  or1ksim_clock_rate();
71
 
72 82 jeremybenn
/* Interrupt handling interface */
73
void  or1ksim_interrupt (int  i);
74 19 jeremybenn
 
75 82 jeremybenn
void or1ksim_interrupt_set (int  i);
76 19 jeremybenn
 
77 82 jeremybenn
void  or1ksim_interrupt_clear (int  i);
78 19 jeremybenn
 
79 82 jeremybenn
/* JTAG interface */
80
double  or1ksim_jtag_reset ();
81
 
82
double  or1ksim_jtag_shift_ir (unsigned char *jreg);
83
 
84
double  or1ksim_jtag_shift_dr (unsigned char *jreg);
85
 
86
 
87 19 jeremybenn
#ifdef __cplusplus
88
}
89
#endif
90
 
91
 
92
#endif  /* OR1KSIM__H */

powered by: WebSVN 2.1.0

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