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: 
Highlighted
Newbie nasimz
Newbie
3,397 Views
Registered: ‎09-27-2010

VCD file for a specific period of simulation in Modelsim

Hi all,

 

I am working on an embedded system in which I run an algorithm on a processor.

I want to measure power consumption for the system during the period that my algorithm is running on processor . I mean I don't like to consider the power for the period that Rom initializing algorithm is running at the beginning.

 

I know the exact timing when execution of the algorithm starts and finishes on processor, and I like to extract switching activity for just that period.

 

How can I do this by using Modelsim?

 

best,

Nasim

 

 

Tags (3)
0 Kudos
1 Reply
Xilinx Employee
Xilinx Employee
3,370 Views
Registered: ‎08-16-2007

Re: VCD file for a specific period of simulation in Modelsim

The vcd commands in ModelSim can be used to create and dump the vcd data based on the time that it was created. For example you can run your simulation until you want to start collecting the vcd data by using the run command with the time that you don't care about. At this point the simulation will be stopped, and you can create the vcd using the command line operations in the command window. Use the following commands to gather this data.

 

start your simulation and run to the desired time to start collecting data.

vcd file <file.vcd>

vcd add <signal names>

run 5us

 

This will write out the the information for the signals that you added using the add command as the simulation runs. You will need to specify all of the signals that you want added, or use /uut/my_module/* to add signals at that level. To add recursively a module and below use vcd add -r /uut/my_module/*