# copy overflow and sticky-overflow
comb += self.o.xer_so.data.eq(self.so)
- comb += self.o.xer_so.ok.eq(op.oe.oe & op.oe.oe_ok) # SO is to be set
+ # SO is to be set - however to save regfile port requests, only set
+ # if the data actually changes. only possible due to pass-thru
+ with m.If(self.i.xer_so.data != self.so):
+ comb += self.o.xer_so.ok.eq(op.oe.oe & op.oe.oe_ok)
comb += self.o.xer_ov.data.eq(ov)
comb += self.o.xer_ov.ok.eq(op.oe.oe & op.oe.oe_ok) # OV/32 is to be set
regspec = [('INT', 'o', '0:63'),
('CR', 'cr0', '0:3'),
('XER', 'xer_ca', '34,45'),
- ('XER', 'xer_so', '32')]
+ ]
def __init__(self, pspec):
super().__init__(pspec)
self.o = Data(64, name="stage_o") # RT
self.cr0 = Data(4, name="cr0")
self.xer_ca = Data(2, name="xer_co") # bit0: ca, bit1: ca32
- self.xer_so = Data(1, name="xer_so")
def __iter__(self):
yield from super().__iter__()
yield self.o
yield self.xer_ca
yield self.cr0
- yield self.xer_so
def eq(self, i):
lst = super().eq(i)
return lst + [self.o.eq(i.o),
self.xer_ca.eq(i.xer_ca),
self.cr0.eq(i.cr0),
- self.xer_so.eq(i.xer_so)]
+ ]
class LogicalPipeSpec(CommonPipeSpec):