• 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 SKILL
  3. Changing a cell's cdf parameter via skill code

Stats

  • Locked Locked
  • Replies 3
  • Subscribers 143
  • Views 5333
  • 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

Changing a cell's cdf parameter via skill code

CADcasualty
CADcasualty over 6 years ago

I've spent a daft amount of time trying to figure this out so I'm bailing out and asking here.

I have a cell that has a cdf parameter that is displayed on a symbol via an NLP label e.g. [@myParam].
I also have an ilLabel on that symbol, e.g. myProc(), which is a skill procedure within which the myParam cdf parameter is modified. However, I'm having trouble with the changed value of myParam reflecting itself on the symbol's NLP label [@myParam] - even after manual redraws.

Within the skill procedure myProc(), I know I have the right pointer to the current cell instance and I've tried things like:

ilInst~>myPar = "blah"
cdfgData->par1Name->value = "blah"

The first method works but it breaks the Property Editor window (in the bottom left of the Schematic Editor Window). For example I can no longer click on anything in that window or the contents of that window just disappears when I click in it, or some other darn manifestation of hurt.

The 2nd method works in that I can change the value and read it back (in the CIW), but nothing about that updates the NLP label on the symbol - even after a manual redraw.

Anyway, I hope I haven't confused you too much.
I want to change the value of a cdf parameter (myParam) in a skill procedure and see my schematic symbol (which contains an NLP label [@myParam]) update its cells to reflect the changed myParam.

  • Cancel
Parents
  • CADcasualty
    CADcasualty over 6 years ago

    I've just gotten home and reread my post only to discover a couple confusing typos - I can't seem to figure out how to edit my post so please just read this instead and ignore the first post:

    I have a cell that has a cdf parameter that is displayed on a symbol via an NLP label e.g. [@myParam].
    I also have an ilLabel on that symbol, e.g. myProc(), which is a skill procedure within which the myParam cdf parameter is modified. However, I'm having trouble with the changed value of myParam reflecting itself on the symbol's NLP label [@myParam] - even after manual redraws.

    Within the skill procedure myProc(), I know I have the right pointer to the current cell instance and in order to modify myParam I've tried things like:

    ilInst~>myParam = "blah"
    cdfgData->myParam->value = "blah"

    The first method works but it breaks the Property Editor window (in the bottom left of the Schematic Editor Window). For example I can no longer click on anything in that window or the contents of that window just disappears when I click in it, or some other darn manifestation of hurt.

    The 2nd method works in that I can change the value and read it back (even when I type them in the CIW), but nothing about that updates the NLP label on the symbol - even after a manual redraw.

    Is there a robust way to do what I want?

    Addendum -I've since figured out an entirely different way to achieve what I was after in the symbol that no longer requires this technique. However, only because I've invested so much time into the original problem I still wouldn't mind knowing the solution.
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • CADcasualty
    CADcasualty over 6 years ago

    I've just gotten home and reread my post only to discover a couple confusing typos - I can't seem to figure out how to edit my post so please just read this instead and ignore the first post:

    I have a cell that has a cdf parameter that is displayed on a symbol via an NLP label e.g. [@myParam].
    I also have an ilLabel on that symbol, e.g. myProc(), which is a skill procedure within which the myParam cdf parameter is modified. However, I'm having trouble with the changed value of myParam reflecting itself on the symbol's NLP label [@myParam] - even after manual redraws.

    Within the skill procedure myProc(), I know I have the right pointer to the current cell instance and in order to modify myParam I've tried things like:

    ilInst~>myParam = "blah"
    cdfgData->myParam->value = "blah"

    The first method works but it breaks the Property Editor window (in the bottom left of the Schematic Editor Window). For example I can no longer click on anything in that window or the contents of that window just disappears when I click in it, or some other darn manifestation of hurt.

    The 2nd method works in that I can change the value and read it back (even when I type them in the CIW), but nothing about that updates the NLP label on the symbol - even after a manual redraw.

    Is there a robust way to do what I want?

    Addendum -I've since figured out an entirely different way to achieve what I was after in the symbol that no longer requires this technique. However, only because I've invested so much time into the original problem I still wouldn't mind knowing the solution.
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
  • Andrew Beckett
    Andrew Beckett over 6 years ago in reply to CADcasualty

    This sounds a very wrong way to do things, I'm afraid. Updating a property on the instance in a label display function is a bad idea - for a start, it's going to get called every time that component is displayed (even when the schematic is readonly) and it also potentially means that the schematic keeps changing even though you've just done a check and save. That would get very irritating, very quickly.

    Looking at what seems to happen (despite me saying above that this is a very bad idea), it seems to end up in a loop because the change of property is causing a local redraw which is causing the function to be triggered over and over again. So that just confirms my view that this is really a bad thing to do - you've created a sort-of reentrant behaviour.

    Using cdfgData is incorrect because that's only set during the create instance and edit properties form, not during label display.

    I should ask though - why would you want to be modifying the schematic during a label display function?

    Regards,

    Andrew.

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

    Thanks Andrew. The issue at hand here is that I don't really understand what's going on under the hood with Virtuoso when I try some things - to that end I appreciate your explanations to set me straight. I've since thrown the towel in trying to achieve what I wanted via the mechanism in my original post (for good reasons it appears!) and have it working using a completing different method. That being said, it's possible I'm still doing it in a dumb way - I just don't know what I don't know... 

    Even though it's water under the bridge at this point, I was making a cell to display the current going down a leg of my circuit. At the top of the leg I'd place an instance of the cell and fill in parameters to point it to another instance (myParam="mp12") and also the cdsParam number for that instance i.e. 1 for cdsParam(1) which happened to be it's drain current. So if the drain current of mp12 was -37.2u I wanted the symbol to display 2 separate labels:

    mp12(id)
    37.2u

    That same symbol could also display any other aspect of mp12 just by changing the cdsParam number. The actual drain current for mp12 was displayed with an ilLabel "myProc()" which took myParam ("mp12") and the param number and figured out what the drain current was and returned that string. The top label was a little trickier. MyProc() already went through the motions of figuring out the name of mp12's cdsParam(1) by picking apart the "id=-37.2u" text that it contained. I didn't want to have to make yet another procedure for the top label so I thought I'd be "clever" and have myProc() set a hidden cdf parameter to be "id" and so I could make the top label be an NLP label:

    [@myParam]([@myHiddenParam])

    I thought that was pretty smart, until I discovered it was pretty stupid ;-).

    • 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