Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Net information

15 views
Skip to first unread message

eric.d.fi...@gmail.com

unread,
Apr 7, 2009, 3:49:03 PM4/7/09
to
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

Message has been deleted

Riad KACED

unread,
Apr 7, 2009, 7:11:01 PM4/7/09
to
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.

Linus Torwalds

unread,
Apr 7, 2009, 11:16:49 PM4/7/09
to

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"

eric.d.fi...@gmail.com

unread,
Apr 8, 2009, 9:42:42 AM4/8/09
to

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


Riad KACED

unread,
Apr 8, 2009, 10:40:12 AM4/8/09
to
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.

Message has been deleted

Andrew Beckett

unread,
Apr 15, 2009, 8:19:31 AM4/15/09
to
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.


Riad KACED

unread,
Apr 20, 2009, 3:23:09 AM4/20/09
to
Hi Andrew,

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

Riad.

0 new messages