• 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. About loop constructs

Stats

  • Locked Locked
  • Replies 8
  • Subscribers 125
  • Views 14504
  • 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

About loop constructs

bobbygang
bobbygang over 14 years ago

Hi, I have a strange problem. In skill code , can I set a function for loop constructs whose selection statement number is uncertain?
For example I set a  list Total=(A B C D E)  and their corresponding limit for loop just as ( 3 2 1 2 3 ).
And I set a new list Cycle =( A B). It includes part elements of Total as the statement 
Then I want a function LP(Total Cycle   (code)  )  to achieve like this( assume this function name is LP):

for(A 1 3
     for(B 1 2
          (code)
    )/*end for*/
)*end for*/

I f I modify change Cycle=(A B C)
LP(Total Cycle   (code)    )  will do something like this:

for(A 1 3
       for(B 1 2
            for(C 1 1
                     (code)
                )*end for*/
           )*end for*/
)*end for*/

Regards,


Bobby.

 

 

  • Cancel
Parents
  • bobbygang
    bobbygang over 14 years ago


    Andrew,

    I'm sorry, in fact I want to design some basis ocean for circuit design. So I want to achieve some function which makes other fresh man easier to understand and can be reused.But now I have never fully thought how to do it.
    The function discussed above is just one of them. It contains uncertain loops, each cycle corresponding to the different variables
    For example, there are variables A B C D E ... Every time I combine some of them  and see their impact on the circuit, the other variables remain typical value.
    Perhaps I may write analysis() in @rest code. But when analysis finishes I get some circuit result such as Id and I want to know its worst condition. Then combine these worst-case conditions to get the top worst condition.
    For example I want to get max value of Id.
    Loop is like this:
    A   B   Id       
    1   1   1u
          2   3u
    2   1    5u
          2   6u
    3   1    4u
          2   2u

    C   D  E   Id       
    1   1  1    1u
              2   1.5u
         2  1    3u
              2   3.5u
         3  1    5u
              2   4u
    2   1  1    2u
              2   6u
         2  1    2.5u
              2   3.5u
        3   1   1u
              2   0.5u

    To achieve above I may write
    LP((3 2) (A B) analysis()....) 
    LP((2 3 2) (C D E) analysis()....)    
    and get  worst condition from it:A=2 B=2 C=2 D=1 E=2
    And I will do simulation in this case.

    I know its easier if I use for(for (for .....))) to construct the ocean. But when combination need to change the code may be rewritten.
    May be my idea is too complicated. I hope you can help me.

    Regards,

    Bobby.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • bobbygang
    bobbygang over 14 years ago


    Andrew,

    I'm sorry, in fact I want to design some basis ocean for circuit design. So I want to achieve some function which makes other fresh man easier to understand and can be reused.But now I have never fully thought how to do it.
    The function discussed above is just one of them. It contains uncertain loops, each cycle corresponding to the different variables
    For example, there are variables A B C D E ... Every time I combine some of them  and see their impact on the circuit, the other variables remain typical value.
    Perhaps I may write analysis() in @rest code. But when analysis finishes I get some circuit result such as Id and I want to know its worst condition. Then combine these worst-case conditions to get the top worst condition.
    For example I want to get max value of Id.
    Loop is like this:
    A   B   Id       
    1   1   1u
          2   3u
    2   1    5u
          2   6u
    3   1    4u
          2   2u

    C   D  E   Id       
    1   1  1    1u
              2   1.5u
         2  1    3u
              2   3.5u
         3  1    5u
              2   4u
    2   1  1    2u
              2   6u
         2  1    2.5u
              2   3.5u
        3   1   1u
              2   0.5u

    To achieve above I may write
    LP((3 2) (A B) analysis()....) 
    LP((2 3 2) (C D E) analysis()....)    
    and get  worst condition from it:A=2 B=2 C=2 D=1 E=2
    And I will do simulation in this case.

    I know its easier if I use for(for (for .....))) to construct the ocean. But when combination need to change the code may be rewritten.
    May be my idea is too complicated. I hope you can help me.

    Regards,

    Bobby.

    • 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