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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [or1ksim/] [cpu/] [or1k/] [except.h] - Blame information for rev 77

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

Line No. Rev Author Line
1 33 lampret
/* except.h -- OR1K architecture specific exceptions
2
   Copyright (C) 1999 Damjan Lampret, lampret@opencores.org
3
 
4
This file is part of OpenRISC 1000 Architectural Simulator.
5
 
6
This program is free software; you can redistribute it and/or modify
7
it under the terms of the GNU General Public License as published by
8
the Free Software Foundation; either version 2 of the License, or
9
(at your option) any later version.
10
 
11
This program is distributed in the hope that it will be useful,
12
but WITHOUT ANY WARRANTY; without even the implied warranty of
13
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
GNU General Public License for more details.
15
 
16
You should have received a copy of the GNU General Public License
17
along with this program; if not, write to the Free Software
18
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
19
 
20
/* Prototypes */
21
void except_handle(int except, unsigned long ea);
22
 
23
 
24
/* Define if you want pure virtual machine simulation (no exceptions etc.) */
25 77 lampret
#define ONLY_VIRTUAL_MACHINE 1
26 33 lampret
 
27
/* Definition of OR1K exceptions */
28
 
29
#define EXCEPT_RESET    0x0100
30
#define EXCEPT_BUSERR   0x0200
31
#define EXCEPT_DPF      0x0300
32
#define EXCEPT_IPF      0x0400
33
#define EXCEPT_EXTINT   0x0500
34
#define EXCEPT_ALIGN    0x0600
35
#define EXCEPT_ILLEGAL  0x0700
36
#define EXCEPT_PEINT    0x0800
37
#define EXCEPT_DTLBMISS 0x0900
38
#define EXCEPT_ITLBMISS 0x0a00
39
#define EXCEPT_RRANGE   0x0b00
40
#define EXCEPT_SYSCALL  0x0c00
41
#define EXCEPT_BREAK    0x0d00
42
#define EXCEPT_RESERVED 0x0e00
43
 
44
#define EXCEPT_NAME(E) E == EXCEPT_RESET ? "Reset" : \
45
                        E == EXCEPT_BUSERR ? "Bus Error" : \
46
                        E == EXCEPT_DPF ? "Data Page Fault" : \
47
                        E == EXCEPT_IPF ? "Insn Page Fault" : \
48
                        E == EXCEPT_EXTINT ? "External Interrupt" : \
49
                        E == EXCEPT_ALIGN ? "Alignment" : \
50
                        E == EXCEPT_ILLEGAL ? "Illegal instruction" : \
51
                        E == EXCEPT_PEINT ? "Priority Interrupt" : \
52
                        E == EXCEPT_DTLBMISS ? "Data TLB Miss" : \
53
                        E == EXCEPT_ITLBMISS ? "Insn TLB Miss" : \
54
                        E == EXCEPT_RRANGE ? "Register Range" : \
55
                        E == EXCEPT_SYSCALL ? "System Call" : \
56
                        E == EXCEPT_BREAK ? "Break" : "Uknown"
57 54 lampret
 

powered by: WebSVN 2.1.0

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