• 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. Difference in ADE variable expression evaluation with and...

Stats

  • Locked Locked
  • Replies 4
  • Subscribers 125
  • Views 6093
  • 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

Difference in ADE variable expression evaluation with and without a parametric sweep

ItsMichael
ItsMichael over 1 year ago

Hello everyone,

I'm using an "if else" statement inside the (local design) variable value in ADE Assembler. The expression is used to assign a string value to a corresponding integer value.

The variable is defined as: 

CG_MODE = if(CG_MODE_s=="LCG" then LCG else if(CG_MODE_s=="HCG" then HCG else if(CG_MODE_s=="HDR" then HDR else 0)))

And CG_MODE_s can get string values such as "LCG", "HCG", "HDR".
The variables HCG, LCG and HDR are simple integers that are used inside the testbench.

This is basically a wrapper to use strings which are much easier to read and understand when sweeping these values.

The issue I have is if I'm running a single point simulation (i.e. - no parameter sweeps) the generated netlist contains the if statement inside the parameter (which I guess is not a legal netlist statement):

parameters {some parameters omitted} CG_MODE_s="LCG" HCG=1111 HDR=2222 \
LCG=3333  \ CG_MODE=if(CG_MODE_s=="LCG" then LCG else if(CG_MODE_s=="HCG" then HCG \
else if(CG_MODE_s=="HDR" then HDR else 0)))

But if I sweep any parameter in the simulations (not corners though) than the netlist contains the already evaluated value returned from the if statement (which works as expected):

parameters {some parameters omitted} CG_MODE_s="LCG" HCG=1111 HDR=2222 \
LCG=3333  \ CG_MODE=3333

Clearly the variable if statement is evaluated or parsed/translated differently into the netlist if I'm running a parametric sweep or not. Why does that happen ?
Is there any workaround for this ? or a better way to implement this parameter "alias" that I wanted ?

Currently I use a workaround which involves always sweep some variable and canceling those run points in the run preview window, but this is not an ideal solution.

Thanks in advance,
Michael Shekhtman
  • Cancel
  • Andrew Beckett
    Andrew Beckett over 1 year ago

    Michael,

    Which IC sub-version are you using, and are you using LSCS or ICRP in your job policy? I recall some fixes related to this, but I want to narrow down my starting point for checking behaviour to what you're actually using.

    Thanks,

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • ItsMichael
    ItsMichael over 1 year ago in reply to Andrew Beckett

    Hi Andrew, thanks for the quick response.
    The version I'm using is IC6.1.8-64b.500.19.EHF10176

    I originally ran this in LSCS mode but the same issue occurs in ICRP mode.
    I noticed the job log in ICRP mode shows the error message:
    \o ERROR (SFE-874):
    \o "input.scs" 16: Cannot run the simulation because syntax
    \o error `Unexpected quoted string ""LCG"' was encountered at
    \o line 16, column 2
    \o 6. Correct the syntax error and rerun the
    \o simulation.
    \o ERROR (SFE-683): "input.scs" 16: Badly formed
    \o parameters statement.
    \o

    Line 16 in the netlist contains the faulty parameter with the if expression instead of the evaluated expression value.

    BR,
    Michael

    • Cancel
    • Vote Up +1 Vote Down
    • Cancel
  • ItsMichael
    ItsMichael over 1 year ago in reply to ItsMichael

    Any thoughts ?
    Btw, I just noticed that running the test in a Run Plan creates a correct netlist even without sweeping any variable.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 1 year ago in reply to ItsMichael

    Sorry - got a bit tied up at the time and overlooked this. I'll try to find some time tomorrow to check this.

    Andrew

    • Cancel
    • Vote Up +1 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