• 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. Release the memory by skill

Stats

  • Locked Locked
  • Replies 5
  • Subscribers 146
  • Views 15226
  • 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

Release the memory by skill

nidon
nidon over 12 years ago

Hi everyone,

 I write a skill code to generate a lot of pcells,but the speed of the generation become slower and slower.

And I think it may be generated large memory by the code,so how can I release these memory to improve the the speed of generation?

 

Tks a lot~

  • Cancel
Parents
  • marcelpreda
    marcelpreda over 12 years ago

     Hi there,

    Reading the 1st post looks like it is not 100% sure that the problem is memory.

    Better  to try the the skill profiler (license is needed).
    You can check with it which procedures are slow, but also you can check the memory used by each one.
    If you do not have license available for profiler you can try to monitor the process to see the allocated memory,
    with a command like `top' ; available on most unix flavors.

    Any how looking at the code.

    I do no know how large are your list, but a code like:
    ~~~~~~~~~~~~~
                 list=ncons(nil)
     ....
                 while(cricut
                    cricut=gets(line inres)
                    list=append1(list line))
                 close(input)
                 list=remove(nil list)
    ~~~~~~~~~~~~~~~~

    can be translated to
    ~~~~~~~~~~~~~~~~
                 list = nil  ;; actually your list is already nil
     
                 while(cricut
                    cricut=gets(line inres)
                    list=cons(line list)
                 close(input)

    ~~~~~~~~~~~~~~~~

    The idea is that cons is much faster than append1 when huge list is involved;
    cons() adds the element at the begining of the list.
    If the elements order matters you can do a
         list = reverse(list)

    Or you can try directly to use tconc() structure ;

    I personally I'm to lazy to use it :D - every time I should check the manual.

    You ca do the same thing with the other list where you also use append1.



    BR,
    Marcel

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • marcelpreda
    marcelpreda over 12 years ago

     Hi there,

    Reading the 1st post looks like it is not 100% sure that the problem is memory.

    Better  to try the the skill profiler (license is needed).
    You can check with it which procedures are slow, but also you can check the memory used by each one.
    If you do not have license available for profiler you can try to monitor the process to see the allocated memory,
    with a command like `top' ; available on most unix flavors.

    Any how looking at the code.

    I do no know how large are your list, but a code like:
    ~~~~~~~~~~~~~
                 list=ncons(nil)
     ....
                 while(cricut
                    cricut=gets(line inres)
                    list=append1(list line))
                 close(input)
                 list=remove(nil list)
    ~~~~~~~~~~~~~~~~

    can be translated to
    ~~~~~~~~~~~~~~~~
                 list = nil  ;; actually your list is already nil
     
                 while(cricut
                    cricut=gets(line inres)
                    list=cons(line list)
                 close(input)

    ~~~~~~~~~~~~~~~~

    The idea is that cons is much faster than append1 when huge list is involved;
    cons() adds the element at the begining of the list.
    If the elements order matters you can do a
         list = reverse(list)

    Or you can try directly to use tconc() structure ;

    I personally I'm to lazy to use it :D - every time I should check the manual.

    You ca do the same thing with the other list where you also use append1.



    BR,
    Marcel

    • 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