From: Luke Kenneth Casson Leighton Date: Sun, 12 Sep 2021 13:24:00 +0000 (+0100) Subject: code comments X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f933fec982a4a84808cf54d88fdd963920c90686;p=soc.git code comments --- 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)