projects
/
nmigen.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2860f3a
)
cli: update use of deprecated code.
author
whitequark
<whitequark@whitequark.org>
Wed, 12 Feb 2020 14:42:24 +0000
(14:42 +0000)
committer
whitequark
<whitequark@whitequark.org>
Wed, 12 Feb 2020 14:42:24 +0000
(14:42 +0000)
nmigen/cli.py
patch
|
blob
|
history
diff --git
a/nmigen/cli.py
b/nmigen/cli.py
index 3914182ea5766b797489262af4ab45c9d81f39f3..e6757a07fd5d708f6a803bcc5a4c035ab9cab13b 100644
(file)
--- a/
nmigen/cli.py
+++ b/
nmigen/cli.py
@@
-63,11
+63,9
@@
def main_runner(parser, args, design, platform=None, name="top", ports=()):
if args.action == "simulate":
fragment = Fragment.get(design, platform)
- with pysim.Simulator(fragment,
- vcd_file=args.vcd_file,
- gtkw_file=args.gtkw_file,
- traces=ports) as sim:
- sim.add_clock(args.sync_period)
+ sim = pysim.Simulator(fragment)
+ sim.add_clock(args.sync_period)
+ with sim.write_vcd(vcd_file=args.vcd_file, gtkw_file=args.gtkw_file, traces=ports):
sim.run_until(args.sync_period * args.sync_clocks, run_passive=True)