class ALUInputData(IntegerData):
+ regspec = [('INT', 'a', '0:63'),
+ ('INT', 'b', '0:63'),
+ ('XER', 'xer_so', '32'),
+ ('XER', 'xer_ca', '34,45')]
def __init__(self, pspec):
super().__init__(pspec)
self.a = Signal(64, reset_less=True) # RA
# https://bugs.libre-soc.org/show_bug.cgi?id=305#c19
class ALUOutputData(IntegerData):
+ regspec = [('INT', 'o', '0:63'),
+ ('CR', 'cr0', '0:3'),
+ ('XER', 'xer_ca', '34,45'),
+ ('XER', 'xer_ov', '33,44'),
+ ('XER', 'xer_so', '32')]
def __init__(self, pspec):
super().__init__(pspec)
self.o = Signal(64, reset_less=True, name="stage_o")
class BranchInputData(IntegerData):
+ regspec = [('SPR', 'spr1', '0:63'),
+ ('SPR', 'spr2', '0:63'),
+ ('CR', 'cr', '32'),
+ ('PC', 'cia', '0:63')]
def __init__(self, pspec):
super().__init__(pspec)
# Note: for OP_BCREG, SPR1 will either be CTR, LR, or TAR
class BranchOutputData(IntegerData):
+ regspec = [('SPR', 'spr1', '0:63'),
+ ('SPR', 'spr2', '0:63'),
+ ('PC', 'cia', '0:63')]
def __init__(self, pspec):
super().__init__(pspec)
self.spr1 = Data(64, name="spr1")
class CRInputData(IntegerData):
+ regspec = [('INT', 'a', '0:63'),
+ ('CR', 'cr', '32')]
def __init__(self, pspec):
super().__init__(pspec)
self.a = Signal(64, reset_less=True) # RA
- self.cr = Signal(64, reset_less=True) # CR in
+ self.cr = Signal(32, reset_less=True) # CR in
def __iter__(self):
yield from super().__iter__()
self.cr.eq(i.cr)]
class CROutputData(IntegerData):
+ regspec = [('INT', 'o', '0:63'),
+ ('CR', 'cr', '32')]
def __init__(self, pspec):
super().__init__(pspec)
self.o = Signal(64, reset_less=True) # RA
- self.cr = Signal(64, reset_less=True) # CR in
+ self.cr = Signal(32, reset_less=True) # CR in
def __iter__(self):
yield from super().__iter__()
class LogicalInputData(IntegerData):
+ regspec = [('INT', 'a', '0:63'),
+ ('INT', 'rb', '0:63'),
+ ('XER', 'xer_so', '32'),
+ ('XER', 'xer_ca', '34,45')]
def __init__(self, pspec):
super().__init__(pspec)
self.a = Signal(64, reset_less=True) # RA
class ShiftRotInputData(IntegerData):
+ regspec = [('INT', 'ra', '0:63'),
+ ('INT', 'rs', '0:63'),
+ ('INT', 'rb', '0:63'),
+ ('XER', 'xer_so', '32'),
+ ('XER', 'xer_ca', '34,45')]
def __init__(self, pspec):
super().__init__(pspec)
self.ra = Signal(64, reset_less=True) # RA
class TrapInputData(IntegerData):
+ regspec = [('INT', 'a', '0:63'),
+ ('INT', 'b', '0:63'),
+ ('PC', 'cia', '0:63'),
+ ('MSR', 'msr', '0:63')]
def __init__(self, pspec):
super().__init__(pspec)
self.a = Signal(64, reset_less=True) # RA
class TrapOutputData(IntegerData):
+ regspec = [('SPR', 'srr0', '0:63'),
+ ('SPR', 'srr1', '0:63'),
+ ('PC', 'nia', '0:63'),
+ ('MSR', 'msr', '0:63')]
def __init__(self, pspec):
super().__init__(pspec)
- self.nia = Data(64, name="nia") # NIA (Next PC)
- self.msr = Signal(64, reset_less=True) # MSR
self.srr0 = Data(64, name="srr0") # SRR0 SPR
self.srr1 = Data(64, name="srr1") # SRR1 SPR
+ self.nia = Data(64, name="nia") # NIA (Next PC)
+ self.msr = Signal(64, reset_less=True) # MSR
def __iter__(self):
yield from super().__iter__()