Initially there is one vcd defined called "vcd[0]" (or just "vcd"). You can create an additional vcds with "set hw vcd[0] new id" and configure it with "set hw vcd[id] ..." commands ("id" must be an integer).
The vcd module creates VCD files compatible with industry standards and readable with open source tools such as gtkwave and sigrok/pulseview.
(N.B. sigrok/pulseview only supports VCD files containing events that are 1 bit wide only.)
0> set hw vcd[0] output "name.vcd"
0> set hw vcd[0] add pc_odr 0> set hw vcd[0] add rom[0x500a].3You can set the name of the module if you want (set hw vcd[0] module name), it will be ucsim_vcd_0 by default.
0> info hw vcd[0] vcd[0] value change dump Modul: ucsim_vcd_0 Started: no Paused: no File: name.vcd Mode: output Time scale: auto set on start Start time: 0.000000000000000 s Last event: 0.000000000000000 s Simul time: 0.000000000000000 s Variables: Address Symbol rom[0x0500a][7:0] pc_odr rom[0x0500a].3
0> set hw vcd[0] start
0> set hw vcd[0] pause 0> set hw vcd[0] restart
0> set hw vcd[0] stop
0> var loc1 rom[0x5001]
0> set hw vcd[0] input "name.vcd"
0> set hw vcd[0] start
0> info hw vcd[0] vcd[0] value change dump Modul: ucsim_vcd_0 Started: YES Paused: no File: name.vcd Mode: input Break: disabled Time scale: 1 ns Start time: 0.000000000000000 s Next event: 0.000000000000000 s Simul time: 0.000000000000000 s Variables: Address Symbol rom[0x0500a] pc_odr rom[0x0500a].3
0> set hw vcd[0] pause 0> set hw vcd[0] restart
While the replay is paused any cycles used by the simulator are ignored by vcd and do NOT advance you towards the next event.
0> set hw vcd[0] break
The break flag causes vcd to generate a break each an event is replayed giving you the opportunity to check that your program responds to it correctly.
0> set hw vcd[0] stop