• 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 SKILL
  3. Ocean - variable as an input argument of 'axlAddOutputs...

Stats

  • Locked Locked
  • Replies 3
  • Subscribers 143
  • Views 2176
  • 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

Ocean - variable as an input argument of 'axlAddOutputs'

AsafElazari
AsafElazari over 4 years ago

Hi All, 

When i try running the two following lines (in my Ocean script):

current_names = list("iref", "vref")

axlAddOutputs(current_names)

i'd get the following error:

*Error* car: argument #1 should be a list (type template = "l") - current_names

Whereas the following line would run with no errors whatsoever:

axlAddOutputs(list("iref", "vref"))

I would like to create the list separately (and only once) in order to use it in different parts of my script.

Does anyone have an idea on how to make those first two lines run? Or maybe another way to approach this that i haven't come up with?

Thanks, 

Asaf 


  • Cancel
Parents
  • Andrew Beckett
    Andrew Beckett over 4 years ago

    Hi Asaf,

    There's an old request for this - CCR 1074271. It's essentially because the OCEAN script is parsed (statically - i.e. without evaluating the code within it) to identify any outputs. So it has to be a literal list passed in for that reason. I don't think it's vital to add the axlAddOutputs line anyway - if you just have axlOutputResult() lines, then these too are parsed to find the outputs the script produces (these too must use literal names if you want that to work).

    Andrew.

    • Cancel
    • Vote Up +1 Vote Down
    • Cancel
Reply
  • Andrew Beckett
    Andrew Beckett over 4 years ago

    Hi Asaf,

    There's an old request for this - CCR 1074271. It's essentially because the OCEAN script is parsed (statically - i.e. without evaluating the code within it) to identify any outputs. So it has to be a literal list passed in for that reason. I don't think it's vital to add the axlAddOutputs line anyway - if you just have axlOutputResult() lines, then these too are parsed to find the outputs the script produces (these too must use literal names if you want that to work).

    Andrew.

    • Cancel
    • Vote Up +1 Vote Down
    • Cancel
Children
  • AsafElazari
    AsafElazari over 4 years ago in reply to Andrew Beckett

    Hi Andrew, Tnx for the quick reply!

    I was trying to avoid those long sections of code containing ' axlOutputResult()'.   

    The full code is actually:

    ===========================================

     current_names = list("iref", "vref")    

     axlAddOutputs(list("iref", "vref"))  

      *** code content in which I create a list of waves named 'current_wave_list' ***  

     for(i 0 length(current_wave_list)-1 axlOutputResult(average(nth(i current_wave_list)), nth(i current_names)))  

     ===========================================  

    This code runs without errors (even though the inputs of  'axlOutputResult()'  aren't literal) as long as I define the names with ' axlAddOutputs()'  first. I guess that still spares me those long sections of code (because the actual current_names list contains many items), but I still have to define the list twice at the beginning of the code which is a bit messy and tedious.

    Asaf

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

    Hi Asaf,

    The issue is that the OCEAN script is parsed when you edit it in order to identify the derived outputs to add into the ADE output pane so that you can then put specs on things. It doesn't actually evaluate the code though (which it can't, because no results are available at that time) - so it can only do a static analysis of the code.

    So this is an unfortunate limitation...

    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