• 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. Custom IC Design
  3. Verilog-A model and temperature in AC-Sim

Stats

  • Locked Locked
  • Replies 3
  • Subscribers 125
  • Views 18416
  • 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

Verilog-A model and temperature in AC-Sim

HoWei
HoWei over 7 years ago

I have a verilog-a model that is dependent on the simulation temperature, using the "$temperature" variable.

The temperature value changes vs. corner simulations. The simple model gives a voltage in dependence on the temperature.

The following code works:

analog begin

   V(out,vss) <+ $temperature-273.15*V(in,vss); //Input voltage is always 1V

end

This code does always give me 27 degC:

real temp_degC = 27;

analog begin

   temp_degC = $temperature-273.15;

   V(out,vss) <+ temp_degC*V(in,vss); //Input voltage is always 1V

end

Why is that and how can I make the model evaluating the "temp_degC" correctly ?

  • Cancel
Parents
  • HoWei
    HoWei over 7 years ago

    I figured, when I do not initialize the variable, it is evaluatting the variable value at runtime as expected and ist working:

    real temp_degC; //not initialized

    analog begin

       temp_degC = $temperature-273.15;

       V(out,vss) <+ temp_degC*V(in,vss); //Input voltage is always 1V

    end

    Why is that ?

    Is an initialized variable treated like a constant ?

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 7 years ago in reply to HoWei

    This appears to be a bug. I've tried in various versions, and if the variable is initialized and then assigned to an expression including $temperature, it doesn't work. If instead the assignment within the analog block is:

    temp_degC=55.0;

    then it works (so it's not a constant). Also, if you do:

    @(initial_step) temp_degC=$temperature-273.15;

    then it also works. I filed CCR 1887528 for this - it would be a good idea if you report this to customer support yourself and request a duplicate CCR is filed (that way it is clear it's coming from a real customer) - however, I'm hopeful that we'll get this inconsistency fixed anyway.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Andrew Beckett
    Andrew Beckett over 7 years ago in reply to HoWei

    This appears to be a bug. I've tried in various versions, and if the variable is initialized and then assigned to an expression including $temperature, it doesn't work. If instead the assignment within the analog block is:

    temp_degC=55.0;

    then it works (so it's not a constant). Also, if you do:

    @(initial_step) temp_degC=$temperature-273.15;

    then it also works. I filed CCR 1887528 for this - it would be a good idea if you report this to customer support yourself and request a duplicate CCR is filed (that way it is clear it's coming from a real customer) - however, I'm hopeful that we'll get this inconsistency fixed anyway.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
  • HoWei
    HoWei over 7 years ago in reply to Andrew Beckett

    Thanks for confirmation and the Workaround via @(initial_step).

    i submitted a case  #46255884 via customer support Portal.

    • 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