The Designer's Guide Community Forum
https://designers-guide.org/forum/YaBB.pl
Design Languages >> Verilog-AMS >> VPI
https://designers-guide.org/forum/YaBB.pl?num=1152460746

Message started by rajdeep on Jul 9th, 2006, 8:59am

Title: VPI
Post by rajdeep on Jul 9th, 2006, 8:59am

Hello everybody,

Can i call a C/C++ program while simulating a verilog-AMS model in cadence tool using ncsim?
The idea is to pass some of the signal values, obtained from simulation to an external C program.
The passng should be on the fly, i.e. the signal values should be continuously passed to the external program.

Rajdeep

Title: Re: VPI
Post by A_Programmer on Jul 9th, 2006, 11:23pm

What is the advantage of doing this? Gain in simulation speed?

Title: Re: VPI
Post by rajdeep on Jul 10th, 2006, 2:46am

No, i've to do some calculations with the simulated signal values.. This  cannot be done online using ncsim. So, i need to take this data out and feed it to an  external program!!
But i.m still not sure, whether it is possible or not?

Title: Re: VPI
Post by rajdeep on Jul 16th, 2006, 7:55am

Hi all,

it will be nice to get an answer yes or no to this problem. This will help me greatly.

Thanks,
Rajdeep

Title: Re: VPI
Post by Geoffrey_Coram on Jul 17th, 2006, 4:44am

I guess no one on this forum has tried that.  Have you looked in the documentation or contacted your AE?

I wouldn't have said that ncsim can do Verilog-AMS; I thought Cadence's AMS product was AMS Designer.  I've personally never used VPI.

Title: Re: VPI
Post by rajdeep on Jul 18th, 2006, 12:58am

Thnaks a lot for the reply.  It need not to be ncsim. I want a cadence verilog-AMS simulator to have this feature VPI. According to the manual it has this feature, but with this can I call an external program written in C/C++ ??

Title: Re: VPI
Post by Andrew Beckett on Jul 24th, 2006, 2:09pm

AMS Designer is run using ncsim (with some special options). And yes it does support VPI. And yes you could interface to a C/C++ program. Or you could use SystemC?

Andrew.

Title: Re: VPI
Post by rajdeep on Jul 25th, 2006, 3:10am

Thank you very much!! I was going through the VPI chapters of the Verilog-AMS LRM. It isn't very easy to go through in one go...but thanx again for the reply

Title: Re: VPI
Post by rajdeep on Jul 25th, 2006, 3:25am

Can anybody help me to find a tutorial sort of thing on VPI?
Or, may be a pice of code/command liens that shows how to call an external C program!!

Thanks!

Title: Re: VPI
Post by Andrew Beckett on Jul 26th, 2006, 1:53pm

Raideep,

I don't have any VPI code for AMS handy, but I do have a very simple example that I wrote 8 years ago (an inverter) modeled in C - just to show the principle.

Because the code was a little too long to paste here directly, I converted it to pdf, and am attaching that.

Regards,

Andrew.

Title: Re: VPI
Post by rajdeep on Jul 27th, 2006, 2:46pm

Thanks a lot Andrew!! The code looks very complicated with lots of inbuilt functions and datatypes. But this surely will give me a working example, and help me to understand how the different functions are used to make the callbacks.

I'll probably ask more and better questions once I understand this VPI stuff a little better.

Thanks a again. You have been a life saviour  :D

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