class FSMDivCorePrevControl(PrevControl): def __init__(self, pspec): super().__init__() self.pspec = pspec self.data_i = CoreInputData(pspec) these need to go. and remove # override p and n self.p = FSMDivCorePrevControl(pspec) self.n = FSMDivCoreNextControl(pspec) replaced with: self.p.pspec = pspec self.p.data_i = CoreInputData(pspec) the reason is because the destruction of the ControlBase p and n "leaks" both memory and also interferes with nmigen's "module tracking" system.
Fixed in https://git.libre-soc.org/?p=soc.git;a=commit;h=784c8b4561453cfeb585b24a16400223147902cd
(In reply to Jacob Lifshay from comment #1) > Fixed in > https://git.libre-soc.org/?p=soc.git;a=commit; > h=784c8b4561453cfeb585b24a16400223147902cd star. i also removed the FSMDivPrev/NextControl classes commit 0674e08124af60bc351bf383c9cd44d617d690b9 (HEAD -> master) Author: Luke Kenneth Casson Leighton <lkcl@lkcl.net> Date: Fri Sep 18 14:11:24 2020 +0100 can remove unneeded overrides of Prev/Next Control