• 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. Adding different variable values for different corners from...

Stats

  • Locked Locked
  • Replies 12
  • Subscribers 125
  • Views 21326
  • 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

Adding different variable values for different corners from a file into ADE-XL using SKILL

RFStuff
RFStuff over 6 years ago

Dear All,

I have two variables SWING and VCM as Global Variables in my ADE-XL.

I have another variable FCLK which takes value 17G, 13G. In other words it is swept for each corner with the three values.

I have 2 corners TT and FF in my corner setup.

I have captured the SWING and VCM information in a file as below:-

###############################

corner,   FCLK, SWING, VCM 

TT,          13G,      1.3,       0.65

TT,          17G,      1.2,       0.60  

FF,          13G,      1.4,       0.7

FF,          17G,      1.3,       0.65  

###############################

Is there way we can make ADE-XL to take the appropriate value for each FCLK  sweep and the corner instead of manually adding the variables ? 

I think a SKILL script can do this. But I am not able to make it work for ADE-XL.

Can anybody please tell me how it can be done ?

Kind Regards,

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

    Presumably you can create four corners with the values of the 3 variables and the model section? I'm not quite understanding what is the issue here...

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • RFStuff
    RFStuff over 6 years ago in reply to Andrew Beckett

    Dear Andrew,

    Thanks a lot.

    Yes, that we can add manually. But if we have say 20 corners and we have many variables, then adding manually is going to be tough and error prone.

    But, a SKILL script can read the parameters values from the file and add to ADE-XL during simulation of each corner.

    How to do that, I am not able to achieve.

    Kind Regards,

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 6 years ago in reply to RFStuff

    Given that you've got to define it somewhere (as there's no obvious pattern to the variable combinations), you could create the setup in a CSV file (you can save and load CSV at the top of the corners form, so you can save it to get an idea of the format, and then load that way). I'm not sure what value SKILL adds over this - you can at least check interactively that what you've loaded looks correct? A CSV file is about as simple a way of representing this as possible.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • RFStuff
    RFStuff over 6 years ago in reply to Andrew Beckett

    But, if I am sweeping the variable in this case FCLK (as shown in the file above), I should be able to make ADE-XL take the corresponding variable values (in this case SWING and VCM) for each corner. Editing the .csv file for a larger sweeping range and many variables may become cumbersome. In this case a SKILL code can be very helpful.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 6 years ago in reply to RFStuff

    The challenge is knowing precisely what you want here. Trying to write a general purpose solution is potentially tricky (and a lot more work than I have time for). I'm not entirely certain I understand what your starting point is.

    OK, how about this. I could write some SKILL code that modifies the corners to add the FCLK variable (any any other variables) based on the value of the model section in each corner. For that I'd need to know what your existing corners look like, so that there's a chance of me producing something that fits your needs or at least is close enough that you can adapt?

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • RFStuff
    RFStuff over 6 years ago in reply to Andrew Beckett

    Dear Andrew, 

    Thanks a lot for helping me out.

    The simple file pattern is :- 

    ###############################

    corner,   FCLK, SWING, VCM 

    TT,          13G,      1.3,       0.65

    FF,          13G,      1.2,       0.60  

    TT,          17G,      1.4,       0.7

    FF,          17G,      1.3,       0.65  

    ###############################

    What I need is :-

    1:- a)In ADE-XL window I have FCLK in global variable as :--> 13G, 17G. (it can be more sweeps). So the above simple file will be bigger as we add more FCLK point for each corner.

       b)  I have 2-corners TT, FF  (can be more corners) already there in the corner Setup file.  [There are already some fixed variables for each corner type.  This will not affect our SKILL code].

    With more corner points the above simple file will be bigger accordingly following similar pattern.

       c) I have the other variables SWING and VCM whose values depend upon FCLK and the corner NAME as shown in the simple file above.

           But, in ADE-XL, I have added some default value for SWING and VCM (just to keep the variable column non-emepty)

    2:-

    Now, what is desired is:-

    When I press the RUN in ADE-XL window, The SKILL script, will execute and it will choose VCM and SWING values based on FCLK  value and the corner point , from the file given above.

    The spectre netlist will take those variable values and will run.

    May be we can even add the SKILL function against the  variable  VCM and SWING as:-

    VCM :-- valueLoad("file name", VAR("FCLK")

    SWING:-- valueLoad("file name", VAR("FCLK")     

        

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • RFStuff
    RFStuff over 6 years ago in reply to Andrew Beckett

    Dear Andrew, 

    Thanks a lot for helping me out.

    The simple file pattern is :- 

    ###############################

    corner,   FCLK, SWING, VCM 

    TT,          13G,      1.3,       0.65

    FF,          13G,      1.2,       0.60  

    TT,          17G,      1.4,       0.7

    FF,          17G,      1.3,       0.65  

    ###############################

    What I need is :-

    1:- a)In ADE-XL window I have FCLK in global variable as :--> 13G, 17G. (it can be more sweeps). So the above simple file will be bigger as we add more FCLK point for each corner.

       b)  I have 2-corners TT, FF  (can be more corners) already there in the corner Setup file.  [There are already some fixed variables for each corner type.  This will not affect our SKILL code].

    With more corner points the above simple file will be bigger accordingly following similar pattern.

       c) I have the other variables SWING and VCM whose values depend upon FCLK and the corner NAME as shown in the simple file above.

           But, in ADE-XL, I have added some default value for SWING and VCM (just to keep the variable column non-emepty)

    2:-

    Now, what is desired is:-

    When I press the RUN in ADE-XL window, The SKILL script, will execute and it will choose VCM and SWING values based on FCLK  value and the corner point , from the file given above.

    The spectre netlist will take those variable values and will run.

    May be we can even add the SKILL function against the  variable  VCM and SWING as:-

    VCM :-- valueLoad("file name", VAR("FCLK")

    SWING:-- valueLoad("file name", VAR("FCLK")     

        

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
  • RFStuff
    RFStuff over 6 years ago in reply to RFStuff

    Sorry, We can add

    VCM :-- valueLoad("file name", VAR("FCLK"), "VCM")

    SWING:-- valueLoad("file name", VAR("FCLK", "SWING")    

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • RFStuff
    RFStuff over 6 years ago in reply to RFStuff

    A typical corner setup looks something like :-

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • RFStuff
    RFStuff over 6 years ago in reply to RFStuff

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 6 years ago in reply to RFStuff

    OK, I put something together to illustrate this. I did it the way you were asking - which was for a lookup function rather than generating expanded corners. I think this should be fairly safe, and certainly works in the examples I've tried.

    The crux of it is two things - the table file (I kept the format simpler to make it easier to parse - no commas, just space separated, although I do allow for comment lines if they begin with a semi-colon). The first row is the names of the columns:

    ; first row is names of vars
    CORNER VCM RLEN
    TTLOW  1 9u
    TTHIGH 1 10u
    FFLOW  1 11u
    FFHIGH 1 9u
    TTLOW  1.2 15u
    TTHIGH 1.2 13u
    FFLOW  1.2 14u
    FFHIGH 1.2 16u

    Then I have this lookup function:

    procedure(abLookupVar(tableFile value key @optional 
        (corner axlGetCornerNameForCurrentPointInRun()))
      let((table rowTable inprt line parsed (firstLine t) keyNames 
            valueAsString foundRow foundVal
          )
        ;--------------------------------------------------------------------
        ; First read the file and generate a table of tables
        ; The outer table is index by a list of the corner and the value
        ; passed in, and the inner table is indexed by the key name (defined
        ; on the first row in the table file)
        ;--------------------------------------------------------------------
        table=makeTable('lookup nil)
        inprt=infile(tableFile)
        when(inprt
          while(gets(line inprt)
            unless(pcreMatchp("^\\s*;" line)
              parsed=parseString(line)
              if(firstLine then
                keyNames=parsed
                firstLine=nil
              else
                rowTable=makeTable('rowTable nil)
                foreach((var val) keyNames parsed
                  rowTable[var]=val
                )
                table[list(car(parsed) cadr(parsed))]=rowTable
              )
            )
          )
          close(inprt)
        )
        ;--------------------------------------------------------------------
        ; convert the value to a string to simplify lookup
        ;--------------------------------------------------------------------
        valueAsString=
          if(stringp(value) 
            then
              value
            else
              sprintf(nil "%L" value)
          )
        ;--------------------------------------------------------------------
        ; Find the row and then the entry in the row table, and check
        ; it was found
        ;--------------------------------------------------------------------
        foundRow=table[list(corner valueAsString)]
        when(foundRow
          foundVal=foundRow[key]
        )
        unless(foundVal
          printf("INFO abLookupVar: Couldn't find entry in table, returning default\n")
          foundVal="8u" ; default
        )
        printf("INFO abLookupVar: %L %L %L -> %L\n" corner valueAsString key foundVal)
        foundVal
      )
    )

    This is loaded from the .cdsinit (you will need to ensure you do this and then re-open ADE XL as it got a bit confused when I added it halfway through a session).

    Then you can see I use the function in the global variables section to look up a column from the table (in my case I only have one variable, but it could be used for multiple):

    The corners were set up like this:

    Finally, the complete example can be found here: https://community.cadence.com/cfs-file/__key/communityserver-discussions-components-files/38/lookup.tgz . This is using gpdk045 to provide a simple resistor. The design is in mylib/rcac/adexl (I originally was going to have a capacitor in there, hence the "rc" in the name, and it's only doing a DC operating point right now, but you get the idea).

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • RFStuff
    RFStuff over 6 years ago in reply to Andrew Beckett

    Dear Andrew,

    Thanks a lot. 

    It is good enough for my purpose. I would also like to understand this code with command by command so that in future I can modify it for some other need.

    Could you please tell me the documents where I could  find all the commands mentioned in the code and their usage.

    Kind Regards,

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 6 years ago in reply to RFStuff

    Nearly all of the code is core SKILL, with the exception of the axlGetCornerNameForCurrentPointInRun function. The bulk of the code can be understood by reading the SKILL Language User Guide and SKILL Language Reference Manual, with the axl (ADE XL) function being in the Virtuoso Analog Design Environment XL SKILL Reference manual.

    In IC617 and later, you can also use cdsFinder (from the UNIX command line), type in a function or partial function to search, and when you've selected the one you want, the "More Info" button will generally take you to the full documentation for that function.

    Regards,

    Andrew.

    • 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