got fed up of adding arguments to ISACaller / ISA, use *args and **kwargs
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Wed, 17 Jun 2020 14:46:04 +0000 (15:46 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Wed, 17 Jun 2020 14:46:04 +0000 (15:46 +0100)
src/soc/decoder/pseudo/pywriter.py

index 465f366bdbf1214f5c5f4c606c464a533669435f..88b7539de344ed4dc760d0ef3aa9de8a4197d729 100644 (file)
@@ -116,8 +116,8 @@ class PyISAWriter(ISA):
 
             classes = ', '.join(['ISACaller'] + self.pages_written)
             f.write('class ISA(%s):\n' % classes)
-            f.write('    def __init__(self, dec, regs, sprs, cr, mem, msr):\n')
-            f.write('        super().__init__(dec, regs, sprs, cr, mem, msr)\n')
+            f.write('    def __init__(self, *args, **kwargs):\n')
+            f.write('        super().__init__(*args, **kwargs)\n')
             f.write('        self.instrs = {\n')
             for page in self.pages_written:
                 f.write('            **self.%s_instrs,\n' % page)