• 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. A rather unconventional schematic symbol question/issue

Stats

  • Locked Locked
  • Replies 25
  • Subscribers 126
  • Views 10946
  • 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

A rather unconventional schematic symbol question/issue

Composter
Composter over 16 years ago

 Hi,

 I'm using Cadence 5.1 and am trying to make some schematic symbols that display context dependent information when instantiated. Onthe symbol itself, I have several ILLabels such as "ilInst~>myvar" and I have edited the cdf such that "myvar" contains some skill code that evaluates to the string of what I want displayed on the symbol. I'm accessing the data about the selected instance through expressions like "cdfgData->width->value". Much of this is based on code I've seen used elsewhere and I've just adapted it to suit my needs.

 

So I'm running aground because I don't know how to access the instance name (as opposed tthe cell name) within an expression. I've already tried cdsName() but that does not return the current instance name of the selected instance. Can anybody out there please provide me with the skill magic to do this. I figure it has to be available via cdfgData but I don't the access name. Many thanks in advance.

 

  • Cancel
  • skillUser
    skillUser over 16 years ago

    Hi Mick,

    You've found him!

    By the way, although not directly what you were looking for, I wrote a couple of SKILL solutions that might be useful or of interest to you. These can be accessed through SourceLink:

    CCStoggleNLPLabels.il

    http://sourcelink.cadence.com/docs/files/SKILL/CIC_SKILL_Code/CCStoggleNLPLabels.il

    CCStoggleNetName.il

    http://sourcelink.cadence.com/docs/files/SKILL/CIC_SKILL_Code/CCStoggleNetName.il

    Hope this helps you,

    Regards,

    Lawrence.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Composter
    Composter over 16 years ago

     I've been trying to hold back what I deem to be extraneous details because I didn't want to complicate the issue and scare away responders, and that turned out to be a mistake. Your solution, while I'm sure it works, requires all users of this cell to have a procedure loaded. Virtually all of the people in the company I work for do not want to deal with ANY special file loading - even if it's just a .cdsinit. Sigh. I'm looking for a solution that "just works", and that's why everything is embedded in the cdf parameters (because that's what I've been shown so far).

    I feel really bad that you spent time on a solution I can't use because of information I omitted. However, at this point I believe all the constraints have been mentioned.

    Now I'm starting to see why you chose that avatar ;-)

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • dmay
    dmay over 16 years ago

    Since the symbol and cdf belong to a library, you can put the skill routine in a file called libInit.il in the library. This skill file will be loaded automatically when the library is accessed. No one has to know about it.

     Mickey Mouse

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • skillUser
    skillUser over 16 years ago

     Quite a mean looking Mickey if you don't mind me saying Derek :-)

    Another alternative, if Mick has access to the installation (e.g. he is part of the CAD team), a <cds_install_dir>/tools/dfII/local directory can be created and contain a .cdsinit file that would get loaded for all users and all sessions. This file could still allow for the loading of any additional .cdsinit files, through SKILL, e.g.

    when(isFile("./.cdsinit")
      load("./.cdsinit")
    )

    Hope this might help a little.

    Regards,

    Lawrence.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • dmay
    dmay over 16 years ago

    I'd rather say he's "determined".

    -Derek

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Composter
    Composter over 16 years ago

    I have nothing to do with the CAD team. I'm a designer sharing some cells with good looking practical symbols to co-designers. The CAD group have provided us with the (ugly) symbols and they have virtually zero tolerance for stuff not invented in their world.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • dmay
    dmay over 16 years ago

    One more try. Several posts back, you tried to set cdfgData~>size1 to cdsName() or to some other string. Why don't you simply set a flag instead of using cdsName (since cdsName isn't working). Then, you can set size1 to the W/L string. Set flag to t if you want to display the instanceName or nil otherwise. Then do an iLLabel of:

    {if(ilInst~>flag ilInst~>name ilInst~>size1)}

    Derek

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Composter
    Composter over 16 years ago

    So, bearing in mind that I'm a lousy skill programmer and I'm going by previously written code,I implemented flag as a cdf parameter  according to:

     

         cdfCreateParam( cdfId
            ?name           "flag"
            ?prompt         "flag"
            ?type           "boolean"
            ?display        "nil"
            ?editable       "nil"
            ?storeDefault   "yes"
            ?defValue       "letseq( ( \
        (curWN1 cdfgData~>WN1->value) \
        (curLN1 cdfgData~>LN1->value) \
        (curWN2 cdfgData~>WN2->value) \
        (curLN2 cdfgData~>LN2->value) \
        (sameWidth cdfParseFloatString(curWN1)==cdfParseFloatString(curWN2) ) \
        (sameLength cdfParseFloatString(curLN1)==cdfParseFloatString(curLN2) ) \
      ) \
      if( sameWidth&&sameLength cdfgData->flag->value=nil cdfgData->flag->value=t ) \
    )"
        )

    In all the callbacks for the width and length parameters I have the line:

      evalstring(cdfgData->flag->defValue)

    However, based on the behavior of the ILLabel:

    {if(ilInst~>flag ilInst~>name ilInst~>size1)}

    it seems that flag always evaluates as t i.e. now it always displays the instance name :-(

     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Composter
    Composter over 16 years ago

    dmay said:

    Since the symbol and cdf belong to a library, you can put the skill routine in a file called libInit.il in the library. This skill file will be loaded automatically when the library is accessed. No one has to know about it.

     

    Just going from memory here, if someone hierarchically copies a schematic containing these switches, then I think the libinit.il file gets left behind and the cell is then broken, right?

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • dmay
    dmay over 16 years ago

    My mistake. Since this is a CDF, the value for a boolean is stored as "TRUE" or "FALSE", thus always evaluating as non-nil. When I tested it, I had not yet added the boolean, so it evaluated as nil. Once I added the boolean, it was "TRUE". When I changed it to nil, it became "FALSE" and I had the same problem. My intent was to make the iLLabel as short as possible, because sometimes these large labels can affect the symbol size.

    {if(ilInst~>flag=="TRUE" ilInst~>name ilInst~>size1)}

    Or, if you'd rather set a 0/1 flag:
    {if(ilInst~>flag==1 ilInst~>name ilInst~>size1)}

    As for your question about hierarchical copy, you are correct, the skill won't copy with it. We would typically have a primitive needing skill code in a library that should be ignored during hierarchicaly copy. Hopefully the above code works for you.

    Derek

    • 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