From d0f0c9465212c0778aaa702485d67d9b07e10bb8 Mon Sep 17 00:00:00 2001 From: Benjamin Herrenschmidt Date: Fri, 22 May 2020 17:57:09 +1000 Subject: [PATCH] phy/model: Don't generate empty mem_*.init files When using the SDRAM PHY model without specified init data, the generator still generates a bunch of $readmemh for each bank reading mem.init, mem_1.init etc... all of which are 0-sized files. This is cumbersome especially when using a standalone model in an external project. This is fixed by having the default bank_init be set to a list of "None" rather than a list of empty lists. Signed-off-by: Benjamin Herrenschmidt --- litedram/phy/model.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/litedram/phy/model.py b/litedram/phy/model.py index 33ca2d8..fae3c96 100644 --- a/litedram/phy/model.py +++ b/litedram/phy/model.py @@ -492,7 +492,7 @@ class SDRAMPHYModel(Module): self.submodules += timing_checker # Bank init data --------------------------------------------------------------------------- - bank_init = [[] for i in range(nbanks)] + bank_init = [None for i in range(nbanks)] if init: bank_init = self.__prepare_bank_init_data(