allow Decode2ToExecute1Type to take an opkls argument
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Mon, 7 Sep 2020 11:00:36 +0000 (12:00 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Mon, 7 Sep 2020 11:00:36 +0000 (12:00 +0100)
src/soc/decoder/decode2execute1.py

index 98ed32f67790453cefb03a0f793fd539d6514bcb..73296930b5ce538af63716d9c0f691ed28b93bb6 100644 (file)
@@ -64,7 +64,7 @@ class Decode2ToOperand(RecordObject):
 
 class Decode2ToExecute1Type(RecordObject):
 
-    def __init__(self, name=None, asmcode=True):
+    def __init__(self, name=None, asmcode=True, opkls=Decode2ToOperand):
 
         RecordObject.__init__(self, name=name)
 
@@ -93,4 +93,4 @@ class Decode2ToExecute1Type(RecordObject):
         self.write_cr = Data(3, name="cr_out")
 
         # decode operand data
-        self.do = Decode2ToOperand(name)
+        self.do = opkls(name)