add exceptions
[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 = ['happened', 'alignment', 'instr_fault', 'invalid', 'badtree',
9 'perm_error', 'rc_error', 'segment_fault',]
10 def __init__(self, name=None):
11 RecordObject.__init__(self, name=name)
12 for f in self._exc_types:
13 setattr(self, f, Signal())
14