Finding a net name and replacing the Net Expression property Name

Discussion in 'Cadence' started by dinac, Apr 28, 2009.

  1. dinac

    dinac Guest

    Hi all,

    I am trying to find a net name 'VDD' and replace its Net Expression
    property Name for a list of cells in a library

    to find a cell i could use this expression:
    dbFindNetByName(cvID "VDD")

    but i guess, i should use this, to change the property. But i dont get
    it, how to use it.
    schHiNetExprAvailProps()

    Thanks in advance

    Regards
    Dinac
     
    dinac, Apr 28, 2009
    #1
  2. dinac

    Riad KACED Guest

    Hi Dinac,

    I'm not posting a solution for your problem I'm afraid, I could not
    solve it to be honest with you. I have however tried a few things that
    did not work but that might help other experts to get you sorted out.
    I have written a Skill code that searches for the wanted GLOBAL signal
    (not net) and then replaces its net expression. The skill below is
    running smoothly and it reports some changes in the database.
    Nothing's saved however. I don't know why ! I think it is something to
    do with a wrong connectivity manipulation. This is the skill code:
    ;
    procedure( RKrenameNetExpression(libName cellName
    viewName signal newPropName)
    let((cv targetSignal sigNetExprPropVal
    sigNetNewExpr)
    cv=dbOpenCellViewByType(libName cellName viewName nil "a")
    targetSignal=dbFindSigByName(cv signal)
    when(targetSignal && targetSignal~>isGlobal
    printf("The net expresion of Signal %s is: %s\n" signal
    dbGetSigNetExpr(targetSignal))
    sigNetExprPropVal=cadddr(dbParseSigNetExpr(dbGetSigNetExpr
    (targetSignal)))
    sprintf(sigNetNewExpr "[@%s:%s:%s]" newPropName "%"
    sigNetExprPropVal)
    when(sigNetNewExpr && dbIsValidSigNetExpr(sigNetNewExpr)
    dbReplaceSigNetExpr(targetSignal sigNetNewExpr)
    printf("The net expresion of Signal %s is: %s\n" signal
    dbGetSigNetExpr(targetSignal))
    dbSetConnCurrent(cv)
    schCheck(cv)
    dbSave(cv)
    dbClose(cv)
    )
    )
    )
    )
    ;

    I'm looking forward for somebody to shed some light on it. I though I
    had a good understanding of Cadence's connectivity but I'm seriously
    doubting now ...

    Sorry for not helping you :-(
    Regards,
    Riad.
     
    Riad KACED, Apr 29, 2009
    #2
  3. dinac

    dinac Guest

    Hi Riad & other experts,

    Thank you very much for ur reply. This actually gave me an idea on,
    at least, what to search for in the SKILL manual.
    I have re-arranged ur code, in accordance to me . But I see that the
    changes are only temporary, it is not getting updated to the CDBA net
    name, there is no change in the schematic.

    Trying to change the property name from VSS! / VDD! to VSS/VDD
    respectively.


    Thanks a lot all.

    Regards
    Dinac
    ;-------------------------------------------------------------------------------------------------------------
    cvID=dbOpenCellViewByType(view~>lib~>name view~>cell~>name
    "schematic" "" "a")

    procedure(RKrenameNetExpression(cvID)
    foreach( inst cvID~>instances
    sigGnd=dbFindSigByName(cvID "VSS!")
    sigVdd=dbFindSigByName(cvID "VDD!")
    when(sigGnd && sigGnd~>isGlobal
    sigExprGnd=dbParseSigNetExpr(dbGetSigNetExpr(sigGnd))
    propGnd=cadr(dbParseSigNetExpr(dbGetSigNetExpr(sigGnd)))
    printf("The net expresion of Signal GND is: %s, Property Name is: %s
    \n"
    dbGetSigNetExpr(sigGnd) propGnd)
    ) ;when
    when(sigVdd && sigVdd~>isGlobal
    sigExprVdd=dbParseSigNetExpr(dbGetSigNetExpr(sigVdd))
    propVdd=cadr(dbParseSigNetExpr(dbGetSigNetExpr(sigVdd)))
    printf("The net expresion of Signal VDD is: %s, Property Name is: %s
    \n"
    dbGetSigNetExpr(sigVdd) propVdd)
    ) ;when

    sigNetExprGnd=cadddr(dbParseSigNetExpr(dbGetSigNetExpr(sigGnd)))
    sigNetExprVdd=cadddr(dbParseSigNetExpr(dbGetSigNetExpr(sigVdd)))

    sprintf(GndNetNewExpr "[@%s:%s:%s]" "VSS" "%"
    sigNetExprGnd)
    sprintf(VddNetNewExpr "[@%s:%s:%s]" "VDD" "%"
    sigNetExprVdd)

    when(propGnd == "VSS!" && dbIsValidSigNetExpr(GndNetNewExpr)
    dbReplaceSigNetExpr(sigGnd GndNetNewExpr)
    printf("The net expresion of Signal %s \n"
    dbGetSigNetExpr(sigGnd))
    dbSetConnCurrent(cvID)
    ) ;when

    when(propVdd == "VDD!" && dbIsValidSigNetExpr(VddNetNewExpr)
    dbReplaceSigNetExpr(sigVdd VddNetNewExpr)
    printf("The net expresion of Signal is %s\n"
    dbGetSigNetExpr(sigVdd))
    dbSetConnCurrent(cvID)
    ) ;when
    ) ;foreach

    schCheck(cvID)
    dbSave( cvID )
    dbClose( cvID )

    ) ;proc
    ;------------------------------------------------------------------------------------------
     
    dinac, May 7, 2009
    #3
  4. dinac wrote, on 05/07/09 15:25:

    Sorry about the delay - been traveling a lot and still catching up...

    On a schematic, you typically need to change the cdsNetExpr label - because the
    schematic extractor (when you do "check" or "check and save") will create the
    actual net expressions for you. Here's a snippet of some code I have:

    (dbSetq shape "cdsNetExpr()" theLabel)
    (dbReplaceProp shape "netExpression" "NLPExpr"
    (sprintf nil "[@%s:%%:%s]"
    (cadr mapData)
    (car mapData)))
    (dbSetq shape "ILLabel" labelType)

    shape is a variable containing a label - so I'm setting the label to be
    cdsNetExpr() - not necessary if you've already got that. Then you have to set a
    property on the label with the information about the netExpression. The mapData
    variable contains info about the name and the default value of the net
    expression - so the idea is to construct the NLPExpr as : [@varName:%:default!]

    Hope that helps,

    Regards,

    Andrew.
     
    Andrew Beckett, May 27, 2009
    #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.