Merge pull request #1816 from motec-research/test_csr_status_issue

test_csr: test cases to demonstrate a CSRStatus() issue
This commit is contained in:
enjoy-digital 2023-10-27 12:52:25 +02:00 committed by GitHub
commit ff271b0b5f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 0 deletions

View File

@ -116,10 +116,17 @@ class TestCSR(unittest.TestCase):
self.assertEqual((yield dut._storage.fields.foo), 0xa)
self.assertEqual((yield dut._storage.fields.bar), 0x5a)
self.assertEqual((yield dut._storage.storage), 0x5a000a)
self.assertEqual((yield from dut._storage.read()), 0x5a000a)
yield
yield
self.assertEqual((yield dut._status.fields.foo), 0xa)
self.assertEqual((yield dut._status.fields.bar), 0x5a)
try:
self.assertEqual((yield dut._status.status), 0x5a000a)
self.assertEqual((yield from dut._status.read()), 0x5a000a)
except self.failureException as exc:
print("Skipping:" + repr(exc))
raise self.skipTest("skip known failure") from None
class DUT(Module):
def __init__(self):