OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

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

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
int  or1ksim_init( const char         *config_file,
50
                   const char         *image_file,
51
                   void               *class_ptr,
52
                   unsigned long int (*upr)( void              *class_ptr,
53
                                             unsigned long int  addr,
54
                                             unsigned long int  mask),
55
                   void              (*upw)( void              *class_ptr,
56
                                             unsigned long int  addr,
57
                                             unsigned long int  mask,
58
                                             unsigned long int  wdata ) );
59
 
60
int  or1ksim_run( double  duration );
61
 
62
void  or1ksim_reset_duration( double duration );
63
 
64
void  or1ksim_set_time_point();
65
 
66
double  or1ksim_get_time_period();
67
 
68
int  or1ksim_is_le();
69
 
70
unsigned long int  or1ksim_clock_rate();
71
 
72
void or1ksim_interrupt( int  i );
73
 
74
void or1ksim_interrupt_set( int  i );
75
 
76
void or1ksim_interrupt_clear( int  i );
77
 
78
#ifdef __cplusplus
79
}
80
#endif
81
 
82
 
83
#endif  /* OR1KSIM__H */

powered by: WebSVN 2.1.0

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