use Mock class (more convenient)
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Thu, 2 Jul 2020 23:09:47 +0000 (00:09 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Thu, 2 Jul 2020 23:09:47 +0000 (00:09 +0100)
src/soc/config/test/test_loadstore.py

index 1676967ac8253c26152ece0f723626f623fb0157..8d906c708e82cfe26b9f31dabb6b73d378e94009 100644 (file)
@@ -6,10 +6,10 @@ from nmigen.back.pysim import Simulator, Settle
 from soc.config.loadstore import ConfigLoadStoreUnit
 from collections import namedtuple
 from nmigen.cli import rtlil
+from unittest.mock import Mock
+
+TestMemPspec = Mock # might as well use Mock, it does the job
 
-TestMemPspec = namedtuple('TestMemPspec', ['ldst_ifacetype',
-                             'imem_ifacetype',
-                             'addr_wid', 'mask_wid', 'reg_wid'])
 
 def write_to_addr(dut, addr, value):
     yield dut.x_addr_i.eq(addr)