back.pysim: accept write_vcd(vcd_file=None).
authorwhitequark <whitequark@whitequark.org>
Wed, 12 Feb 2020 14:42:06 +0000 (14:42 +0000)
committerwhitequark <whitequark@whitequark.org>
Wed, 12 Feb 2020 14:42:06 +0000 (14:42 +0000)
commit2860f3accb712a5d01d0a91a868d95b1fb89ae36
tree9a1fb7352fb9f637e795aa7b9b25936f980ef696
parent11abcc9cf24cb2ebe06f548e411b595f98f5651c
back.pysim: accept write_vcd(vcd_file=None).

Because write_vcd() is a context manager, this is useful if the VCD
file should be sometimes not written, since it avoids awkward
conditionals with duplicated code. It's not very elegant though.

Fixes #319.
nmigen/back/pysim.py