SKILL Q: Creating ILLabels in the schematics

Discussion in 'Cadence' started by svenn.are, Oct 9, 2003.

  1. svenn.are

    svenn.are Guest

    Hi,

    I have been playing around with ILLabels in schematics and symbols a
    bit.
    If I use the schCreateNoteLabel() function it is possible to specify
    its function as ILLabel. I put something like

    schHiCreateNoteLabel( "asiGetCurrentSession()" "lowerLeft" "swedish"
    0.0625 "ILLabel" )
    in CIW and get to place a label in my current schematic, which is
    opened in Analog Artist environment. Now the label is placed and I see
    "asiGetCurrentSession()" on screen. If I select the label and press q
    to se the object properties, I notice that the value is "nil". I did
    expect an object, but anyhow a start. I add another label, this time
    change the asiGetCurrentSession() to 7 + 3 and in the object
    properties I get 10 for value. Now that seems to be good. I cannot
    find out how to get the return value of the label shown instead of the
    label itself.

    Motivated by this I create a cell called coollabel with only a symbol.
    In this symbol I place a label that I define as a ILLabel and write
    (plus 3 7), save it and place the coollabel symbol in my schematic.
    Now the return value 10 is shown. Motivated by this I try to get
    something like a (printf "result is %L" (plus 3 7)) but this time I
    get only t. Ok, return value. I then try a simple (list "Result is: "
    (plus 3 7)) but this time I get a nil. In frustration I try a (strcat
    "result is: " (plus 3 7)) but as expected (plus 3 7) is not a string
    so I get a warning.

    I try to experiment with the L label but that one is pure text and is
    not being evaluated. I really look for a way to write small
    interpreted labels that I can place on strategic places in my
    schematic so that I can use an ocean backend call to get particular
    values from the database.

    The nice thing with the L label is that I can attach it to a symbol so
    that the labels are moved together with the symbols.

    Anybody having experimented with ILLabels that have some experience to
    share?
     
    svenn.are, Oct 9, 2003
    #1
  2. svenn.are

    snmishra Guest

    Hi Svenn

    I think my reply went straight to you instead of the group. So here
    it is again.

    You could try (sprintf "Result is %L" (plus 3 7)) or
    (get_pname (concat "Result is " (plus 3 7))).

    I am very much interested in the outcome of your experiment. It's neat
    idea I think.

    Regards
    Satya

    svenn> Hi, I have been playing around with ILLabels in schematics
    svenn> and symbols a bit. If I use the schCreateNoteLabel()
    svenn> function it is possible to specify its function as
    svenn> ILLabel. I put something like

    svenn> schHiCreateNoteLabel( "asiGetCurrentSession()" "lowerLeft"
    svenn> "swedish" 0.0625 "ILLabel" ) in CIW and get to place a
    svenn> label in my current schematic, which is opened in Analog
    svenn> Artist environment. Now the label is placed and I see
    svenn> "asiGetCurrentSession()" on screen. If I select the label
    svenn> and press q to se the object properties, I notice that the
    svenn> value is "nil". I did expect an object, but anyhow a
    svenn> start. I add another label, this time change the
    svenn> asiGetCurrentSession() to 7 + 3 and in the object
    svenn> properties I get 10 for value. Now that seems to be good. I
    svenn> cannot find out how to get the return value of the label
    svenn> shown instead of the label itself.

    svenn> Motivated by this I create a cell called coollabel with
    svenn> only a symbol. In this symbol I place a label that I
    svenn> define as a ILLabel and write (plus 3 7), save it and place
    svenn> the coollabel symbol in my schematic. Now the return value
    svenn> 10 is shown. Motivated by this I try to get something like
    svenn> a (printf "result is %L" (plus 3 7)) but this time I get
    svenn> only t. Ok, return value. I then try a simple (list "Result
    svenn> is: " (plus 3 7)) but this time I get a nil. In frustration
    svenn> I try a (strcat "result is: " (plus 3 7)) but as expected
    svenn> (plus 3 7) is not a string so I get a warning.

    svenn> I try to experiment with the L label but that one is pure
    svenn> text and is not being evaluated. I really look for a way to
    svenn> write small interpreted labels that I can place on
    svenn> strategic places in my schematic so that I can use an ocean
    svenn> backend call to get particular values from the database.

    svenn> The nice thing with the L label is that I can attach it to
    svenn> a symbol so that the labels are moved together with the
    svenn> symbols.

    svenn> Anybody having experimented with ILLabels that have some
    svenn> experience to share?

    svenn> -- Svenn

    --
     
    snmishra, Oct 10, 2003
    #2
  3. svenn.are

    svenn.are Guest

    I created a label and a symbol with a label with both suggestions and
    the get_pname is the one that works best. The other one say that there
    is an error in argument #1 must be a symbol or nil.

    I find it quite strange that a label placed with schHiCreateNoteLabel
    is not editable with the object editor afterwards. The fields are
    greyed out.

    Maybe I'll have to check how the interpreted labels in the waveform
    window works. Thanks for your suggestions so far. Would be nice if
    Cadence picked up the ball and wrote an application note on loosely
    connected annotated labels.
     
    svenn.are, Oct 10, 2003
    #3
  4. svenn.are

    snmishra Guest

    Hi Svenn

    I wrote the last one from home. Had a syntax error. Should be
    (sprintf nil "Result is %L" (plus 3 7)).

    I tried the schHiCreateNoteLabel thing. Seems to work for me. Are you
    sure the cellview was opened in edit mode?

    Thanks a lot for the good work.
    Satya

    svenn> wrote in message

    svenn> I created a label and a symbol with a label with both
    svenn> suggestions and the get_pname is the one that works best. The
    svenn> other one say that there is an error in argument #1 must be a
    svenn> symbol or nil.

    svenn> I find it quite strange that a label placed with
    svenn> schHiCreateNoteLabel is not editable with the object editor
    svenn> afterwards. The fields are greyed out.

    svenn> Maybe I'll have to check how the interpreted labels in the
    svenn> waveform window works. Thanks for your suggestions so
    svenn> far. Would be nice if Cadence picked up the ball and wrote an
    svenn> application note on loosely connected annotated labels. --
    svenn> svenn
     
    snmishra, Oct 10, 2003
    #4
  5. Using the get_pname example is NOT a good idea. The concat is creating a symbol,
    which depending on the results of the expression will be new each time.

    Symbols are not garbage collected in SKILL, and so you gradually leak a small
    amount of memory, plus slow down the symbol lookup by creating an unnecessary
    number of symbols. Strings are however garbage collected.

    Symbols are very useful, but use symbol operations where necessary.

    In this case you're doing a simple string operation, so use string functions to
    produce them. sprintf() is the right way to do this in this case.

    As for the original question, ILLabels are only interpreted when they are
    on the master for a placed instance (for example, a symbol can have an
    ILLabel, and then the instance will evaluate that label when displayed).
    You can reference the "global" (it's sort of global) variable ilInst if you
    want to find the instance ID for the instance in question.
    They are not however evaluated if the label is a level-0 label - i.e.
    in the schematic itself.

    Regards,

    Andrew.
     
    Andrew Beckett, Oct 13, 2003
    #5
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.