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

Subversion Repositories or1k

[/] [or1k/] [tags/] [nog_patch_47/] [or1ksim/] [cpu/] [or1k/] [except.h] - Blame information for rev 137

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 99 lampret
#define ONLY_VIRTUAL_MACHINE 0
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 102 lampret
#define EXCEPT_LPINT    0x0500
34 33 lampret
#define EXCEPT_ALIGN    0x0600
35
#define EXCEPT_ILLEGAL  0x0700
36 102 lampret
#define EXCEPT_HPINT    0x0800
37 33 lampret
#define EXCEPT_DTLBMISS 0x0900
38
#define EXCEPT_ITLBMISS 0x0a00
39 102 lampret
#define EXCEPT_RANGE    0x0b00
40 33 lampret
#define EXCEPT_SYSCALL  0x0c00
41
#define EXCEPT_BREAK    0x0d00
42 137 chris
#define EXCEPT_TRAP     0x0e00
43 33 lampret
 
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 102 lampret
                        E == EXCEPT_LPINT ? "Low Priority Interrupt" : \
49 33 lampret
                        E == EXCEPT_ALIGN ? "Alignment" : \
50
                        E == EXCEPT_ILLEGAL ? "Illegal instruction" : \
51 102 lampret
                        E == EXCEPT_HPINT ? "High Priority Interrupt" : \
52 33 lampret
                        E == EXCEPT_DTLBMISS ? "Data TLB Miss" : \
53
                        E == EXCEPT_ITLBMISS ? "Insn TLB Miss" : \
54 102 lampret
                        E == EXCEPT_RANGE ? "Range" : \
55 33 lampret
                        E == EXCEPT_SYSCALL ? "System Call" : \
56 137 chris
                        E == EXCEPT_BREAK ? "Break" : \
57
                        E == EXCEPT_TRAP ? "Trap" : "Unknown"
58
 
59 102 lampret
 

powered by: WebSVN 2.1.0

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