mirror of
https://github.com/enjoy-digital/litex.git
synced 2025-01-04 09:52:26 -05:00
sim: ensure clean IPC shutdown
This commit is contained in:
parent
47c341ecdf
commit
5bf19c155f
2 changed files with 4 additions and 0 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue