move "happened" field to end of LDSTException
[openpower-isa.git] / src / openpower / exceptions.py
1 """exceptions
2 """
3 from nmutil.iocontrol import RecordObject
4 from nmigen import Signal
5
6 # https://bugs.libre-soc.org/show_bug.cgi?id=465
7 class LDSTException(RecordObject):
8 _exc_types = ['alignment', 'instr_fault', 'invalid', 'badtree',
9 'perm_error', 'rc_error', 'segment_fault',
10 'happened', ] # must be last: may overlap with Data.ok
11 def __init__(self, name=None):
12 RecordObject.__init__(self, name=name)
13 for f in self._exc_types:
14 setattr(self, f, Signal())
15