• 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. How to release the memory in script, for "User defined skill...

Stats

  • Locked Locked
  • Replies 6
  • Subscribers 143
  • Views 1796
  • 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

How to release the memory in script, for "User defined skill function" in the calculator

fatcat1206
fatcat1206 over 8 years ago

Hi All


As requested by my colleague, I wrote a skill script to define a "User defined skill function" for the calculator.

This function works like a "moving DFT".

It defines a time window that goes through the signal waveform, and doing the DFT for the part of signal which has been clipped by this time window. And then the ymax() of the DFT results has been stored

As you can see, there are might be quite some DFT has been executed while the time window going through whole simulation time.

The script works fine, the big issue is that the memory has been run out in short time. (after doing the calculation for the 4 times, according to my colleague).

I'd like to know if there is a method to release the memory in command line.

Then I can release the memory every time when the DFT has been executed and ymax() has been stored.

Best Regards

Yi

  • Cancel
  • skillUser
    skillUser over 8 years ago
    Hi Yi,

    Make sure that your SKILL code gets a good SKILL Lint score, especially regarding global variables (Tools -> SKILL IDE). You could try forcefully calling "gc()" in your code to perform garbage collection? If these suggestions do not help you could either post your code here to see if someone can help or file a Case with Cadence.

    Best regards,
    Lawrence.
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 8 years ago

    Hi Yi,

    I agree with Lawrence - it may be the way the code is written - or it may just be because there was nothing to trigger the garbage collection. Even with garbage collection the memory probably won't get restored to the OS (as is common with most UNIX programs unless they have relatively simple memory management).

    Either way, the best way of investigating this is to file a case with customer support (you can always put me on copy and then I'll pick it up).

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • fatcat1206
    fatcat1206 over 8 years ago
    Hi Lawrence
    Thanks for the hint of "Lint", I use it every time for my new scripts, it helps a lot.
    I just check my script once again, it has Lint score of 94, due to I accidentally removed one local variable definition.
    After correct this, the Lint score is 97, due a global variable for the "form" (that's the thing always prevent me for score 100)
    I have filed a case, and submit my script there. Case number is #46106273

    Best Regards

    Yi
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • fatcat1206
    fatcat1206 over 8 years ago
    Hi Andrew

    Thank you for your suggestions. And sorry for the late reply that I just come back from my 3 weeks holidays.

    I have filed a case, and submit my script there. Case number is #46106273.
    Hopefully you or Lawrence have time to take a look at my script, and give me some suggestions to improve it.

    Best Regards

    Yi
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 8 years ago

    Hi Yi,

    I've picked it up and will look at it later today. Lawrence wouldn't have been able to since he hasn't worked for Cadence for over 2 years!

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • fatcat1206
    fatcat1206 over 8 years ago
    Hi Andrew

    Many thanks in advance.

    Best Regards

    Yi
    • 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