back.pysim: simplify.
authorwhitequark <whitequark@whitequark.org>
Sun, 28 Jun 2020 05:04:16 +0000 (05:04 +0000)
committerwhitequark <whitequark@whitequark.org>
Sun, 28 Jun 2020 05:04:16 +0000 (05:04 +0000)
commit2606ee33ad548bed1b9294bbca3962e834d12fd0
treeba490243a3d4f7096b803f251cdce0f24ee8d0aa
parent303ea18cb60567e45a755c6b6289a601f27d46e6
back.pysim: simplify.

Remove _EvalContext, which was a level of indirection serving almost
no purpose. (The only case where it would be useful is repeatedly
resetting a simulation that, each time it is reset, would create new
signals to communicate with between coroutine processes. In that case
the signal states would not be persisted in _SimulatorState, but
would be removed with the _EvalContext that is recreated each time
the simulation is reset. But this could be solved with a weak map
instead.)

This regresses simulator startup time by 10-15% for unknown reasons
but is necessary to align pysim and future cxxsim.
nmigen/back/pysim.py