• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Mixed-Signal Design
  3. Simulating Verilog-A modules, including VPI, with Spect...

Stats

  • Locked Locked
  • Replies 10
  • Subscribers 66
  • Views 19507
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Simulating Verilog-A modules, including VPI, with Spectre

fgarcia
fgarcia over 10 years ago


Hello,

I am trying to instantiate a Verilog-A component which includes a VPI call to a C++ library, but I each time I run Spectre simulator I get the following error:

                  Error found by spectre during AHDL read-in.
                      ERROR (VACOMP-2259): "$hello<<--? ;"


The Verilog-A module (including VPI call) is functional and has been verified using NCVerilog and NCSim.
When trying to simulate in Spectre, this module is included with the following sentence:

                   ahdl_include "altered_non_linear_drift.va"

Which is the proper way to include this kind of elements in a standard Spectre netlist?

Thank you in advance

  • Cancel
  • dime85
    dime85 over 10 years ago
    I am trying to do the same thing (and got the same error). Did you manage to find a solution? Thanks
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 10 years ago
    There is no support for VPI in spectre so you cannot add custom system tasks such as this. Are you really both trying to call a custom system task in Verilog-A? I've not seen anyone attempting to do this before so it seems a little odd that there are two of you within a few days... Regards, Andrew
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • fgarcia
    fgarcia over 10 years ago
    Dear Andrew, the purpose of this action is to develop custom C++ functions to be used in our models.
    I was looking for the Spectre (or the internal AHDL compiler) options equivalent to -sv_lib ./libvpi.so -loadvpi ./libvpi.so:registerHelloSystfs in NC.
    Maybe there exists another way to perform such actions in Spectre: Do you know a way to call user defined C++ functions from, for example, a user defined subcircuit? That would be perfect.

    Thanks in advance
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • fgarcia
    fgarcia over 10 years ago
    Dear Dime, Till know I am unable to simulate this code.
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 10 years ago

    There is documented support in spectre for "Netlist Compiled Functions" - these are functions you can implement in C/C++ and allow to be called from a spectre netlist. I'm not sure these will quite do what you want - they are for complex calculations of netlist or model parameters - but are not for behavioural modelling (so they can't be called with non-constant expressions, such as node voltages or device currents). You can find out about them using `cds_root spectre`/tools/bin/cdnshelp and searching for "Netlist Compiled Functions".

    There is also the C Model Interface (CMI) which is for developing device models. The documentation for this is not provided out of the box - you need to have access to product 32501 (Virtuoso ® Spectre Model Interface Option). I suspect this would be overkill for your needs - it's really about integrating detailed device models into spectre.

    Apart from that, there's no foreign model interface in spectre.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • fgarcia
    fgarcia over 10 years ago
    That's exactly what I have been looking for. I would search about it. Thanks!
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • dime85
    dime85 over 10 years ago

    Dear Andrew, 

    Thanks for the reply. In my case, I might need to work with the C Model Interface as I am working on device modeling. Could you please provide me with more details on how to access the CMI documentation? 

    Best,

    Marco

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 10 years ago

    Marco,

    You need to have the license I mentioned earlier, and then run "cmiExtract" to extract the documentation.
    I would suggest contact customer support for more details - you should consider very carefully (and with some advice from us) as to whether CMI is the right way forward on this.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • fgarcia
    fgarcia over 10 years ago
    Dear Andrew, I have followed your advice and studied the possible solutions. cmiExtract also provides a series of xml interfaces to be used when developing compat models using adms. However, these files are related to adms v2.7. Are the updated ones available? Thanks in advance, Fernando
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • RahulDutta
    RahulDutta over 10 years ago
    Hi Andrew. Can C-Model work together with Monte-Carlo variation parameters in “statistics” section of the model file ?
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information