when REMAP shape is zero, skip it in ISACaller.
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Tue, 6 Jul 2021 20:14:33 +0000 (21:14 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Tue, 6 Jul 2021 20:14:33 +0000 (21:14 +0100)
also use srcstep only for FFT butterfly mode (for now)
bit of a hack

src/openpower/decoder/isa/caller.py

index 4f26d97a78a8bf27a8978c9e9a3f5e116726ce4e..d0b80550190bc8b12b8f338654019a47516d542e 100644 (file)
@@ -1225,8 +1225,14 @@ class ISACaller:
                      ]
             rremaps = []
             for i, (shape, remap) in enumerate(remaps):
+                # zero is "disabled"
+                if shape.value == 0x0:
+                    continue
                 # XXX hardcoded! pick dststep for out (i==0) else srcstep
-                step = dststep if (i == 0) else srcstep
+                if shape.mode == 0b00: # multiply mode
+                    step = dststep if (i == 0) else srcstep
+                if shape.mode == 0b01: # FFT butterfly mode
+                    step = srcstep # XXX HACK - for now only use srcstep
                 # this is terrible.  O(N^2) looking for the match. but hey.
                 for idx, remap_idx in enumerate(remap):
                     if idx == step:
@@ -1254,7 +1260,7 @@ class ISACaller:
                         yield self.dec2.in3_step.eq(remap_idx) # RC
                     elif i == 3:
                         pass # no SVSHAPE3
-                rremaps.append((i, idx, remap_idx)) # debug printing
+                rremaps.append((shape.mode, i, idx, remap_idx)) # debug printing
             for x in rremaps:
                 print ("shape remap", x)
         # after that, settle down (combinatorial) to let Vector reg numbers