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

Subversion Repositories wdsp

[/] [wdsp/] [trunk/] [sw/] [support/] [support.h] - Blame information for rev 5

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 5 parrado
/* 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
 
13
//#define UART_PRINTF
14
#if OR1K
15
 
16
/* Register access macros */
17
#define REG8(add) *((volatile unsigned char *)(add))
18
#define REG16(add) *((volatile unsigned short *)(add))
19
#define REG32(add) *((volatile unsigned long *)(add))
20
 
21
void printf(const char *fmt, ...);
22
 
23
/* For writing into SPR. */
24
void mtspr(unsigned long spr, unsigned long value);
25
 
26
/* For reading SPR. */
27
unsigned long mfspr(unsigned long spr);
28
 
29
#else /* OR1K */
30
 
31
#include <stdio.h>
32
 
33
#endif /* OR1K */
34
 
35
/* 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
#endif

powered by: WebSVN 2.1.0

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