Next: , Previous: Simulation procedures, Up: Procedures and variables


2.4.4 Dumping procedures

During simulation, you may wish to capture state of various nets and flops for later review. You can use the dumpvars procedure to have THUD produce a file in industry standard VCD (value change dump) format. The filename is by default thud.dump, but you can change that with the set-dump-file! procedure.

— Procedure: set-dump-file! file

Sets the output file used for dumping to file. You can use this procedure multiple times, but the last time is what counts.

— Procedure: dumpvars
— Procedure: dumpvars var1 var2 ...
— Procedure: dumpvars (var1 var2 ...)

The first form dumps out all nets and flops in the workspace. The second and third forms are equivalent, arranging for var1, var2, ... to be dumped out.

Dumping slows simulation due to both runtime checks as well as the resulting I/O. In the future, there will be a more fine-grained approach available that allows dumping to be turned off (and on) at arbitrary times.