UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Visitor b_vall
Visitor
125 Views
Registered: ‎07-08-2019

Issue Creating .vcd File

Jump to solution

The Problem:

I need to generate .vcd files from Vivado for simulation verification.  When I try to do this (detailed below), the .vcd file is incomplete/incorrect.  I need to automate this process (Jenkins Server) and I do not want to have to add additonal code to the testbench for each project so $dumpvars/fileIO will not work.  I need to do this with Vivado commands / Tcl scripts.

What I Have Tried:

I have created a VERY simple Vivado project which I have attached for testing purposes. In order to generate the .vcd files, I use the following commands in the Vivado Tcl Console:

    open_vcd xsim_dump.vcd
    log_vcd /testbench/*
    run 150 ns
    close_vcd

I have also tried replacing log_vcd /testbench/* with log_vcd [get_object /testbench/*] and running the simulation for longer, both give similar results.

Running these commands generates the .vcd file which (I have attached with .txt because the otherwise the website won't let me attach it).  This .vcd file is incomplete/incorrect, I will explain why below.

How I know the .vcd file is incomplete/incorrect:

Below I have included a screenshot of the Vivado simulation of my test project.  This simulation shows the desired behavior.  When I use the above commands to generate a .vcd file, it does not reflect this behavior.  To show that the generated .vcd file does not reflect the behavior of the Vivado simulation, below I have included a screenshot showing the contents of the .vcd file in Questa Sim.  In order to open the .vcd in Questa Sim, I first needed to convert it to a .wlf file (which I have attached) by using the following command in the Questa Sim Console:

    vcd2wlf <path to xsim_dump.vcd> "xsim_dump.wlf"

I do not believe that the issue is with the .wlf conversion, because when I inspect the .vcd file, it seems that it is accurately shown in Questa.  For example, in the original Vivado simulation, testbench_trigger is set to 1 at 50 ns, this does not happen in the .vcd file (and so it is not shown in Questa). 

Original (and correct) Vivado Simulation:

correct_vivado_sim.PNG

Contents of generated .vcd file shown in Questa Sim (after converting .vcd to .wlf)

questa_wlf.PNG

Contents of generated .vcd file shown in Questa Sim (after converting .vcd to .wlf) zoomed in:

questa_wlf_zoomed_in.PNG

Additional Mystery:

o_program_response_wire becomes a dotted line once the clock starts when shown in Questa above.  In the .vcd file, o_program_response is repeatedly set to 0 instead of just being set to 0 once.

Thank you for taking the time to read this long question.  Any and all help is GREATLY appreciated.

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Visitor b_vall
Visitor
74 Views
Registered: ‎07-08-2019

Re: Issue Creating .vcd File

Jump to solution

I got it to work, it turns out that all I needed to do was restart the sim before opening the vcd.  Just to be clear for anyone else who has this problem, the sequence of commands that made it work for me are:

launch_simulation
restart
open_vcd $vcd_path
log_vcd /testbench/*
run 150 ns
flush_vcd
close_vcd

When I finally got it to work, I was using Vivado2019.1 on Windows 10, I have not tested it yet but I suspect that this should still work fine on Vivado 2018.2 if not others.

Accept as solution

2 Replies
Moderator
Moderator
97 Views
Registered: ‎04-24-2013

Re: Issue Creating .vcd File

Jump to solution

Hi @b_vall ,

Thank you for the supplied project, it always makes replicating the issue much easier.

I tried the steps that you provided using Vivado 2019.1 and QuestaSIm 10.7c which is the recommended version for that version of the tools.

Below is the output from the wlf file in QuestaSim

Capture.PNG

The only difference in the commands that I used was to use flush_vcd prior to close_vcd

I don't believe that I am seeing the same issue that you reported, I have attached the vcd file and the converted wlf file.

Best Regards
Aidan

 

------------------------------------------------------------------------------------------------------------------
Please mark the Answer as "Accept as solution" if this answered your question
Give Kudos to a post which you think is helpful and may help other users
------------------------------------------------------------------------------------------------------------------
Highlighted
Visitor b_vall
Visitor
75 Views
Registered: ‎07-08-2019

Re: Issue Creating .vcd File

Jump to solution

I got it to work, it turns out that all I needed to do was restart the sim before opening the vcd.  Just to be clear for anyone else who has this problem, the sequence of commands that made it work for me are:

launch_simulation
restart
open_vcd $vcd_path
log_vcd /testbench/*
run 150 ns
flush_vcd
close_vcd

When I finally got it to work, I was using Vivado2019.1 on Windows 10, I have not tested it yet but I suspect that this should still work fine on Vivado 2018.2 if not others.

Accept as solution