Guest
All,
I have a Skill program that produces a list and wish to sort the list
by Instance, Cellname, pin or net as user prompts thru a form. The
format of the string is:
"|I11.buff_01.out - net16" Where |I11 is the instance, buff_01.out
the cellname, out is the pin of
the instance and net16
connects to out.
The list looks like
EFNet_list
("|I10.buff_01.in - ckin" "|I10.buff_01.out - net032" "|
I10.buff_01.sub - vss" "|I10.buff_01.vdd - vbat" "|I11.buff_01.in -
ckin_b" "|I11.buff_01.out - net16" "|I11.buff_01.sub - vss" "|
I11.buff_01.vdd - vbat" "|I14.RC_delay.in - p2" "|I14.RC_delay.out -
net021"
)
Upon user input I want to sort by instance or cellname or pin or net.
So if user selects sort by instance |I10, then I need to produce a
list from the above with only the instance chosen and refresh the
form.
In unix I could grep by the instance and pipe the same string into a
file. To be clear, from above the new list needs to have only the
instance chosen but the string is left intact such as:
EFNet_list_sorted
("|I10.buff_01.in - ckin" "|I10.buff_01.out - net032" "|
I10.buff_01.sub - vss" "|I10.buff_01.vdd - vbat"
)
How do I do this in Skill?
Unfinished program is below, but if you bring up a schematic and load
the skill a form should come up with the list.
Thank you in advance for any help,
Eric
procedure(EFCreateNetForm()
let((EFNetsBox EFTermsOrNet )
cv=geGetEditCellView()
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='("|")
; EFNet_list=append(EFNet_list list(strcat(EFInstance "."
EFCellname "." Term " - " Net )))
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)
;=============================================
;section below defines form
;=============================================
EFDualMode = hiCreateRadioField(
?name 'EFDualMode
?prompt "All Data or Sort?"
?value "All Data"
?defValue "All Data"
?choices list("All Data" "Sort by" )
?callback
list("case(EFInstanceNetsForm->EFDualMode->value
(\"All Data\"
EFInstanceNetsForm->EFSortBy->editable = nil
)
(\"Sort by\"
EFInstanceNetsForm->EFSortBy->editable = t
)
)");end case
)
EFSortBy = hiCreateStringField(
?name 'EFSortBy
?prompt "Instance, Net, Cellname or Pin"
?editable nil
?value ""
)
EFNetsBox = hiCreateListBoxField(
?name 'EFListBoxField
?prompt " "
?choices EFNet_list
?value nil
?multipleSelect nil
?changeCB "EFprobe()"
?doubleClickCB "EFprobeinst()"
?numRows length(EFNet_list)
)
;;; defines the form
hiCreateAppForm(
?name 'EFInstanceNetsForm
?formTitle "Instance Nets"
?callback "EFSortExecution()"
?fields
list(
EFDualMode
EFSortBy
EFNetsBox
)
?help ""
) ; hiCreateAppForm
hiDisplayForm(EFInstanceNetsForm)
);procedure
EFCreateNetForm()
I have a Skill program that produces a list and wish to sort the list
by Instance, Cellname, pin or net as user prompts thru a form. The
format of the string is:
"|I11.buff_01.out - net16" Where |I11 is the instance, buff_01.out
the cellname, out is the pin of
the instance and net16
connects to out.
The list looks like
EFNet_list
("|I10.buff_01.in - ckin" "|I10.buff_01.out - net032" "|
I10.buff_01.sub - vss" "|I10.buff_01.vdd - vbat" "|I11.buff_01.in -
ckin_b" "|I11.buff_01.out - net16" "|I11.buff_01.sub - vss" "|
I11.buff_01.vdd - vbat" "|I14.RC_delay.in - p2" "|I14.RC_delay.out -
net021"
)
Upon user input I want to sort by instance or cellname or pin or net.
So if user selects sort by instance |I10, then I need to produce a
list from the above with only the instance chosen and refresh the
form.
In unix I could grep by the instance and pipe the same string into a
file. To be clear, from above the new list needs to have only the
instance chosen but the string is left intact such as:
EFNet_list_sorted
("|I10.buff_01.in - ckin" "|I10.buff_01.out - net032" "|
I10.buff_01.sub - vss" "|I10.buff_01.vdd - vbat"
)
How do I do this in Skill?
Unfinished program is below, but if you bring up a schematic and load
the skill a form should come up with the list.
Thank you in advance for any help,
Eric
procedure(EFCreateNetForm()
let((EFNetsBox EFTermsOrNet )
cv=geGetEditCellView()
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='("|")
; EFNet_list=append(EFNet_list list(strcat(EFInstance "."
EFCellname "." Term " - " Net )))
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)
;=============================================
;section below defines form
;=============================================
EFDualMode = hiCreateRadioField(
?name 'EFDualMode
?prompt "All Data or Sort?"
?value "All Data"
?defValue "All Data"
?choices list("All Data" "Sort by" )
?callback
list("case(EFInstanceNetsForm->EFDualMode->value
(\"All Data\"
EFInstanceNetsForm->EFSortBy->editable = nil
)
(\"Sort by\"
EFInstanceNetsForm->EFSortBy->editable = t
)
)");end case
)
EFSortBy = hiCreateStringField(
?name 'EFSortBy
?prompt "Instance, Net, Cellname or Pin"
?editable nil
?value ""
)
EFNetsBox = hiCreateListBoxField(
?name 'EFListBoxField
?prompt " "
?choices EFNet_list
?value nil
?multipleSelect nil
?changeCB "EFprobe()"
?doubleClickCB "EFprobeinst()"
?numRows length(EFNet_list)
)
;;; defines the form
hiCreateAppForm(
?name 'EFInstanceNetsForm
?formTitle "Instance Nets"
?callback "EFSortExecution()"
?fields
list(
EFDualMode
EFSortBy
EFNetsBox
)
?help ""
) ; hiCreateAppForm
hiDisplayForm(EFInstanceNetsForm)
);procedure
EFCreateNetForm()