From 9b2665ab76e9d3fff1c0cf009a707ebad9aa337d Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Mon, 1 Jun 2020 00:20:20 +0100 Subject: [PATCH] bit-test on the function-unit value being tested this because Function Unit is a bitfield --- src/soc/fu/compunits/test/test_compunit.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) -- 2.30.2