• 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. SKILL recursion depth

Stats

  • Locked Locked
  • Replies 2
  • Subscribers 143
  • Views 3719
  • 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

SKILL recursion depth

PC20240802164
PC20240802164 over 1 year ago

Hi,

I am trying to create a function that traverses a table containing various types of data like forms, treestructs and other(meaning the user) types to save and load state of a SKILL GUI application. Our plan is to create a SKILL table that contains the form struct and to use sevWriteTable to dump XML. But, it is not parsing the user defined types, so we had to create our own function for creating a table which is suitable for sevWriteTable. However, I keep running into recursion stack overflow issues. I tested out with this procedure:

procedure(test(i)
prog(()
when(i == 10 return())
printf("%d\n" i)
test(i+1)
)
)

and the recursion stack error happens when the value of i is -30 ie when the tree is 40 levels deep. Anyone has any idea how to resolve this issue?

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

    Well, that code doesn't hit a stack overflow until you hit a bit over 4000 nested function calls (if I increase the I==10 part), so I'm not really sure what sharing that code is telling me? Whilst use of recursion is a common paradigm in LISP variants such as Scheme for all sorts of things (including iteration over lists), it's used in SKILL more for things where the data you're processing is hierarchical - and there it's unusual to hit the stack limits. 

    What structured data do you have with trees that are more than 40 levels deep? 

    Also, sevWriteTable is specifically intended for writing out XML for ADE - it's not really intended as a general purpose XML writer.

    I guess what I'm asking here is for more information as to what your data looks like and what the actual code is. If you can't share that here, I suggest you contact customer support (submit a support case after logging in).

    Andrew

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

    ...

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

    ...

    • 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