From f933fec982a4a84808cf54d88fdd963920c90686 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Sun, 12 Sep 2021 14:24:00 +0100 Subject: [PATCH] code comments --- src/soc/simple/test/test_core.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/soc/simple/test/test_core.py b/src/soc/simple/test/test_core.py index 0be2a292..0c7bda12 100644 --- a/src/soc/simple/test/test_core.py +++ b/src/soc/simple/test/test_core.py @@ -154,9 +154,12 @@ def teststate_check_regs(dut, states, test, code): to check if they have the same "state" (registers only, at the moment) """ slist = [] + # create one TestState per "thing" for stype, totest in states.items(): state = yield from TestState(stype, totest, dut, code) slist.append(state) + # compare each "thing" against the next "thing" in the list. + # (no need to do an O(N^2) comparison here, they *all* have to be the same for i in range(len(slist)-1): state, against = slist[i], slist[i+1] state.compare(against) -- 2.30.2