summaryrefslogtreecommitdiff
path: root/tb/gfx_shader_bind/testbench/data.py
diff options
context:
space:
mode:
authorAlejandro Soto <alejandro@34project.org>2024-06-01 14:54:11 -0600
committerAlejandro Soto <alejandro@34project.org>2024-06-01 15:10:05 -0600
commit41a944b7577833e7dad6f2bee74ccc0082cc5717 (patch)
treee9b913dff83f174d3d7f67237eb8b1385b3b6ef4 /tb/gfx_shader_bind/testbench/data.py
parent766cdd53d55796c66a2a968769655b0c68e7c57f (diff)
tb/gfx_shader_bind: update testbench
Diffstat (limited to 'tb/gfx_shader_bind/testbench/data.py')
-rw-r--r--tb/gfx_shader_bind/testbench/data.py22
1 files changed, 18 insertions, 4 deletions
diff --git a/tb/gfx_shader_bind/testbench/data.py b/tb/gfx_shader_bind/testbench/data.py
index 4aa3630..d119210 100644
--- a/tb/gfx_shader_bind/testbench/data.py
+++ b/tb/gfx_shader_bind/testbench/data.py
@@ -11,13 +11,27 @@ class FrontWave:
return other.__eq__(self)
if other._soft:
- return self.group == other.group and \
- ((other.insn is None and self.insn is None) or \
- (other.insn is not None and (not self.insn or self.insn == other.insn)))
+ if self.group != other.group:
+ return False
+ elif other.insn is None and self.insn is None:
+ return True
+ elif other.insn is None:
+ return False
+ elif self.insn is None:
+ return True
+ elif type(other.insn) is tuple:
+ return self.insn in other.insn
+ else:
+ return self.insn == other.insn
return self.group == other.group and self.insn == other.insn
def __repr__(self):
- insn = f', insn=0x{self.insn:08x}' if not self.retry else ''
+ if type(self.insn) is tuple:
+ insn = '(' + ','.join(f'0x{insn:08x}' for insn in self.insn) + ')'
+ elif self.insn is not None:
+ insn = f'0x{self.insn:08x}'
+
+ insn = f', insn={insn}' if not self.retry else ''
soft = f', soft' if self._soft else ''
return f'FrontWave(group={self.group}, retry={int(self.retry)}{insn}{soft})'