The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Apr 20th, 2024, 4:16am
Pages: 1
Send Topic Print
PLI functionality in VerilogA (Read 5774 times)
cupric
Guest




PLI functionality in VerilogA
Apr 10th, 2004, 10:26am
 
Is it possible to run a C executable from inside a VerilogA module and use its results as the output of my VerilogA module.

For example:
Suppose my module's output is the sum of the inputs to the module in1 and in2. Now, can I write a C function and call it from inside VerilogA module which passes the instantaneous input values to produce the desired output.

thanks!
cupric
Back to top
 
 
  IP Logged
Andrew Beckett
Senior Fellow
******
Offline

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

Posts: 1742
Bracknell, UK
Re: PLI functionality in VerilogA
Reply #1 - Apr 12th, 2004, 4:39am
 
In spectre this isn't possible. It may be possible with AMS Designer, but I've never tried it (I've done it with ncsim but
never got around to it with AMS - I'll have to give it a try at
some point!)

Can you not write the algorithm in Verilog-A directly?

Andrew.
Back to top
 
 
View Profile WWW   IP Logged
cupric
Guest




Re: PLI functionality in VerilogA
Reply #2 - Apr 16th, 2004, 10:28am
 
Basically, I need to do some matrix manipulation (solving Ax=B) which in turn, would generate the output of my VerilogA module. Now, if I try implementing this in VerilogA, first, it would be really complicated and huge (and I can't use a standard matrix package) and second, will be really slow due to the interpretive nature of VerilogA.

Hence, I was thinking of using some sort of PLI.

Also, I am a bit confused by what ncsim and AMS designer are and how are they different from spectre. Are they different simulators from Cadence (??) or some other company?

cupric
Back to top
 
 
  IP Logged
Andrew Beckett
Senior Fellow
******
Offline

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

Posts: 1742
Bracknell, UK
Re: PLI functionality in VerilogA
Reply #3 - Apr 17th, 2004, 11:51pm
 
AMS Designer is Cadence's mixed signal simulator. It is a single executable simulator, based around the spectre kernel (for the analog solver) and ncsim (for the digital "solver"). ncsim is Cadence's mixed-language digital simulator (the "nc" means "native code" because it uses a compiler approach).

The simulator supports:

Verilog
VHDL
Verilog-AMS
Verilog-A
VHDL-AMS
spectre/spice subckts and models

ncsim itself supports PLI - and so would AMS Designer. What I've not tried is using PLI in any mixed-signal module, but I have in the past with ncsim written PLI functions which manipulate real numbers, so you could almost certainly do this somehow.

There are lots of advantages in AMS Designer - models can be more efficient by allowing true mixed-signal models with Verilog-AMS (can have both digital and analog content in the same module - the digital is handled via the event driven simulation engine, and the analog content by the matrix-solved analog engine).

If I have a chance, I'll try to have a play with PLI in AMS and report back.

BTW, if you're going to look at this, I'd recommend looking at the "vpi" (PLI 2.0) interface rather than the older PLI 1.0
interface - it's much cleaner.

Regards,

Andrew.
Back to top
 
 
View Profile WWW   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.