OpenCores
URL https://opencores.org/ocsvn/an-fpga-implementation-of-low-latency-noc-based-mpsoc/an-fpga-implementation-of-low-latency-noc-based-mpsoc/trunk

Subversion Repositories an-fpga-implementation-of-low-latency-noc-based-mpsoc

[/] [an-fpga-implementation-of-low-latency-noc-based-mpsoc/] [trunk/] [mpsoc/] [src_processor/] [mor1kx-3.1/] [sw/] [mor1kx/] [include/] [mor1kx-utils.h] - Blame information for rev 38

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 38 alirezamon
#ifndef _MOR1KX_UTILS_H_
2
#define _MOR1KX_UTILS_H_
3
 
4
// Pull in interrupt defines here
5
#include "int.h"
6
 
7
/* Register access macros */
8
#define REG8(add) *((volatile unsigned char *)(add))
9
#define REG16(add) *((volatile unsigned short *)(add))
10
#define REG32(add) *((volatile unsigned long *)(add))
11
 
12
/*
13
 * l.nop constants
14
 *
15
 */
16
#define NOP_NOP         0x0000      /* Normal nop instruction */
17
#define NOP_EXIT        0x0001      /* End of simulation */
18
#define NOP_REPORT      0x0002      /* Simple report */
19
#define NOP_PRINTF      0x0003      /* Simprintf instruction */
20
#define NOP_PUTC        0x0004      /* Simulation putc instruction */
21
#define NOP_REPORT_FIRST 0x0400     /* Report with number */
22
#define NOP_REPORT_LAST  0x03ff      /* Report with number */
23
 
24
/* For writing into SPR. */
25
void mtspr(unsigned long spr, unsigned long value);
26
 
27
/* For reading SPR. */
28
unsigned long mfspr(unsigned long spr);
29
 
30
/* Print out a character via simulator */
31
void sim_putc(unsigned char c);
32
 
33
/* Prints out a value */
34
void report(unsigned long value);
35
 
36
/* Loops/exits simulation */
37
void exit(int i);
38
 
39
/* Enable user interrupts */
40
void cpu_enable_user_interrupts(void);
41
 
42
/* Variable keeping track of timer ticks */
43
extern unsigned long timer_ticks;
44
/* Enable tick timer and interrupt generation */
45
void cpu_enable_timer(void);
46
/* Disable tick timer and interrupt generation */
47
void cpu_disable_timer(void);
48
/* Timer increment - called by interrupt routine */
49
void cpu_timer_tick(void);
50
/* Reset tick counter */
51
void cpu_reset_timer_ticks(void);
52
/* Get tick counter */
53
unsigned long cpu_get_timer_ticks(void);
54
/* Wait for 10ms */
55
void cpu_sleep_10ms(void);
56
 
57
#endif

powered by: WebSVN 2.1.0

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