The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
May 7th, 2024, 2:35am
Pages: 1
Send Topic Print
VPI (Read 7575 times)
rajdeep
Senior Member
****
Offline



Posts: 220
UK
VPI
Jul 09th, 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
Back to top
 
 

Design is fun, verification is a requirement.
View Profile   IP Logged
A_Programmer
Junior Member
**
Offline



Posts: 13

Re: VPI
Reply #1 - Jul 9th, 2006, 11:23pm
 
What is the advantage of doing this? Gain in simulation speed?
Back to top
 
 
View Profile   IP Logged
rajdeep
Senior Member
****
Offline



Posts: 220
UK
Re: VPI
Reply #2 - 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?
Back to top
 
 

Design is fun, verification is a requirement.
View Profile   IP Logged
rajdeep
Senior Member
****
Offline



Posts: 220
UK
Re: VPI
Reply #3 - 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
Back to top
 
 

Design is fun, verification is a requirement.
View Profile   IP Logged
Geoffrey_Coram
Senior Fellow
******
Offline



Posts: 1998
Massachusetts, USA
Re: VPI
Reply #4 - 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.
Back to top
 
 

If at first you do succeed, STOP, raise your standards, and stop wasting your time.
View Profile WWW   IP Logged
rajdeep
Senior Member
****
Offline



Posts: 220
UK
Re: VPI
Reply #5 - 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++ ??
Back to top
 
 

Design is fun, verification is a requirement.
View Profile   IP Logged
Andrew Beckett
Senior Fellow
******
Offline

Life, don't talk to
me about Life...

Posts: 1742
Bracknell, UK
Re: VPI
Reply #6 - 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.
Back to top
 
 
View Profile WWW   IP Logged
rajdeep
Senior Member
****
Offline



Posts: 220
UK
Re: VPI
Reply #7 - 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
Back to top
 
 

Design is fun, verification is a requirement.
View Profile   IP Logged
rajdeep
Senior Member
****
Offline



Posts: 220
UK
Re: VPI
Reply #8 - 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!
Back to top
 
 

Design is fun, verification is a requirement.
View Profile   IP Logged
Andrew Beckett
Senior Fellow
******
Offline

Life, don't talk to
me about Life...

Posts: 1742
Bracknell, UK
Re: VPI
Reply #9 - 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.
Back to top
 
View Profile WWW   IP Logged
rajdeep
Senior Member
****
Offline



Posts: 220
UK
Re: VPI
Reply #10 - 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
Back to top
 
 

Design is fun, verification is a requirement.
View Profile   IP Logged
Pages: 1
Send Topic Print
Copyright 2002-2024 Designer’s Guide Consulting, Inc. Designer’s Guide® is a registered trademark of Designer’s Guide Consulting, Inc. All rights reserved. Send comments or questions to editor@designers-guide.org. Consider submitting a paper or model.