When loading gateware onto Glasgow outside of the CLI, as in this example, a top-level clock domain does not get added to the gateware, and therefore the gateware does not get reset when you CTRL+C out of the script. This leads to unexpected behavior if another script is run and the bitstream is not reloaded, because the gateware is not returned to its default state.
In the current implementation, the top-level clock domain is instantiated from the CLI by assembly.add_applet().
A workaround is to force the gateware to be reset by reloading the bitstream: await assembly.start(reload_bitstream=True).
When loading gateware onto Glasgow outside of the CLI, as in this example, a top-level clock domain does not get added to the gateware, and therefore the gateware does not get reset when you CTRL+C out of the script. This leads to unexpected behavior if another script is run and the bitstream is not reloaded, because the gateware is not returned to its default state.
In the current implementation, the top-level clock domain is instantiated from the CLI by
assembly.add_applet().A workaround is to force the gateware to be reset by reloading the bitstream:
await assembly.start(reload_bitstream=True).