# add subfields to use with nmutil.sel
SVP64MODE.MOD2 = [0, 1]
SVP64MODE.CR = [3, 4]
+
+
+# CR sub-fields
+class CRb:
+ LT = 0
+ GT = 1
+ EQ = 2
+ SO = 3
+
+
+CR_SIZE = 4
+
+
+class CR:
+ pass
+
+
+botchify(CRb, CR, CR_SIZE-1)
from soc.config.ifetch import ConfigFetchUnit
from soc.decoder.power_enums import (MicrOp, SVP64PredInt, SVP64PredCR,
SVP64PredMode)
+from soc.consts import CR
from soc.debug.dmi import CoreDebug, DMIInterface
from soc.debug.jtag import JTAG
from soc.config.pinouts import get_pinspecs
invert = Signal(name=name+"crinvert")
with m.Switch(mask):
with m.Case(SVP64PredCR.LT.value):
- comb += idx.eq(0)
+ comb += idx.eq(CR.LT)
comb += invert.eq(0)
with m.Case(SVP64PredCR.GE.value):
- comb += idx.eq(0)
+ comb += idx.eq(CR.LT)
comb += invert.eq(1)
with m.Case(SVP64PredCR.GT.value):
- comb += idx.eq(1)
+ comb += idx.eq(CR.GT)
comb += invert.eq(0)
with m.Case(SVP64PredCR.LE.value):
- comb += idx.eq(1)
+ comb += idx.eq(CR.GT)
comb += invert.eq(1)
with m.Case(SVP64PredCR.EQ.value):
- comb += idx.eq(2)
+ comb += idx.eq(CR.EQ)
comb += invert.eq(0)
with m.Case(SVP64PredCR.NE.value):
- comb += idx.eq(1)
+ comb += idx.eq(CR.EQ)
comb += invert.eq(1)
with m.Case(SVP64PredCR.SO.value):
- comb += idx.eq(3)
+ comb += idx.eq(CR.SO)
comb += invert.eq(0)
with m.Case(SVP64PredCR.NS.value):
- comb += idx.eq(3)
+ comb += idx.eq(CR.SO)
comb += invert.eq(1)
return idx, invert