From: Luke Kenneth Casson Leighton Date: Mon, 5 Jul 2021 13:30:50 +0000 (+0100) Subject: add function to turn permute into an order list X-Git-Tag: xlen-bcd~351 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1db61d660db382b671237215fc65c65b5371c810;p=openpower-isa.git add function to turn permute into an order list --- diff --git a/src/openpower/sv/svp64.py b/src/openpower/sv/svp64.py index 32880775..e9ba29b1 100644 --- a/src/openpower/sv/svp64.py +++ b/src/openpower/sv/svp64.py @@ -68,6 +68,15 @@ class SVP64REMAP(Record): ("ydimsz" , 6), ("xdimsz" , 6)], name=name) + def order(self, permute): + options = {0b000: [0,1,2], + 0b001: [0,2,1], + 0b010: [1,0,2], + 0b011: [1,2,0], + 0b100: [2,0,1], + 0b101: [2,1,0]} + return options[permute] + def ports(self): return [self.mode, self.skip, self.offset, self.invxyz, self.permute, self.zdimsz, self.ydimsz, self.xdimsz]