From: Luke Kenneth Casson Leighton Date: Sun, 31 May 2020 23:20:20 +0000 (+0100) Subject: bit-test on the function-unit value being tested X-Git-Tag: div_pipeline~703 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9b2665ab76e9d3fff1c0cf009a707ebad9aa337d;p=soc.git bit-test on the function-unit value being tested this because Function Unit is a bitfield --- diff --git a/src/soc/fu/compunits/test/test_compunit.py b/src/soc/fu/compunits/test/test_compunit.py index 62d2f2aa..9970c2db 100644 --- a/src/soc/fu/compunits/test/test_compunit.py +++ b/src/soc/fu/compunits/test/test_compunit.py @@ -150,7 +150,8 @@ class TestRunner(FHDLTestCase): yield instruction.eq(ins) # raw binary instr. yield Settle() fn_unit = yield pdecode2.e.fn_unit - self.assertEqual(fn_unit, self.funit.value) + fuval = self.funit.value + self.assertEqual(fn_unit & fuval, fuval) # set operand and get inputs yield from set_operand(cu, pdecode2, sim)