3 from nmutil
.iocontrol
import RecordObject
4 from nmigen
import Signal
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(name
=f
))