Home > Community > Forums > Custom IC Design > A rather unconventional schematic symbol question/issue

Email

* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

 A rather unconventional schematic symbol question/issue 

Last post Fri, Mar 13 2009 10:44 AM by Composter. 25 replies.
Started by Composter 10 Mar 2009 12:22 PM. Topic has 25 replies and 6766 views
Page 1 of 2 (26 items) 1 2 Next >
Sort Posts:
  • Tue, Mar 10 2009 12:22 PM

    • Composter
    • Top 500 Contributor
    • Joined on Thu, Oct 23 2008
    • Posts 16
    • Points 275
    A rather unconventional schematic symbol question/issue Reply

     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.

     

    • Post Points: 20
  • Tue, Mar 10 2009 12:33 PM

    • skillUser
    • Top 10 Contributor
    • Joined on Fri, Sep 19 2008
    • Austin, TX
    • Posts 2,587
    • Points 15,915
    Re: A rather unconventional schematic symbol question/issue Reply
    Hi,

    I think that all you need is the following:

    ilInst~>name


    Regards,
    Lawrence.
    • Post Points: 20
  • Tue, Mar 10 2009 12:56 PM

    • Composter
    • Top 500 Contributor
    • Joined on Thu, Oct 23 2008
    • Posts 16
    • Points 275
    Re: A rather unconventional schematic symbol question/issue Reply

     Hi Lawrence,

     Wow - that was quick! However, it didn't work :-(. Perhaps a clarification is in order. On my symbol I have an ILLabel "ilInst~>iname". In the cdf for the cell I have declared the parameter iname, and the default value of iname is a somewhat lengthy skill code expression that contains the line:

    if( sameWidth&&sameLength cdfgData->iname->value=\"\" cdfgData->iname->value=ilInst~>name )

    i.e. based on the conditional 'sameWidth&&sameLength' iname will either evaluate to a null string or what I hope to be the instance's instance name. I implemented your suggestion of accessing the instance name via "ilInst~>name" in the line of code above, however the current instance name is NOT displayed. If I select the instance and do a query, I see that the instance name on the form and the instance name displayed as a result of the expression are not the same.

    Looking forward to your next answer!

    Thanks,

    Mick.

    • Post Points: 5
  • Thu, Mar 12 2009 5:25 AM

    • Composter
    • Top 500 Contributor
    • Joined on Thu, Oct 23 2008
    • Posts 16
    • Points 275
    Re: A rather unconventional schematic symbol question/issue Reply

    Make that "Looking forward to *anybody's* next answer"...

    • Post Points: 20
  • Thu, Mar 12 2009 6:51 AM

    • dmay
    • Top 25 Contributor
    • Joined on Thu, Jul 17 2008
    • Allen, TX
    • Posts 394
    • Points 7,420
    Re: A rather unconventional schematic symbol question/issue Reply

    How about using an NLPLabel with a value like this: [@instanceName]

    The NLPLabel will display the value of attributes on the object. You could replace instanceName with any attribute that would be found in the instance.

    Derek

    • Post Points: 20
  • Thu, Mar 12 2009 7:18 AM

    • Composter
    • Top 500 Contributor
    • Joined on Thu, Oct 23 2008
    • Posts 16
    • Points 275
    Re: A rather unconventional schematic symbol question/issue Reply

     Nice avatar :-).

    So using that NLPLabel is only good for a *persistent* display of the instance name. The label I'm trying to make *conditionally* displays the instance name. Hence I need access to a way to determine the instance name from within the expression previously cited so I can subsequently choose to display it or not. I was hoping access to the instance name would be available in cdfgData but I'm not sure. My experience level with skill isn't so good, but I'm great at modifying existing code when I can see the context.

    • Post Points: 20
  • Thu, Mar 12 2009 9:25 AM

    • dmay
    • Top 25 Contributor
    • Joined on Thu, Jul 17 2008
    • Allen, TX
    • Posts 394
    • Points 7,420
    Re: A rather unconventional schematic symbol question/issue Reply

    Can you use an attribute on the instance to store your instance name conditionally? If I change the [@instanceName] to [@instanceName2], then nothing will display when I place the symbol. However, if I set a property on the instance with a name of instanceName2, then the value will display. Would this be sufficient, or are you hoping to dynamically display the names?

    For dynamic display, I tried the following, and it seemed to work:
    Set a global variable: _DISPLAY = nil
    Create an ilLabel: {_DISPLAY && ilInst~>name}
    Toggle the _DISPLAY variable to t and the instance name displays.

    Derek

    • Post Points: 20
  • Thu, Mar 12 2009 11:42 AM

    • Composter
    • Top 500 Contributor
    • Joined on Thu, Oct 23 2008
    • Posts 16
    • Points 275
    Re: A rather unconventional schematic symbol question/issue Reply

    Hi Derek,

    So that's an interesting idea. Perhaps if I go even one level deeper into what I'm trying to do it will help. I have a bunch of switch symbols. I find switched capacitor schematics rapidly get ugly/incomprehensible because the switches are big, have way too many labels showing, and have pin locations that promote lots of wires crossing each other. The symbols I'm making have the ability to set the widths and lengths of the internal transistors, and the labels I'm displaying on the symbol are context sensitive i.e. if the device sizes are for default minimum sized transistors then I don't even display W/L's on the switch symbol - only the instance name. Without getting too deep, i have some labels that either display W/L or the cell's instance name. In this case, if the label chooses to show W/L then another label elsewhere on the symbol will light up with the instance name. All of this is on a per-cell basis i.e. no global variables.

    An abbreviated example of what I'm doing is:

    On a symbol I have an ILLabel "ilInst~>size2"

    In the cell's cdf I have a parameter "size2" that contains the 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->size1->value=cdsName() cdfgData->size1->value=sprintf(nil \"%s/%s\" curWN1 curLN1) ) \
    )"
        )

    The IF statement at the end evaluates an expression and decides returning the instance name ( currently cdsName() ) or a W/L ratio, and the ILLabel on the symbol correspondingly displays the right stuff. So my issue is that the cdsName() function in the IF statement does NOT return the instance name of the currently selected cell, and I'm after some other alternative I can stuff into that IF statement.

    Or maybe there's an even better way to do all this - although I'd prefer just the alternative function. I'm hopeful that the global information available via cdfgData when a cell is selected has this information. I just don't know how to get at it...

    Mick.
    • Post Points: 35
  • Thu, Mar 12 2009 12:53 PM

    Re: A rather unconventional schematic symbol question/issue Reply

     The problem is finding ou tthe currently selected instance displayed in the editProps form. The variable cdfgData does not contain the dbId of the instance, only the master. ilInst is only valid inside the placement so it cannot be used in a cdf callback.

    For some reason, cdsName() does not work correctly all the time, I think it has to do with the CDS_NETLISTING_MODE value.

     

    Ted

    • Post Points: 20
  • Thu, Mar 12 2009 12:55 PM

    • dmay
    • Top 25 Contributor
    • Joined on Thu, Jul 17 2008
    • Allen, TX
    • Posts 394
    • Points 7,420
    Re: A rather unconventional schematic symbol question/issue Reply

    How about this:

    Create an iLLabel with a value of "myLabel()"

    Then define this function:

    procedure(myLabel()
    letseq( (label
        (curWN1 ilInst~>WN1)
        (curLN1 ilInst~>LN1)
        (curWN2 ilInst~>WN2)
        (curLN2 ilInst~>LN2)
        (sameWidth cdfParseFloatString(curWN1)==cdfParseFloatString(curWN2) )
        (sameLength cdfParseFloatString(curLN1)==cdfParseFloatString(curLN2) )
      )
      if( sameWidth&&sameLength
        sprintf(label "%L" ilInst~>name)
        sprintf(label "%s/%s" curWN1 curLN1)
      )
      label
     )
    ) ;proc

    Derek

    • Post Points: 20
  • Thu, Mar 12 2009 1:14 PM

    • Composter
    • Top 500 Contributor
    • Joined on Thu, Oct 23 2008
    • Posts 16
    • Points 275
    Re: A rather unconventional schematic symbol question/issue Reply

    Thanks for the explanation Ted. I didn't appreciate until now that cdfgData pointed to the master and not the instance. I have certainly noticed that cdsName() works for some of my symbols and not others. I've never played with CDS_NETLISTING_MODE so it's weird that cdsName() isn't behaving consistently for me. 

     By the way - your last name wouldn't happen to start with "P" would it :-)

    • Post Points: 20
  • Thu, Mar 12 2009 1:31 PM

    • skillUser
    • Top 10 Contributor
    • Joined on Fri, Sep 19 2008
    • Austin, TX
    • Posts 2,587
    • Points 15,915
    Re: A rather unconventional schematic symbol question/issue Reply

    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.

    • Post Points: 5
  • Thu, Mar 12 2009 1:31 PM

    • Composter
    • Top 500 Contributor
    • Joined on Thu, Oct 23 2008
    • Posts 16
    • Points 275
    Re: A rather unconventional schematic symbol question/issue Reply

     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 ;-)

    • Post Points: 20
  • Thu, Mar 12 2009 1:35 PM

    • dmay
    • Top 25 Contributor
    • Joined on Thu, Jul 17 2008
    • Allen, TX
    • Posts 394
    • Points 7,420
    Re: A rather unconventional schematic symbol question/issue Reply

    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

    • Post Points: 35
  • Thu, Mar 12 2009 1:43 PM

    • skillUser
    • Top 10 Contributor
    • Joined on Fri, Sep 19 2008
    • Austin, TX
    • Posts 2,587
    • Points 15,915
    Re: A rather unconventional schematic symbol question/issue Reply

     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.

    • Post Points: 35
Page 1 of 2 (26 items) 1 2 Next >
Sort Posts:
Started by Composter at 10 Mar 2009 12:22 PM. Topic has 25 replies.