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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [or1ksim/] [testbench/] [support/] [support.h] - Blame information for rev 1773

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

Line No. Rev Author Line
1 226 markom
/* Support file for or32 tests.  This file should is included
2
   in each test. It calls main() function and add support for
3
   basic functions */
4
 
5
#ifndef SUPPORT_H
6
#define SUPPORT_H
7
 
8
#include <stdarg.h>
9
#include <stddef.h>
10
#include <limits.h>
11
 
12
#if OR1K
13 915 markom
//#include <_ansi.h>
14 381 markom
 
15 410 simons
/* Register access macros */
16
#define REG8(add) *((volatile unsigned char *)(add))
17
#define REG16(add) *((volatile unsigned short *)(add))
18
#define REG32(add) *((volatile unsigned long *)(add))
19
 
20 1024 simons
void printf(const char *fmt, ...);
21 226 markom
 
22
/* For writing into SPR. */
23
void mtspr(unsigned long spr, unsigned long value);
24
 
25
/* For reading SPR. */
26
unsigned long mfspr(unsigned long spr);
27
 
28
#else /* OR1K */
29
 
30
#include <stdio.h>
31
 
32
#endif /* OR1K */
33
 
34
/* Function to be called at entry point - not defined here.  */
35
int main ();
36
 
37
/* Prints out a value */
38
void report(unsigned long value);
39
 
40
/* return value by making a syscall */
41
extern void exit (int i) __attribute__ ((__noreturn__));
42
 
43
/* memcpy clone */
44
extern void *memcpy (void *__restrict __dest,
45
                     __const void *__restrict __src, size_t __n);
46
 
47
/* Timer functions */
48
extern void start_timer(int);
49
extern unsigned int read_timer(int);
50
 
51 342 markom
extern unsigned long excpt_buserr;
52
extern unsigned long excpt_dpfault;
53
extern unsigned long excpt_ipfault;
54 600 simons
extern unsigned long excpt_tick;
55 342 markom
extern unsigned long excpt_align;
56
extern unsigned long excpt_illinsn;
57 600 simons
extern unsigned long excpt_int;
58 342 markom
extern unsigned long excpt_dtlbmiss;
59
extern unsigned long excpt_itlbmiss;
60
extern unsigned long excpt_range;
61
extern unsigned long excpt_syscall;
62
extern unsigned long excpt_break;
63
extern unsigned long excpt_trap;
64
 
65 226 markom
#endif

powered by: WebSVN 2.1.0

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