comb += gt_u.eq(a > b)
comb += equal.eq(a == b)
- # They're in reverse bit order because POWER. Check Book 1,
- # Appendix C.6 for chart
+ # They're in reverse bit order because POWER.
+ # Check V3.0B Book 1, Appendix C.6 for chart
trap_bits = Signal(5)
comb += trap_bits.eq(Cat(gt_u, lt_u, equal, gt_s, lt_s))
from ieee754.fpcommon.getop import FPPipeContext
from soc.fu.alu.pipe_data import IntegerData
from soc.decoder.power_decoder2 import Data
+from nmutil.dynamicpipe import SimpleHandshakeRedir
+from soc.fu.alu.alu_input_record import CompALUOpSubset # TODO: replace
class TrapInputData(IntegerData):
lst = super().eq(i)
return lst + [ self.nia.eq(i.nia), self.msr.eq(i.msr),
self.srr0.eq(i.srr0), self.srr1.eq(i.srr1)]
+
+
+# TODO: replace CompALUOpSubset with CompTrapOpSubset
+class TrapPipeSpec:
+ regspec = (TrapInputData.regspec, TrapOutputData.regspec)
+ opsubsetkls = CompALUOpSubset
+ def __init__(self, id_wid, op_wid):
+ self.id_wid = id_wid
+ self.op_wid = op_wid
+ self.opkls = lambda _: self.opsubsetkls(name="op")
+ self.stage = None
+ self.pipekls = SimpleHandshakeRedir