geAddNetProbe

Discussion in 'Cadence' started by eric.d.fitzsimmons, May 15, 2009.

  1. All,

    I have a script that places nets in a listbox and upon selecting a
    net, I probe the net...

    procedure(EFProbeUserNet()
    geAddNetProbe(EFwindow_number list("y0" "drawing") EFSchSelectnet)
    )

    Everything works fine, except if I have descended in heirarchy, get my
    list and select a net then I get:

    *WARNING* Object C3 does not exist in sky77546_ga852_work ga852f_02e
    schematic

    So, I guess the problem is the window number is tethered to the parent
    heirarchy? Is there anyway around this?

    Thank you in advance!
    Eric
     
    eric.d.fitzsimmons, May 15, 2009
    #1
  2. eric.d.fitzsimmons

    Riad KACED Guest

    Hi Eric,

    I don't know what EFwindow_number and EFSchSelectnet functions are
    like.
    Are you using any of geGetWindowCellView()/geGetEditCellView() in your
    code ? If yes, then keep in mind that these functions behave
    differently when you edit a cell in place.
    You might give more information on your code to help us understanding
    the problem.

    Cheers,
    Riad.
     
    Riad KACED, May 17, 2009
    #2
  3. EFwindow_number=hiGetCurrentWindow() and EFSchSelectnet is the
    variable for the net to be probed in this case.
    With schematic up for the top level, if I edit in place and load this
    code the probe functions with hiGetCurrentWindow() is referencing the
    parent not the edit in place.

    Anyway around this?

    Thank you in advance,
    Eric



    ;Starts Schematic select to allow usage of select commands

    ;hiGetCurrentCmd(hiGetCurrentWindow()) == "Path" On
    geDeselectAll();deselect all on start up
    EFwindow_number=hiGetCurrentWindow()

    cv=geGetEditCellView()

    procedure(EFCreateNetForm()

    let((EFNetsBox EFTermsOrNet )
    EFNet_list=nil
    when(cv
    foreach( inst cv~>instances
    EFInstance=inst~>name
    EFCellname=inst~>master~>cellName
    foreach( instTerm inst~>instTerms
    Term=instTerm~>name
    Net=instTerm~>net~>name
    printf(EFInstance)
    printf(".")
    printf(EFCellname)
    printf(".")
    printf(Term)
    printf(" - ")
    printf(Net)
    printf("\n")

    EFNet_list=append(EFNet_list list(strcat(EFInstance "."
    EFCellname "." Term " - " Net )))

    );foreach
    );foreach
    );when
    t
    );let

    ;sort the output
    EFNet_list=sort(EFNet_list nil)

    ;==========addition for pins
    PIN="PIN"
    when(cv
    foreach( inst cv~>instances
    if(rexMatchp(PIN inst~>name)
    then EFCellPin=inst~>name
    );if
    if( inst~>net
    then
    EFTermName=inst~>net~>term~>name
    EFPinNetName=inst~>net~>name
    EFNet_list=append(EFNet_list list(strcat(EFCellPin "." PIN
    "." EFTermName " - " EFPinNetName )))
    );if
    );foreach
    );when
    ;==============end pin addition

    ;=============================================
    ;section below defines form
    ;=============================================

    EFDualMode = hiCreateRadioField(
    ?name 'EFDualMode
    ?prompt "Sort data by?"
    ?value "None"
    ?defValue "None"
    ?choices list("None" "Instance" "Cellname" "InstTerm" "Net")
    ?callback
    list("case(EFInstanceNetsForm->EFDualMode->value
    (\"None\"
    EFInstanceNetsForm->EFSortBy->editable = nil
    )
    (\"Instance\"
    EFInstanceNetsForm->EFSortBy->editable = t
    )
    (\"Cellname\"
    EFInstanceNetsForm->EFSortBy->editable = t
    )
    (\"InstTerm\"
    EFInstanceNetsForm->EFSortBy->editable = t
    )
    (\"Net\"
    EFInstanceNetsForm->EFSortBy->editable = t
    )
    )");end case
    )

    EFSortBy = hiCreateStringField(
    ?name 'EFSortBy
    ?prompt "Instance, Net, Cellname or InstTerm"
    ?editable nil
    ?value ""
    )

    EFSelectOrProbe = hiCreateRadioField(
    ?name 'EFSelectOrProbe
    ?prompt "Probe or Schematic Select"
    ?value "Probe"
    ?defValue "Probe"
    ?choices list("Probe" "Select")
    )

    EFDataSingleClick = hiCreateRadioField(
    ?name 'EFDataSingleClick
    ?prompt "Data type to perform Probe or Select"
    ?value "Instance"
    ?defValue "Instance"
    ?choices list("Instance" "Cellname" "InstTerm" "Net")
    )

    EFDeselectCurr = hiCreateButtonBoxField(
    ?name 'EFDeselectCurr
    ?prompt " "
    ?choices '("Deselect Current" "Deselect All" "Previous List"
    "Auto Sort")
    ?callback '("EFDeselectCurrentCB()" "EFDeselectAllCB()"
    "EFPrevious_listCB()" "EFAutoSortCB()")
    )

    EFNetsBox = hiCreateListBoxField(
    ?name 'EFListBoxField
    ?prompt " "
    ?choices EFNet_list
    ?value nil
    ?multipleSelect nil
    ?changeCB "EFprobe()"
    ?doubleClickCB "EFprobeandzoom()"
    ?CBOnReselect t
    ?numRows length(EFNet_list)
    )

    ;;; defines the form

    hiCreateAppForm(
    ?name 'EFInstanceNetsForm
    ?formTitle "Instance Viewer. Data Format:Instance.Cellname.Term
    (Pin) - Net Name"
    ?callback "EFSortExecutionCB(hiGetCurrentForm())"
    ?fields
    list(
    EFDualMode
    EFSortBy
    EFSelectOrProbe
    EFDataSingleClick
    EFDeselectCurr
    EFNetsBox
    )
    ?help ""

    ) ; hiCreateAppForm

    hiDisplayForm(EFInstanceNetsForm)

    );procedure
    EFCreateNetForm()
    ;=================================================================
    ;After Form is up and All data is listed in list box, accept input
    ;for a sort. Create new forms for each. Use hiGetCurrentform on all.
    ;=================================================================

    procedure(EFSortExecutionCB(form)

    let((EFSortByans EFInstanceToSortBy EFCellnameToSortBy EFPinToSortBy
    EFNetToSortBy)

    EFSortByans=form->EFDualMode->value

    if(EFSortByans=="None"
    then EFSortByNoneForm()
    );if

    if(EFSortByans=="Instance"
    then EFInstanceToSortBy=form->EFSortBy->value
    EFSortByInstanceForm()
    );if

    if(EFSortByans=="Cellname"
    then EFCellnameToSortBy=form->EFSortBy->value
    EFSortByCellnameForm()
    );if

    if(EFSortByans=="InstTerm"
    then EFPinToSortBy=form->EFSortBy->value
    EFSortByPinForm()
    );if

    if(EFSortByans=="Net"
    then EFNetToSortBy=form->EFSortBy->value
    EFSortByNetForm()
    );if


    );let
    );procedure

    procedure(EFAutoSortCB()
    if(EFInstanceNetsForm->EFListBoxField->value==nil
    then printf("You have the form filled out wrong. You must have
    something selected in list box and sort data can not be none...\n")
    else EFAutoSortExecution()
    )
    )

    procedure(EFAutoSortExecution()

    let((EFSortByans EFInstanceToSortBy EFCellnameToSortBy EFPinToSortBy
    EFNetToSortBy)
    ;============================get instance, cellname, InstTerm, and
    Net===================
    ;==================Inst
    EFInstanceToSortBy=nil
    EFInstanceToSortBy=car(parseString(car(parseString(car
    (EFInstanceNetsForm->EFListBoxField->value) "."))))
    ;==================Cell
    EFCellnameToSortBy=nil
    EFCellnameToSortBy=cadr(parseString(car(EFInstanceNetsForm-
    ;==================Pin
    EFPinToSortBy=nil
    EFPinOne=nil
    EFPinOne=append(EFPinOne list(car(parseString(car(EFInstanceNetsForm-
    EFPinTwo=nil
    EFPinTwo=cdr(parseString(car(EFPinOne) "."))
    EFPinThree=nil
    EFPinThree=cdr(EFPinTwo)
    EFPinFour=nil
    EFPinToSortBy=car(EFPinThree)
    ;==================net
    EFNetToSortBy=nil
    EFNetToSortBy=cadr(parseString(car(EFInstanceNetsForm->EFListBoxField-
    EFSortByans=EFInstanceNetsForm->EFDualMode->value

    if(EFSortByans=="None"
    then EFSortByNoneForm()
    );if

    if(EFSortByans=="Instance"
    then EFSortByInstanceForm()
    );if

    if(EFSortByans=="Cellname"
    then EFSortByCellnameForm()
    );if

    if(EFSortByans=="InstTerm"
    then EFSortByPinForm()
    );if

    if(EFSortByans=="Net"
    then EFSortByNetForm()
    );if


    );let
    );procedure

    procedure(EFSortByInstanceForm()
    print("Here is EFSortByInstanceForm")
    printf("\n")
    let((EFNetsBox EFTermsOrNet EFInstanceVar)
    EFPrevNet_list=nil
    EFPrevNet_list=EFNet_list
    EFNet_list=nil
    when(cv
    foreach( inst cv~>instances
    EFInstance=inst~>name
    EFCellname=inst~>master~>cellName
    foreach( instTerm inst~>instTerms
    Term=instTerm~>name
    Net=instTerm~>net~>name
    if(EFInstanceToSortBy==nil
    then EFNet_list=append(EFNet_list list(strcat(EFInstance "."
    EFCellname "." Term " - " Net )))

    );if

    if(EFInstanceToSortBy==EFInstance
    then EFNet_list=append(EFNet_list list(strcat(EFInstance "."
    EFCellname "." Term " - " Net )))

    );if

    );foreach
    );foreach
    );when
    t
    );let

    ;sort the output
    EFNet_list=sort(EFNet_list nil
    )
    ;==========addition for pins
    PIN="PIN"
    when(cv
    foreach( inst cv~>instances
    if(rexMatchp(PIN inst~>name)
    then EFCellPin=inst~>name
    );if
    if( inst~>net
    then
    EFTermName=inst~>net~>term~>name
    EFPinNetName=inst~>net~>name
    if(EFInstanceToSortBy==EFCellPin
    then
    EFNet_list=append(EFNet_list list(strcat(EFCellPin "." PIN "."
    EFTermName " - " EFPinNetName )))
    );if
    );if
    );foreach
    );when
    ;==============end pin addition
    EFInstanceNetsForm->EFListBoxField->choices=EFNet_list

    )

    procedure(EFSortByCellnameForm()

    let((EFNetsBox EFTermsOrNet EFInstanceVar)
    EFPrevNet_list=nil
    EFPrevNet_list=EFNet_list
    EFNet_list=nil
    when(cv
    foreach( inst cv~>instances
    EFInstance=inst~>name
    EFCellname=inst~>master~>cellName
    foreach( instTerm inst~>instTerms
    Term=instTerm~>name
    Net=instTerm~>net~>name
    if(EFCellnameToSortBy==nil
    then EFNet_list=append(EFNet_list list(strcat(EFInstance "."
    EFCellname "." Term " - " Net )))

    );if

    if(EFCellnameToSortBy==EFCellname
    then EFNet_list=append(EFNet_list list(strcat(EFInstance "."
    EFCellname "." Term " - " Net )))

    );if

    );foreach
    );foreach
    );when
    t
    );let

    ;sort the output
    EFNet_list=sort(EFNet_list nil)
    ;==========addition for pins
    PIN="PIN"
    when(cv
    foreach( inst cv~>instances
    if(rexMatchp(PIN inst~>name)
    then EFCellPin=inst~>name
    );if
    if( inst~>net
    then
    EFTermName=inst~>net~>term~>name
    EFPinNetName=inst~>net~>name
    if(EFCellnameToSortBy==PIN
    then
    EFNet_list=append(EFNet_list list(strcat(EFCellPin "." PIN
    "." EFTermName " - " EFPinNetName )))
    );if
    );if
    );foreach
    );when
    ;==============end pin addition
    EFInstanceNetsForm->EFListBoxField->choices=EFNet_list

    )

    procedure(EFSortByPinForm()

    let((EFNetsBox EFTermsOrNet EFInstanceVar)
    EFPrevNet_list=nil
    EFPrevNet_list=EFNet_list
    EFNet_list=nil
    printf(EFPinToSortBy)
    when(cv
    foreach( inst cv~>instances
    EFInstance=inst~>name
    EFCellname=inst~>master~>cellName
    foreach( instTerm inst~>instTerms
    Term=instTerm~>name
    Net=instTerm~>net~>name
    if(EFPinToSortBy==Term
    then EFNet_list=append(EFNet_list list(strcat(EFInstance "."
    EFCellname "." Term " - " Net )))

    );if

    );foreach
    );foreach
    );when
    t
    );let

    ;sort the output
    EFNet_list=sort(EFNet_list nil)
    ;==========addition for pins
    PIN="PIN"
    when(cv
    foreach( inst cv~>instances
    if(rexMatchp(PIN inst~>name)
    then EFCellPin=inst~>name
    );if
    if( inst~>net
    then
    EFTermName=inst~>net~>term~>name
    EFPinNetName=inst~>net~>name
    if(EFPinToSortBy==EFTermName
    then
    EFNet_list=append(EFNet_list list(strcat(EFCellPin "." PIN
    "." EFTermName " - " EFPinNetName )))
    );if
    );if
    );foreach
    );when
    ;==============end pin addition

    EFInstanceNetsForm->EFListBoxField->choices=EFNet_list

    )

    procedure(EFSortByNetForm()

    let((EFNetsBox EFTermsOrNet EFInstanceVar)
    EFPrevNet_list=nil
    EFPrevNet_list=EFNet_list
    EFNet_list=nil
    when(cv
    foreach( inst cv~>instances
    EFInstance=inst~>name
    EFCellname=inst~>master~>cellName
    foreach( instTerm inst~>instTerms
    Term=instTerm~>name
    Net=instTerm~>net~>name
    if(EFNetToSortBy==nil
    then EFNet_list=append(EFNet_list list(strcat(EFInstance "."
    EFCellname "." Term " - " Net )))

    );if

    if(EFNetToSortBy==Net
    then EFNet_list=append(EFNet_list list(strcat(EFInstance "."
    EFCellname "." Term " - " Net )))

    );if

    );foreach
    );foreach
    );when
    t
    );let

    ;sort the output
    EFNet_list=sort(EFNet_list nil)
    ;==========addition for pins
    PIN="PIN"
    when(cv
    foreach( inst cv~>instances
    if(rexMatchp(PIN inst~>name)
    then EFCellPin=inst~>name
    );if
    if( inst~>net
    then
    EFTermName=inst~>net~>term~>name
    EFPinNetName=inst~>net~>name
    if(EFNetToSortBy==EFPinNetName
    then
    EFNet_list=append(EFNet_list list(strcat(EFCellPin "." PIN
    "." EFTermName " - " EFPinNetName )))
    );if
    );if
    );foreach
    );when
    ;==============end pin addition

    EFInstanceNetsForm->EFListBoxField->choices=EFNet_list

    )

    procedure(EFSortByNoneForm()

    let((EFNetsBox EFTermsOrNet EFInstanceVar)
    EFPrevNet_list=nil
    EFPrevNet_list=EFNet_list
    EFNet_list=nil
    when(cv
    foreach( inst cv~>instances
    EFInstance=inst~>name
    EFCellname=inst~>master~>cellName
    foreach( instTerm inst~>instTerms
    Term=instTerm~>name
    Net=instTerm~>net~>name
    EFNet_list=append(EFNet_list list(strcat(EFInstance "." EFCellname
    "." Term " - " Net )))
    );foreach
    );foreach
    );when
    t
    );let

    ;sort the output
    EFNet_list=sort(EFNet_list nil)
    ;==========addition for pins
    PIN="PIN"
    when(cv
    foreach( inst cv~>instances
    if(rexMatchp(PIN inst~>name)
    then EFCellPin=inst~>name
    );if
    if( inst~>net
    then
    EFTermName=inst~>net~>term~>name
    EFPinNetName=inst~>net~>name
    EFNet_list=append(EFNet_list list(strcat(EFCellPin "." PIN
    "." EFTermName " - " EFPinNetName )))

    printf(EFCellPin)
    printf("\n")
    );if
    );foreach
    );when
    ;==============end pin addition

    EFInstanceNetsForm->EFListBoxField->choices=EFNet_list

    )


    ;=========User presses Deselect Current button, find if they are using
    probe or
    ;=========Schematic Select and call procedure to get varsand goto
    procedures to
    ;=========delete
    procedure(EFDeselectCurrentCB()

    if(EFInstanceNetsForm->EFSelectOrProbe->value=="Probe"
    then
    EFDeselectProbe()
    );if

    if(EFInstanceNetsForm->EFSelectOrProbe->value=="Select"
    EFDeselectSchem()
    );if

    );procedure
     
    eric.d.fitzsimmons, May 18, 2009
    #3
  4. EFwindow_number is hiGetCurrentWindow() and EFSchSelectnet is a
    variable for the net to be probed in this case.

    I have found a solution. geGetInstHier( getCurrentWindow( ) ) will
    give me the path(such as /I91/I4/), so I just needed to add this info
    to my net(I91/I4/net09 or whatever)

    Thank you!
    Eric
     
    eric.d.fitzsimmons, May 18, 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.
Similar Threads
There are no similar threads yet.
Loading...