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)
commit8947096eead36592eedc59462b2b1470a0c65032
tree9a1fb7352fb9f637e795aa7b9b25936f980ef696
parent38aa9fb671fd8bbf3be1ec2b1e764fc60196acf8
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