move CR over to CompCROpSubset
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 22 May 2020 15:15:16 +0000 (16:15 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 22 May 2020 15:15:16 +0000 (16:15 +0100)
src/soc/fu/cr/cr_input_record.py
src/soc/fu/cr/pipe_data.py

index 7147ec2c08273ebf54979289fc819522147031c1..d5ffe87e2a527e5d54ce4df1b34b81dd526f350a 100644 (file)
@@ -13,6 +13,7 @@ class CompCROpSubset(Record):
     def __init__(self, name=None):
         layout = (('insn_type', InternalOp),
                   ('fn_unit', Function),
+                  ('insn', 32),
                   ('read_cr_whole', 1),
                   ('write_cr_whole', 1),
                   )
@@ -21,6 +22,7 @@ class CompCROpSubset(Record):
 
         # grrr.  Record does not have kwargs
         self.insn_type.reset_less = True
+        self.insn.reset_less = True
         self.fn_unit.reset_less = True
         self.read_cr_whole.reset_less = True
         self.write_cr_whole.reset_less = True
@@ -36,6 +38,7 @@ class CompCROpSubset(Record):
 
     def ports(self):
         return [self.insn_type,
+                self.insn,
                 self.fn_unit,
                 self.read_cr_whole,
                 self.write_cr_whole,
index e59a81ebe2b00af390ede2c4c04674856dbfa61c..2894144fd814444a7bdb75ae6c695af8519ae084 100644 (file)
@@ -1,7 +1,7 @@
 from nmigen import Signal, Const
 from ieee754.fpcommon.getop import FPPipeContext
 from soc.fu.pipe_data import IntegerData, CommonPipeSpec
-from soc.fu.alu.alu_input_record import CompALUOpSubset # TODO: replace
+from soc.fu.cr.cr_input_record import CompCROpSubset
 from soc.decoder.power_decoder2 import Data
 
 
@@ -58,7 +58,6 @@ class CROutputData(IntegerData):
                       self.full_cr.eq(i.full_cr),
                       self.cr_o.eq(i.cr_o)]
 
-# TODO: replace CompALUOpSubset with CompCROpSubset
 class CRPipeSpec(CommonPipeSpec):
     regspec = (CRInputData.regspec, CROutputData.regspec)
-    opsubsetkls = CompALUOpSubset
+    opsubsetkls = CompCROpSubset