diff --git a/examples/sim/fir.py b/examples/sim/fir.py index 3b4b8d8ab..1415fbfdd 100644 --- a/examples/sim/fir.py +++ b/examples/sim/fir.py @@ -66,6 +66,7 @@ def main(): fragment = autofragment.from_local() sim = Simulator(fragment, Runner()) sim.run(100) + del sim in_signals += tb.inputs out_signals += tb.outputs diff --git a/migen/sim/generic.py b/migen/sim/generic.py index 70ca18039..e027dc9c8 100644 --- a/migen/sim/generic.py +++ b/migen/sim/generic.py @@ -158,6 +158,9 @@ class Simulator: for k, v in value.items(): self.multiwrite(getattr(obj, k), v) + def __del__(self): + del self.ipc + del self.sim_runner # Contrary to multiread/multiwrite, Proxy fetches the necessary signals only and # immediately forwards writes into the simulation.