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

Subversion Repositories minsoc

[/] [minsoc/] [trunk/] [sw/] [support/] [support.h] - Blame information for rev 29

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

Line No. Rev Author Line
1 2 rfajardo
/* 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
#define OR1K 1  //ME added
12
#if OR1K
13
 
14
/* Register access macros */
15
#define REG8(add) *((volatile unsigned char *)(add))
16
#define REG16(add) *((volatile unsigned short *)(add))
17
#define REG32(add) *((volatile unsigned long *)(add))
18
 
19
void printf(const char *fmt, ...);
20
 
21
/* For writing into SPR. */
22
void mtspr(unsigned long spr, unsigned long value);
23
 
24
/* For reading SPR. */
25
unsigned long mfspr(unsigned long spr);
26
 
27
#else /* OR1K */
28
 
29
#include <stdio.h>
30
 
31
#endif /* OR1K */
32
 
33
/* Function to be called at entry point - not defined here.  */
34
int main ();
35
 
36
/* Prints out a value */
37
void report(unsigned long value);
38
 
39
/* return value by making a syscall */
40
extern void or32_exit (int i) __attribute__ ((__noreturn__));
41
 
42
/* memcpy clone */
43
/*
44
extern void *memcpy (void *__restrict __dest,
45
                     __const void *__restrict __src, size_t __n);
46
*/
47
 
48
/* Timer functions */
49
extern void start_timer(int);
50
extern unsigned int read_timer(int);
51
 
52
extern unsigned long excpt_buserr;
53
extern unsigned long excpt_dpfault;
54
extern unsigned long excpt_ipfault;
55
extern unsigned long excpt_tick;
56
extern unsigned long excpt_align;
57
extern unsigned long excpt_illinsn;
58
extern unsigned long excpt_int;
59
extern unsigned long excpt_dtlbmiss;
60
extern unsigned long excpt_itlbmiss;
61
extern unsigned long excpt_range;
62
extern unsigned long excpt_syscall;
63
extern unsigned long excpt_break;
64
extern unsigned long excpt_trap;
65
 
66
#endif

powered by: WebSVN 2.1.0

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