# FIXME: almost everything in this class contradicts the specs (it doesn't)
# The modes however are swapped: 5-bit is 3-bit, 3-bit is 5-bit
-class CROpFF3RM(FFRc1BaseRM, PredicateBaseRM, VLiBaseRM, CROpBaseRM):
+class CROpFF3RM(FFRc1BaseRM, PredicateBaseRM, VLiBaseRM, ZZBaseRM, CROpBaseRM):
"""cr_op: ffirst 3-bit mode"""
- RC1 = 0 # temporary hack
VLi: BaseRM[19]
inv: BaseRM[21]
CR: BaseRM[22, 23]
- dz: BaseRM[22]
- sz: BaseRM[23]
+ zz: BaseRM[6]
def specifiers(self, record):
yield from super().specifiers(record=record, mode="ff")
expected = [
'sv.crand *16,*2,*33',
'sv.crand 12,2,33',
- 'sv.crand/ff=eq/m=r10 12,2,33',
+ 'sv.crand/ff=RC1/m=r10 12,2,33',
'sv.crand/m=r10 12,2,33',
'sv.crand/m=r10/sz 12,2,33',
'sv.crand/m=r10/zz 12,2,33', # SHOULD PASS
"sv.cmp/ff=eq *4,1,*0,1",
"sv.cmp/ff=eq/vli *4,1,*0,1",
"sv.cmp/ff=ne *4,1,*0,1",
- "sv.cmp/ff=eq/m=r3/sz *4,1,*0,1",
- "sv.cmp/dz/ff=lt/m=r3 *4,1,*0,1",
- "sv.cmp/dz/ff=gt/m=r3/sz *4,1,*0,1",
+ "sv.cmp/ff=eq/m=r3/zz *4,1,*0,1",
+ "sv.cmp/ff=lt/m=r3/zz *4,1,*0,1",
+ "sv.cmp/ff=gt/m=r3/zz *4,1,*0,1",
]
self._do_tst(expected)