make(generate) a vcd file using python or c or cpp

523 views Asked by At

Question: Create a vcd file that shows a square wave with a constant frequency.

Any link you provide will be useful, because I searched a lot but I did not find anything and unfortunately I have no background.

We arent allow to code in verilog or system verilog. We should code in python or cpp or c, and create a vcd file , then open it in a wave program to show square wave with a constant frequency.

editor which opens vcd file:

enter image description here

1

There are 1 answers

0
Fatma Zarin On

With VHDL, you can use Modalism to generate a VCD dump file. (All the commands in bold are to be typed into the command window).

To create a .vcd file:

  1. Compile and load design successfully in transcript window
  1. Specify VCD filename
  • Syntax: vcd file <file_name>.vcd
  1. Enable VCD to dump signals under a desired instance
  • Syntax: vcd add <path_to_instance>/*

Note: This command does not dump signals of children instances

Enable VCD for encrypted instances will generate warnings

  1. Run simulation generate VCD database
  1. Quit simulation
  • Syntax: quit sim

If you have Xilinx ISE, you can use the following method to generate a VCD file. (These commands can by typed in at the command prompt in the lower half of the Xilinx ISE window).

vcd dumpfile results.vcd
vcd dumpvars -m /
vcd dumpon
run 1000 ns
vcd dumpoff
vcd dumpflush