1 / 8

TOPIC : VCD and Random generation example

TOPIC : VCD and Random generation example. Module 4.1 Memory modeling in Verilog. Value Change Dump File. A value change dump (VCD) is an ASCII file that contains information about simulation time, scope and signal definitions, and signal value changes in the simulation run.

Download Presentation

TOPIC : VCD and Random generation example

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. TOPIC : VCD and Random generation example Module 4.1 Memory modeling in Verilog

  2. Value Change Dump File • A value change dump (VCD) is an ASCII file that contains information about simulation time, scope and signal definitions, and signal value changes in the simulation run. • All signals or a selected set of signals in a design can be written to a VCD file during simulation. • Post processing tools can take the VCD file as input and visually display hierarchical information, signal values and signal waveforms. • For simulation of large designs, designers dump selected signals to a VCD file and use a postprocessing tool to debug, analyze, and verify the simulation output.

  3. Use of VCD file in debug

  4. VCD file system tasks • $dumpvars - Signals to dump • $dumpfile - Name of VCD file • $dumpon – starting the dump process • $dumpoff – stopping the dump proccess • $dumpall – generating checkpoints

  5. VCD file system tasks • Intial • $dumpfile(“myfile.dmp”); • //Simulation info dumped to myfile.dmp • Initial • $dumpvars; //no arguments, dump all signals in the deisgn • Initial • $dumpvars(1, top); //dump variables in module instance top • Initial • $dumpvars(2,top.m1);//dump up to 2 levels of hierarchy below top.m1

  6. VCD system tasks Initial Begin $dumpon; //start the dump process #10000 $dumpoff; //stop the dump process after 100,000 time units. End Initial $dumpall; //Create a checkpoint. Dump current value of all VCD variables.

  7. Random number generation • Random generation capabilities are required for generating a random set of test vectors. Random testing is important because it often catches hidden bugs in the design. Random vector generation is also used in performance analysis of chip architectures. The system task $random is used for generating a random number. • Usage : $random; or $random(<seed>); The value of <seed> is optional and is used to ensure the same random number sequence each time the test is run, The task $random returns a 32-bit random number.

  8. Random number example

More Related