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

Subversion Repositories openrisc

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

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 93 jeremybenn
int  or1ksim_init (const char *config_file,
50
                   const char *image_file,
51
                   void       *class_ptr,
52
                   int       (*upr) (void              *class_ptr,
53
                                     unsigned long int  addr,
54
                                     unsigned char      mask[],
55
                                     unsigned char      rdata[],
56
                                     int                data_len),
57
                   int       (*upw) (void              *class_ptr,
58
                                     unsigned long int  addr,
59
                                     unsigned char      mask[],
60
                                     unsigned char      wdata[],
61
                                     int                data_len));
62 19 jeremybenn
 
63 82 jeremybenn
int  or1ksim_run (double  duration);
64 19 jeremybenn
 
65 82 jeremybenn
void  or1ksim_reset_duration (double duration);
66 19 jeremybenn
 
67 82 jeremybenn
void  or1ksim_set_time_point ();
68 19 jeremybenn
 
69 82 jeremybenn
double  or1ksim_get_time_period ();
70 19 jeremybenn
 
71 82 jeremybenn
int  or1ksim_is_le ();
72 19 jeremybenn
 
73
unsigned long int  or1ksim_clock_rate();
74
 
75 82 jeremybenn
/* Interrupt handling interface */
76
void  or1ksim_interrupt (int  i);
77 19 jeremybenn
 
78 82 jeremybenn
void or1ksim_interrupt_set (int  i);
79 19 jeremybenn
 
80 82 jeremybenn
void  or1ksim_interrupt_clear (int  i);
81 19 jeremybenn
 
82 82 jeremybenn
/* JTAG interface */
83
double  or1ksim_jtag_reset ();
84
 
85 98 jeremybenn
double  or1ksim_jtag_shift_ir (unsigned char *jreg,
86
                               int            num_bits);
87 82 jeremybenn
 
88 98 jeremybenn
double  or1ksim_jtag_shift_dr (unsigned char *jreg,
89
                               int            num_bits);
90 82 jeremybenn
 
91
 
92 19 jeremybenn
#ifdef __cplusplus
93
}
94
#endif
95
 
96
 
97
#endif  /* OR1KSIM__H */

powered by: WebSVN 2.1.0

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