The Designer's Guide Community Forum
https://designers-guide.org/forum/YaBB.pl
Design Languages >> Verilog-AMS >> Obtaining dynamic CPU time during Verilog execution
https://designers-guide.org/forum/YaBB.pl?num=1250897244

Message started by cmolsen on Aug 21st, 2009, 4:27pm

Title: Obtaining dynamic CPU time during Verilog execution
Post by cmolsen on Aug 21st, 2009, 4:27pm

I would like to obtain CPU time at any given point within Verilog code or at least on every entry/iteration of the VA code or on every converged iteration.  The purpose of this is to debug runtime.

To what extent is this possible?

I can't find any Verilog functions that do this. So I'm guessing I may have to use the VPI to interface in a C program which accesses time and then passes it to the Verilog module.  

Assuming I have to go the VPI route, I have looked into this as follows:

In the Accellera Verilog manual there's a VPI example which does something like what I want to do, namely the report_cpu() function.  

As a start I've tried implementing some very simple VPI function in C which only requires including vpi_user.h for say printing "vpi_printf("hello");".  But VPI include files are nowhere to be found in my company's Spectre or Hspice install environments.

Is VPI supposed to be bundled with a Spectre or Hspice install?  Does it need to be activated?  Or is this a separate install and if so, from where?

Michael

Title: Re: Obtaining dynamic CPU time during Verilog execution
Post by Peruzzi on Aug 22nd, 2009, 10:00am

Quick and dirty approach would be through waveform display.  Show evaluation points as well as smoothed waveform.  This may be enough for you to debug your situation.

Bob P.

Title: Re: Obtaining dynamic CPU time during Verilog execution
Post by Sumit Adhikari on Aug 22nd, 2009, 8:19pm

It should come with your basic installation and you dont need to do
anything else. Just go to installation directory and type this command :
find . -name "vpi*.h"
I think you will be able to find the include path.
If not report your tool vendor.
BR,
Sumit

Title: Re: Obtaining dynamic CPU time during Verilog execution
Post by Andrew Beckett on Aug 25th, 2009, 7:34am

You can't use VPI with spectre, only with AMS Designer (ncsim).

You can also use $debug() to output statements on every iteration, although I don't think you can output CPU time information.

Regards,

Andrew.

The Designer's Guide Community Forum » Powered by YaBB 2.2.2!
YaBB © 2000-2008. All Rights Reserved.