Net information

Guest
All,

I am wanting a way to get net information from an instance. So if
pin "in" is connected to "VTX" when it is instantiated, is there a way
to get that info with skill by instance name?

I was playing around with the below skill and it seems the info is not
attainable, but more likely i I am an just an idiot :)

cv=geGetSelectedSet()
cv~>instances~>??

Any and all help would be appreciated!

Thank you,
Eric
 
Hi Eric,

You are nearly there I think.
Instances have got instance Terminals (insTerms attribute). As Andrew
said in a previous post:
"An instance terminal is (as the name suggests) an object that
represents the
connections to a particular terminal on a particular instance. For
example, if
you have two instances, I1 and I2 of a symbol, nand2, with pins A,B
and Z,
then there will be a total of 6 instTerms. Each instTerm indicates
which
instance it belongs to, which terminal it belongs to, and which net is
connected
to that instance terminal"

The following lines would help finding out what you are looking for:
;
procedure( RKconnectivityExample( libName cellName viewName "ttt" )
let((cv)
cv=dbOpenCellViewByType(libName cellName viewName)
when(cv
foreach( inst cv~>instances
printf( "Instance %s:\n" inst~>name )
foreach( instTerm inst~>instTerms
printf( " -> instTerm: \"%s\" is connected to net: \"%s\".
\n"
instTerm~>name instTerm~>net~>name
)
)
)
)
t
)
)
;

Regards,
Riad.
 
Hi Eric,

You are nearly there I think.
Instances have got instance Terminals (insTerms attribute). As Andrew
said in a previous post:
"An instance terminal is (as the name suggests) an object that
represents the connections to a particular terminal on a particular
instance. For example, if you have two instances, I1 and I2 of a
symbol, nand2, with pins A,B and Z, then there will be a total of 6
instTerms. Each instTerm indicates which instance it belongs to, which
terminal it belongs to, and which net is connected to that instance
terminal"
The following lines would help finding out what you are looking for:
;
procedure( RKconnectivityExample( libName cellName viewName "ttt" )
let((cv)
cv=dbOpenCellViewByType(libName cellName viewName)
when(cv
foreach( inst cv~>instances
printf( "Instance %s:\n" inst~>name )
foreach( instTerm inst~>instTerms
printf( " -> instTerm \"%s\" connected to net \"%s\".\n"
instTerm~>name instTerm~>net~>name
)
)
)
)
t
)
)
;

Regards,
Riad.
 
eric.d.fitzsimmons@gmail.com wrote:
All,

I am wanting a way to get net information from an instance. So if
pin "in" is connected to "VTX" when it is instantiated, is there a way
to get that info with skill by instance name?

I was playing around with the below skill and it seems the info is not
attainable, but more likely i I am an just an idiot :)

cv=geGetSelectedSet()
cv~>instances~>??

Any and all help would be appreciated!

Thank you,
Eric
www.LinuxCAD.com

LinuxCAD is today's leading computer aided design and drafting program
for The Linux Operating System.

LinuxCAD has grown in sales and functionality since its original
introduction in 1998.

LinuxCAD now represents a complete computer aided design program for
Linux ... it is a complete replacement for AutoCAD. For any practical
purpose, it implements all major features of AutoCAD in such a way that
experienced AutoCAD users do not need additional training to start
working with LinuxCAD.

Linux users who are new to CAD will find our Users Manual an easy way to
learn the CAD trade. There is so much similarity between LinuxCAD and
AutoCAD, that while learning LinuxCAD, you will simultaneously learn
AutoCAD.

With remarkable ease you will find yourself creating all kinds of
technical illustrations, diagrams, sketches and industrial quality
drawings.

Suggested Uses: flowcharting,land surveying,mechanical drawing ,
architectural drafting, entity relationship diagramming ,software
engineering diagramming.


The demo version of LinuxCAD was addedd to

www.LinuxCAD.com

it is at the very bottom of the front page it says:


"download demo"
 
On Apr 7, 6:11 pm, Riad KACED <riad.ka...@gmail.com> wrote:
Hi Eric,

You are nearly there I think.
Instances have got instance Terminals (insTerms attribute). As Andrew
said in a previous post:
"An instance terminal is (as the name suggests) an object that
represents the connections to a particular terminal on a particular
instance. For example, if you have two instances, I1 and I2 of a
symbol, nand2, with pins A,B and Z, then there will be a total of 6
instTerms. Each instTerm indicates which instance it belongs to, which
terminal it belongs to, and which net is connected to that instance
terminal"
The following lines would help finding out what you are looking for:
;
procedure( RKconnectivityExample( libName cellName viewName "ttt" )
  let((cv)
    cv=dbOpenCellViewByType(libName cellName viewName)
    when(cv
      foreach( inst cv~>instances
        printf( "Instance %s:\n" inst~>name )
        foreach( instTerm inst~>instTerms
          printf( " -> instTerm \"%s\" connected to net \"%s\".\n"
            instTerm~>name instTerm~>net~>name
          )
        )
      )
    )
    t
  )
)
;

Regards,
Riad.
Riad or Other Guru(defined as anyone better at skill than me, so
everyone ;),

procedure( RKconnectivityExample( libName cellName viewName "ttt" )
let((cv)
cv=dbOpenCellViewByType(libName cellName viewName)
when(cv
foreach( inst cv~>instances
printf( "Instance %s:\n" inst~>name )
foreach( instTerm inst~>instTerms
printf( " -> instTerm \"%s\" connected to net \"%s\".\n"
instTerm~>name instTerm~>net~>name
)
)
)
)
t
)
)
RKconnectivityExample("dcdc_ga841_work" "ga841a_01" "layout")

procedure(RKconnectivityExample(fileName @optional (cv
geGetEditCellView()) "td")
let((prt)
unless(prt=outfile(fileName)
error("Could not open %s for writing" fileName)
) ; unless
when(cv
foreach( inst cv~>instances
fprintf(prt "Instance %s:\n" inst~>name )
foreach( instTerm inst~>instTerms
fprintf( prt " -> instTerm \"%s\" connected to net \"%s\".\n"
instTerm~>name instTerm~>net~>name
)
)
)
)
)
)
RKconnectivityExample("./nets2.txt")

The first program is Riad's with a change, I think, to the "dpOpen"
line due to our library manager being different. It works for me just
fine. The second program is not working. I am simply trying to
write out the data to a file, I believe I need to get the equivilant
"cv" but I am not sure how. Meaning, the first program gives the
libName cellName and viewName and the second gives cv
geGetEditCellView. I believe that is why it isn't working, BWDIK.

For starters I want to be able to write out the netnames for layout
and schematic to a file and compare(in unixor tkdiff), I will also
want to write some skill for a selected instance netnames out to a
file.

Thank you for your help in advance,
Eric
 
Hi Eric,

The modified program is aborting because of the argument type template
("td") you have specified at the end of the formal argument list of
the function. The skill interpreter is trying to match the data type
of each actual argument against the template at the time the function
is invoked. As you have specified 2 argument types in your template
and invoked RKconnectivityExample with one argument only, then the
error occurs. Yes, the 2nd argument is optional but it does abort
anyway, that's my understanding anyway. I have no solution for this
but removing the data type template from the function definition. I'm
pretty much sure Andrew has got something to say about this ...

BTW, I have upgraded the function with few more edits to handle the
pins and close the port to properly view the data afterwards.

;
procedure(RKconnectivityExample(fileName @optional (cv
geGetEditCellView()))
let((prt)
unless(prt=outfile(fileName)
error("Could not open %s for writing" fileName)
) ; unless
when(cv
foreach( inst cv~>instances
fprintf(prt "Instance %s:\n" inst~>name )
if( inst~>net
then
fprintf(prt " -> TermName \"%s\" connected to net \"%s\".
\n"
inst~>net~>term~>name inst~>net~>name
)
else
foreach( instTerm inst~>instTerms
fprintf( prt " -> instTerm \"%s\" connected to net \"%s\".
\n"
instTerm~>name instTerm~>net~>name
)
)
)
)
close(prt)
view(get_filename(prt))
)
)
)
;

Cheers,
Riad.
 
On Apr 8, 9:40 am, Riad KACED <riad.ka...@gmail.com> wrote:
Hi Eric,

The modified program is aborting because of the argument type template
("td") you have specified at the end of the formal argument list of
the function. The skill interpreter  is trying to match the data type
of each actual argument against the template at the time the function
is invoked. As you have specified 2 argument types in your template
and invoked RKconnectivityExample with one argument only, then the
error occurs. Yes, the 2nd argument is optional but it does abort
anyway, that's my understanding anyway. I have no solution for this
but removing the data type template from the function definition. I'm
pretty much sure Andrew has got something to say about this ...

BTW, I have upgraded the function with few more edits to handle the
pins and close the port to properly view the data afterwards.

;
procedure(RKconnectivityExample(fileName @optional (cv
geGetEditCellView()))
  let((prt)
    unless(prt=outfile(fileName)
      error("Could not open %s for writing" fileName)
    ) ; unless
    when(cv
      foreach( inst cv~>instances
        fprintf(prt "Instance %s:\n" inst~>name )
        if( inst~>net
          then
          fprintf(prt " -> TermName \"%s\" connected to net \"%s\".
\n"
           inst~>net~>term~>name inst~>net~>name
          )
          else
          foreach( instTerm inst~>instTerms
            fprintf( prt " -> instTerm \"%s\" connected to net \"%s\".
\n"
              instTerm~>name instTerm~>net~>name
            )
          )
        )
      )
      close(prt)
      view(get_filename(prt))
    )
  )
)
;

Cheers,
Riad.
Riad,

Thank you for your help!

I am now trying to make a form and then right a function to highlight
the net from the form callback. I have gotten pretty far but I am
having an issue with making the list for the "listbox" part of the
form.

I wish to have a format
instname.cellname.childterm - net

For instance
I15.Buffer.out - drivernet

I get
I15.Buffer
out - drivernet

How do I get this all on one line? I tried it several ways.....

Thank you in advance for your help,
Eric



procedure(EFCreateNetForm()

let((EFNetsBox EFTermsOrNet )

cv=geGetEditCellView()
EFNet_list=nil
when(cv
foreach( inst cv~>instances
; printf( "Instance %s:\n" inst~>name )
;Capture list of instTerm and net for instance in list
foreach( instTerm inst~>instTerms
; EFNet_list=append(EFNet_list list(strcat(sprintf(nil
"%s" (inst~>name)) "." (inst~>master~>cellName)) "." (instTerm~>name))
" - " (instTerm~>net~>name))
EFNet_list=append(EFNet_list list(strcat(sprintf(nil
"%s" (inst~>name)) "." (inst~>master~>cellName))))
EFNet_list=append(EFNet_list list(strcat(sprintf(nil
"%s" (instTerm~>name)) " - " (instTerm~>net~>name))))
);foreach
);foreach
);when
t
);let

;============================================;section below defines form
;============================================
EFNetsBox = hiCreateListBoxField(
?name 'EFListBoxField
?prompt " "
?choices EFNet_list
; ?value nil
?multipleSelect nil
?doubleClickCB "EFProbe()"
?numRows length(EFNet_list)
)

EFTermsOrNet = hiCreateCyclicField(
?name 'EFUserSelect
?prompt "Terms or Nets"
?value "Nets"
?choices list("Nets"
"Terms")
)

;;; defines the form

hiCreateAppForm(
?name 'EFInstanceNetsForm
?formTitle "Instance Nets"
?callback "EFDeviceTextExecution()"
?fields
list(
EFTermsOrNet
EFNetsBox
)
?help ""

) ; hiCreateAppForm

hiDisplayForm(EFInstanceNetsForm)

);procedure

EFCreateNetForm()
 
Riad KACED wrote, on 04/08/09 15:40:
Hi Eric,

The modified program is aborting because of the argument type template
("td") you have specified at the end of the formal argument list of
the function. The skill interpreter is trying to match the data type
of each actual argument against the template at the time the function
is invoked. As you have specified 2 argument types in your template
and invoked RKconnectivityExample with one argument only, then the
error occurs. Yes, the 2nd argument is optional but it does abort
anyway, that's my understanding anyway. I have no solution for this
but removing the data type template from the function definition. I'm
pretty much sure Andrew has got something to say about this ...
Riad asked for my comments, so...

The second optional argument was defaulting to geGetEditCellView() which will
return a database id (i.e. match the template "d") if there is a window open and
current which contains a cellView. If not, it will return nil, which will fail
the type template test.

You could just have a type template of "tg" and then have a check inside the
code which does something like:

unless(null(cv) || dbobjectp(cv)
error("Don't be an idiot - pass me the right argument type")
)

That said, how's the code going to work unless it has a sensible database id for
the cellView? So it's probably reasonable as is, and you'd just call it with:

RKconnectivityExample("filename" dbOpenCellViewByType(libName cellName viewName))

Regards,

Andrew.
 
Hi Andrew,

Thank you very much indeed for your attention and comments :)

Riad.
 

Welcome to EDABoard.com

Sponsor

Back
Top