2 * Copyright (c) 2003-2005 The Regents of The University of Michigan
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;
9 * redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution;
12 * neither the name of the copyright holders nor the names of its
13 * contributors may be used to endorse or promote products derived from
14 * this software without specific prior written permission.
16 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 #ifndef __ALPHA_FAULTS_HH__
30 #define __ALPHA_FAULTS_HH__
32 #include "sim/faults.hh"
34 // The reasoning behind the name and vect functions is in sim/faults.hh
36 typedef const Addr FaultVect;
38 class AlphaFault : public FaultBase
41 static FaultName _name;
42 static FaultVect _vect;
43 static FaultStat _stat;
45 FaultName name() {return _name;}
46 virtual FaultVect vect() {return _vect;}
47 virtual FaultStat & stat() {return _stat;}
50 class ResetFault : public AlphaFault
53 static FaultName _name;
54 static FaultVect _vect;
55 static FaultStat _stat;
57 FaultName name() {return _name;}
58 FaultVect vect() {return _vect;}
59 FaultStat & stat() {return _stat;}
62 class ArithmeticFault : public AlphaFault
65 static FaultName _name;
66 static FaultVect _vect;
67 static FaultStat _stat;
69 FaultName name() {return _name;}
70 FaultVect vect() {return _vect;}
71 FaultStat & stat() {return _stat;}
74 class InterruptFault : public AlphaFault
77 static FaultName _name;
78 static FaultVect _vect;
79 static FaultStat _stat;
81 FaultName name() {return _name;}
82 FaultVect vect() {return _vect;}
83 FaultStat & stat() {return _stat;}
86 class NDtbMissFault : public AlphaFault
89 static FaultName _name;
90 static FaultVect _vect;
91 static FaultStat _stat;
93 FaultName name() {return _name;}
94 FaultVect vect() {return _vect;}
95 FaultStat & stat() {return _stat;}
98 class PDtbMissFault : public AlphaFault
101 static FaultName _name;
102 static FaultVect _vect;
103 static FaultStat _stat;
105 FaultName name() {return _name;}
106 FaultVect vect() {return _vect;}
107 FaultStat & stat() {return _stat;}
110 class DtbPageFault : public AlphaFault
113 static FaultName _name;
114 static FaultVect _vect;
115 static FaultStat _stat;
117 FaultName name() {return _name;}
118 FaultVect vect() {return _vect;}
119 FaultStat & stat() {return _stat;}
122 class DtbAcvFault : public AlphaFault
125 static FaultName _name;
126 static FaultVect _vect;
127 static FaultStat _stat;
129 FaultName name() {return _name;}
130 FaultVect vect() {return _vect;}
131 FaultStat & stat() {return _stat;}
134 class ItbMissFault : public AlphaFault
137 static FaultName _name;
138 static FaultVect _vect;
139 static FaultStat _stat;
141 FaultName name() {return _name;}
142 FaultVect vect() {return _vect;}
143 FaultStat & stat() {return _stat;}
146 class ItbPageFault : public AlphaFault
149 static FaultName _name;
150 static FaultVect _vect;
151 static FaultStat _stat;
153 FaultName name() {return _name;}
154 FaultVect vect() {return _vect;}
155 FaultStat & stat() {return _stat;}
158 class ItbAcvFault : public AlphaFault
161 static FaultName _name;
162 static FaultVect _vect;
163 static FaultStat _stat;
165 FaultName name() {return _name;}
166 FaultVect vect() {return _vect;}
167 FaultStat & stat() {return _stat;}
170 class UnimplementedOpcodeFault : public AlphaFault
173 static FaultName _name;
174 static FaultVect _vect;
175 static FaultStat _stat;
177 FaultName name() {return _name;}
178 FaultVect vect() {return _vect;}
179 FaultStat & stat() {return _stat;}
182 class FloatEnableFault : public AlphaFault
185 static FaultName _name;
186 static FaultVect _vect;
187 static FaultStat _stat;
189 FaultName name() {return _name;}
190 FaultVect vect() {return _vect;}
191 FaultStat & stat() {return _stat;}
194 class PalFault : public AlphaFault
197 static FaultName _name;
198 static FaultVect _vect;
199 static FaultStat _stat;
201 FaultName name() {return _name;}
202 FaultVect vect() {return _vect;}
203 FaultStat & stat() {return _stat;}
206 class IntegerOverflowFault : public AlphaFault
209 static FaultName _name;
210 static FaultVect _vect;
211 static FaultStat _stat;
213 FaultName name() {return _name;}
214 FaultVect vect() {return _vect;}
215 FaultStat & stat() {return _stat;}
218 //Fault * ListOfFaults[];
221 #endif // __FAULTS_HH__