• 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. RF Design
  3. VCO verilog-A model not running pss

Stats

  • Locked Locked
  • Replies 8
  • Subscribers 64
  • Views 17578
  • 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

VCO verilog-A model not running pss

Clara Dong
Clara Dong over 4 years ago

Dear all,

I am running a pss of a simple VCO verilog-A model, but there is an error found and pss is failed:

Warning from spectre.
WARNING (SPECTRE-16707): Only tran supports psfxl format, result of other analyses will be in psfbin format.
Error found by spectre during periodic steady state analysis `pss'.
ERROR (SPCRTRF-15177): HB analysis doesn't support behavioral module components with hidden states found in component 'vco_8G_pss'. Skipped.



Error message from ahdl:
/home/SSS/vco_8G_pss/veriloga/veriloga.va, at line 33: idtmod not support in hb analysis.
/home/SSS/vco_8G_pss/veriloga/veriloga.va, at line 34: idtmod not support in hb analysis.

Rewrite the module and rerun.

Analysis `pss' was terminated prematurely due to an error.
modelParameter: writing model parameter values to rawfile.

And here is the code I used in VCO verilog-A model:

`include "discipline.h"
`include "constants.h"
`include "constants.vams"
`include "disciplines.vams"


(* instrument_module *)
module vco_8G_pss(vin, voutP, voutN);
input vin; voltage vin; // input terminal
output voutP, voutN; voltage voutP, voutN; // output terminal
parameter real vmin=0; // input voltage that corresponds to minimum output frequency
parameter real vmax=2 from (vmin:inf); // input voltage that corresponds to maximum output frequency
parameter real vc=1/2*(vmax+vmin) from (vmin:inf); // maximum output frequency
parameter real fmin=7.372e9 from (0:inf); // minimum output frequency
parameter real fmax=8.628e9 from (fmin:inf); // maximum output frequency
parameter real fc=1/2*(fmax+fmin) from (fmin:inf); // maximum output frequency
parameter real va=1; // amplitude
parameter real kvco=100M;
real freq, phaseP, phaseN;
integer n;

analog begin

// compute the freq from the input voltage
// freq = (V(vin)-vc)*(fmax - fmin) / (vmax - vmin) + fc;
freq = kvco*(V(vin)-vc) + fc;

// bound the frequency (this is optional)
if (freq > fmax) freq = fmax;
if (freq < fmin) freq = fmin;

// phase is the integral of the freq modulo 2 pi
phaseP = 2*`M_PI*idtmod(freq, 0.0, 1.0, -0.5);
phaseN = `M_PI+2*`M_PI*idtmod(freq, 0.0, 1.0, -0.5);

V(voutP) <+ va*(1+sin(phaseP));
V(voutN) <+ va*(1+sin(phaseN));
// bound the time step to assure no cycles are skipped
$bound_step(0.2/freq);
end
endmodule

Is there any approach to run pss in VCO verilog-A model?

Looking forward any responses.

Thanks all.

  • Cancel
  • Frank Wiedmann
    Frank Wiedmann over 4 years ago

    Well, the error message suggests that you need to write a model that does not use the idtmod function. You can find some more information about hidden states and the problems caused by them in https://designers-guide.org/analysis/hidden-state.pdf.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 4 years ago in reply to Frank Wiedmann

    In more recent versions of spectre (from mid-SPECTRE18.1 hot fixes onwards), the message more clearly distinguishes between hidden state problems and issues related to harmonic balance specifically:

    ERROR (SPCRTRF-15492): Cannot run the simulation because HB analysis
    doesn't support Verilog-A Functions (absdelay, last_crossing,
    zi_filter, idt_mod or absdelta) found in component 'vco_8G_pss'.

    Note that adding the instrumentation_module attribute to a model merely to try to hide hidden state issues is risky, because you may end up with a model that gives invalid results. This is a similar but not hidden-state related issue - there are some particular challenges with simulating certain behavioural functions in harmonic balance, and rather than silently ignoring them as happened in the past.

    Note that this model will run in shooting PSS (even with removing the incorrect instrumentation_module attribute). It's just harmonic balance that is a problem - supporting the functions listed in the improved error message above (albeit with the idt_mod typo) is challenging with harmonic balance because they very much have a time-domain formulation. 

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Clara Dong
    Clara Dong over 4 years ago in reply to Frank Wiedmann

    Thank you!

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Clara Dong
    Clara Dong over 4 years ago in reply to Andrew Beckett

    Hi Andrew,

    Thank you for your reply :)

    But when I use shooting PSS, there is another error enounted:

    Encountered a critical error during simulation. Submit a Service Request via Cadence Online Support, including the netlist, the Spectre log file, the behavioral model files, and any other information that can help identify the problem.
    FATAL (CMI-2010): Assertion failed in file `devices.cc' at line 7140.
    FATAL (SPECTRE-21): Assertion failed.

    I have no idea about this... And could you tell me what is instrumentation_module? I just find the original code online and add few lines to fit my design, I'm not sure where is incorrect.

    Have a good day,

    Clara.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 4 years ago in reply to Clara Dong

    Hi Clara,

    Which spectre sub-version are you using? This will appear in the spectre.out log file near the top...

    Thanks,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Clara Dong
    Clara Dong over 4 years ago in reply to Andrew Beckett

    Hi Andrew,

    Yes I found it on the top, and here it is: Version 15.1.0.284.isr1 64bit .

    Thanks for your response,

    Clara.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 4 years ago in reply to Clara Dong

    Hi Clara,

    OK, the first thing you should do is run in something far more recent. It's highly likely that this was a bug fixed some time ago.

    As a wild guess (to try even before that), on the PSS form (I'm assuming you're running in oscillator mode) can you turn off the "Calculate initial conditions (ic) automatically"? It might also be called something like use linosc ic or similar (depends on the IC version). In essence, I'm trying to ensure that you don't end up with oscic=lin on the pss analysis line in the netlist. This wild guess is based on a bug fix around the same era which was related to an assertion failure in the same file, although the line number was different but that can be very dependent upon the precise sub-version.

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Clara Dong
    Clara Dong over 4 years ago in reply to Andrew Beckett

    Hi Andrew,

    WOW! It works! That's amazing!

    Thank you a lot for your timely help:)

    Clara

    • 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