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

Subversion Repositories minsoc

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

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 36 rfajardo
void or32_printf(const char *fmt, ...);
20 2 rfajardo
 
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 36 rfajardo
#define printf  or32_printf
34
 
35 2 rfajardo
/* Function to be called at entry point - not defined here.  */
36
int main ();
37
 
38
/* Prints out a value */
39
void report(unsigned long value);
40
 
41
/* return value by making a syscall */
42
extern void or32_exit (int i) __attribute__ ((__noreturn__));
43
 
44
/* memcpy clone */
45
/*
46
extern void *memcpy (void *__restrict __dest,
47
                     __const void *__restrict __src, size_t __n);
48
*/
49
 
50
/* Timer functions */
51
extern void start_timer(int);
52
extern unsigned int read_timer(int);
53
 
54
extern unsigned long excpt_buserr;
55
extern unsigned long excpt_dpfault;
56
extern unsigned long excpt_ipfault;
57
extern unsigned long excpt_tick;
58
extern unsigned long excpt_align;
59
extern unsigned long excpt_illinsn;
60
extern unsigned long excpt_int;
61
extern unsigned long excpt_dtlbmiss;
62
extern unsigned long excpt_itlbmiss;
63
extern unsigned long excpt_range;
64
extern unsigned long excpt_syscall;
65
extern unsigned long excpt_break;
66
extern unsigned long excpt_trap;
67
 
68 36 rfajardo
 
69
#endif /* SUPPORT_H */

powered by: WebSVN 2.1.0

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