Bug 492 - losing Elaboratables in div fsm.py
Summary: losing Elaboratables in div fsm.py
Alias: None
Product: Libre-SOC's first SoC
Classification: Unclassified
Component: Source Code (show other bugs)
Version: unspecified
Hardware: PC Linux
: High enhancement
Assignee: Jacob Lifshay
Depends on:
Blocks: 383
  Show dependency treegraph
Reported: 2020-09-15 11:23 BST by Luke Kenneth Casson Leighton
Modified: 2020-09-18 14:12 BST (History)
1 user (show)

See Also:
NLnet milestone: ---
total budget (EUR) for completion of task and all subtasks: 0
budget (EUR) for this task, excluding subtasks' budget: 0
parent task for budget allocation:
child tasks for budget allocation:
The table of payments (in EUR) for this task; TOML format:


Note You need to log in before you can comment on or make changes to this bug.
Description Luke Kenneth Casson Leighton 2020-09-15 11:23:18 BST
class FSMDivCorePrevControl(PrevControl):
    def __init__(self, pspec):
        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"
Comment 2 Luke Kenneth Casson Leighton 2020-09-18 14:12:01 BST
(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