techSetTechLibName/ddDeleteObj and LSW

Discussion in 'Cadence' started by Roger Light, Mar 27, 2007.

  1. Roger Light

    Roger Light Guest

    Hi,

    I'm writing some SKILL where I need to copy cell views so I can modify
    them without touching the original. I decided that the friendliest way
    to do this was to create a scratch library, copy to the library and do
    what I need and then delete the library after I'd finished. This is
    great and it works fine, but I have two problems.

    When my code gets to the point of deleting the library using
    ddDeleteObj(), the LSW turns grey and has forgotten which techlib it has
    got open. When I open a layout cell all is well again, but it's a bit
    inconvenient.

    This is all getting called from a menu item in a layout view, but I have
    verified that it does the same when I type the code into the CIW:

    scratchLib = dbCreateLib("scratch")
    techSetTechLibName( scratchLib "mytech" )
    ddDeleteObj( scratchLib )

    Without the call to techSetTechLibName() all is well. I know the techlib
    I had open before, but can't figure out how to make the LSW open it. Any
    suggestions?

    The other problem is terribly tedious :) Each time you use ddDeleteObj
    to delete a library, it leaves a line in the cds.lib:

    #Removed by ddDeleteObj: DEFINE scratch /home/ral/scratch

    As it stands, this means my scratch library is going to leave a huge
    mess in my cds.lib as I'm likely to use this function quite a bit. Is
    there any way to suppress that line or am I going to have to come up
    with a different solution?

    One more thing - I accidently left one too many close parentheses part way
    through my code when I was fixing it up with skill lint. Lint passed it
    with a score of 100 but the CIW quite rightly contained an error
    complaining. Is this a bug or does lint not check for matched
    parentheses?

    Thanks,

    Roger
     
    Roger Light, Mar 27, 2007
    #1
  2. Roger Light

    S. Badel Guest

    When my code gets to the point of deleting the library using
    What if you do the following ? Actually checked, and I do not see the same behavior as you describe,
    I mean, my LSW does not change unless I open a cellview in a window.

    win=hiGetCurrentWindow()

    ....do your stuff....

    hiSetCurrentWindow(win)


    Stéphane
     
    S. Badel, Mar 28, 2007
    #2
  3. Roger Light

    Roger Light Guest

    Hi Stéphane,
    A good suggestion! Alas, that doesn't help - the current window remains
    unchanged so using hiSetCurrentWindow(win) doesn't do anything.

    I think I'm going to have to leave the library in place to prevent
    scrawling over the cds.lib and that makes both problems go away - at the
    price of having an extra library kicking around.

    Cheers,

    Roger
     
    Roger Light, Mar 28, 2007
    #3
  4. It's not a bug. Mismatched parentheses are really a parsing problem, which are
    reported (in the CIW), but aren't really something that SKILL Lint concerns
    itself with. Parsing errors are relatively easy to see - including syntax errors
    - if you do things like (5*) this will be reported by the parser in the CIW.

    SKILL Lint works on the parsed code, and then analyses that for common mistakes
    - but it needs to have parsed it successfully first.

    Regards,

    Andrew.
     
    Andrew Beckett, Apr 19, 2007
    #4
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.