back.pysim: simplify.
authorwhitequark <whitequark@whitequark.org>
Sun, 28 Jun 2020 05:04:16 +0000 (05:04 +0000)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 31 Dec 2021 14:12:01 +0000 (14:12 +0000)
commit8d2c1741954d8dece1cb2ead131c2980b74cc4da
tree43d0fb094e241616074f903a5eecf35a9ce5019e
parent7ede853b0e293439b6ad3873c664c875e1f789c5
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