"REMAP Indexed Mode"
return self.mode == 0b00 and self.submode2 in [0b110, 0b111]
+ def is_triangle(self):
+ "REMAP Triangle Mode"
+ return self.mode == 0b11 and self.skip in [0b00, 0b01]
+
@property
def submode2(self):
return self.fsi['permute'].asint(msb0=True)
@property
def order(self):
permute = self.fsi['permute'].asint(msb0=True)
- if self.is_indexed():
- permute = (permute-0b110)*2 # xyz or yxz
+ if self.is_indexed() or self.is_triangle():
+ permute = (permute&0b001)*2 # xyz or yxz
return SVP64SHAPE.order(permute)
@order.setter
@property
def skip(self):
- if self.is_indexed():
+ if self.is_indexed() or self.is_triangle():
inv = self.fsi['invxyz'].asint(msb0=True)
return (inv & 0b100) >> 2
return self.fsi['skip'].asint(msb0=True)
@skip.setter
def skip(self, value):
- assert not self.is_indexed() # TODO
+ assert not (self.is_indexed() or self.is_triangle()) # TODO
self.fsi['skip'].eq(value)
@property