• 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. Building string variables from string variables in ADE

Stats

  • Locked Locked
  • Replies 4
  • Subscribers 126
  • Views 7318
  • 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

Building string variables from string variables in ADE

Zol
Zol over 1 year ago

I would like to run simulations with different waveform files for an ipwlf source. The waveform file is given to the component through a design variable, to make it easy to change. The waveform textfiles are in the same directory. I would like to change only the filename, but not the full path, to make my setup more readable and easier to maintain.

Example with SKILL syntax:
str_corner = "nom_27"          ;; or slow_m40, fast_85, etc...
pwl_path=strcat("$PROJECT/load_waveforms/load_current_" str_corner ".csv")

Is there any way to force the evaluation of the the pwl_path variable before/during netlisting?

  • Cancel
Parents
  • Andrew Beckett
    Andrew Beckett over 1 year ago

    If you're using ADE Explorer/Assembler, then you can have the strcat in the design variable or global variable field. I think that does what you want. You could also put $PROJECT/load_waveforms in the include path, and then you only need to build the string with the actual file name part.

    Andrew

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

    The include path is a good point. Thanks, Andrew!

    I am a bit puzzled with strcat in ADE, because in some cases it has worked, but in others it did not, and I am not sure what made the difference...
    Below is a simplified testcase for strcat() where all but the variable "path" is resolved (unresolved variables are bolded). Do you see/know what is the diffrence, i.e. what is needed to resolve a variable win strcat()'s arguments?

    parameters my_strcat="foobar" my_strcat3="/a/b/c/efd/text.txt" \
    my_cellview_name="foo_bar_barrr" pwl_cellview="onceUponATime" \
    my_cellviewname="foooobar" \
    path="$PROJECT/oa/foo/bar/foobar/onceUponATime/text.txt" \
    my_strcat2=strcat(my_strcat "x/x" "apple" "x/x" "pear" ".csv") \
    my_strcat4=strcat("$PROJECT/oa/foo/bar/foobar/" my_cellview_name \
    "/text.txt") path2=strcat("$PROJECT/oa/foo/bar/foobar/" \
    my_cellview_name "/text.txt")

    The corresponding ADE setup: 

     

    PS: note for the future: strcat is resolved after netlisting, i.e. Recreating the netlist without simulation would put the whole strcat() expression, and not just the result into the parameter in the input.scs file.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • ShawnLogan
    ShawnLogan over 1 year ago in reply to Zol

    Dear Zol,

    Zol said:
    I am a bit puzzled with strcat in ADE, because in some cases it has worked, but in others it did not,

    From your description, it is working in that the simulation runs successfully, but you notice that some string parameters shown in the input.scs file are shown as text strings (i.e., without any references to other strings) and other string parameters include a strcat() function with one or more of its arguments a name of a string parameter.

    Zol said:
    Below is a simplified testcase for strcat() where all but the variable "path" is resolved (unresolved variables are bolded). Do you see/know what is the diffrence, i.e. what is needed to resolve a variable win strcat()'s arguments?

    Are your variables  mix of global and local design variables? There may be a difference in how they are passed to the input.scs.

    Shawn

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

    Thanks for the info - I just recreated your design variables (thanks, you were clear that these were design variables, not global variables, although that should work too. Not sure why Shawn asked that as it was clear). I tried using IC6.1.8 ISR33 (IC6.1.8-64b.500.33) and in the simulation netlist, all the strcat were resolved:

    If you do Simulation→Netlist→Recreate then the strcat are not evaluated - the reason being is that this produces a single netlist and your expressions may be dependent upon variables that are swept - so it doesn't attempt to evaluate them when creating the netlist that way - not an issue since that's never used for simulation). Maybe that's what you meant by your PS in the above post.

    Since your netlist has a mix of expanded strcat and unexpanded, my guess is that you're using an older version. There have been various fixes to expression evaluation within the lifetime of IC6.1.8/ICADVM20.1 so I would recommend you use the latest hotfix if you can.

    Note that simulation will succeed if there are some strcat() remaining in the netlist, provided that the parameter which suffers from this is not used. Spectre itself won't evaluate the strcat itself - but any unused parameter (or chain of unused parameters) is ignored.

    Andrew

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

    Thanks for the info - I just recreated your design variables (thanks, you were clear that these were design variables, not global variables, although that should work too. Not sure why Shawn asked that as it was clear). I tried using IC6.1.8 ISR33 (IC6.1.8-64b.500.33) and in the simulation netlist, all the strcat were resolved:

    If you do Simulation→Netlist→Recreate then the strcat are not evaluated - the reason being is that this produces a single netlist and your expressions may be dependent upon variables that are swept - so it doesn't attempt to evaluate them when creating the netlist that way - not an issue since that's never used for simulation). Maybe that's what you meant by your PS in the above post.

    Since your netlist has a mix of expanded strcat and unexpanded, my guess is that you're using an older version. There have been various fixes to expression evaluation within the lifetime of IC6.1.8/ICADVM20.1 so I would recommend you use the latest hotfix if you can.

    Note that simulation will succeed if there are some strcat() remaining in the netlist, provided that the parameter which suffers from this is not used. Spectre itself won't evaluate the strcat itself - but any unused parameter (or chain of unused parameters) is ignored.

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
No Data

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