[Libre-soc-dev] mmu unit test

Richard Wilbur richard.wilbur at gmail.com
Sat Feb 20 13:04:25 GMT 2021



> On Feb 20, 2021, at 05:21, Luke Kenneth Casson Leighton <lkcl at lkcl.net> wrote:
> 
> […]
> instead i did this, which seems to be all the modifications needed.
> with that defaulting to None, there's "zero impact" on the other unit
> tests, so it's all good.
> 
[…]
> --- a/src/soc/simple/test/test_runner.py
> +++ b/src/soc/simple/test/test_runner.py
> @@ -119,10 +119,11 @@ def get_dmi(dmi, addr):
> 
> 
> class TestRunner(FHDLTestCase):
> -    def __init__(self, tst_data, microwatt_mmu=False):
> +    def __init__(self, tst_data, microwatt_mmu=False, rom=None):
>         super().__init__("run_all")
>         self.test_data = tst_data
>         self.microwatt_mmu = microwatt_mmu
> +        self.rom = None
Why wouldn’t we do:

> +        self.rom = rom


since you added the default argument of None we don’t need to explicitly always initialize the member rom to None.  That will make it a useless constructor parameter, right?

Richard


More information about the Libre-soc-dev mailing list