Detect & delete unconnected nets and grounds

S

spectrallypure

Guest
Dear all,

Here's the situation: I have dozens of schematics which I have altered
using SKILL to replace transistor instances. Due to these
replacements, the schematics have now unconnected nets and grounds,
since the original transistors had bulk terminals and the new ones
don't. I need to remove these unconnected nets and terminals, and
therefore I would be really grateful if somebody could sketch code (or
point me to any references) for doing any of the following:

1. Detecting and deleting unconnected nets in a schematic (merely
"flying" wires in the schematic, with neither ends connected).

2. Detecting and deleting 'one-terminal-unconnected' nets in a
schematic (specifically: wires with one "flying" terminal and the
other terminal connected to a ground symbol instance).

3. Detecting and deleting unconnected ground instances in a schematic
(merely "flying", unconnected grounds symbols--the gnd! ones from
analoglib).

I've just began learning skill; I like it a lot and think I've made
great progress, but I am still far from figuring out how to accomplish
the above chores.

Thanks in advance for any ideas!

Regards,

Jorge Luis.


am in the need of
 
This should do it for the nets

d_cvId = {cellview database object}

dbDeleteObject(
car(
setof( d_net d_cvId~>nets !d_net~>pins )
)
)

Bernd
 
Hi Bernd; thanks a lot for your reply. I tried your code; it runs
without error but unluckily it doesn't remove the flying nets. Here's
what I am doing:

procedure( FixFlyingNets( t_LibName t_CellName )

; open the cellview
d_cvId = dbOpenCellViewByType( t_LibName t_CellName "schematic" nil
"a")

; delete flying nets
dbDeleteObject(
car(
setof( d_net d_cvId~>nets !d_net~>pins )
)
)
; save & exit
dbSave( d_cvId )
dbClose( d_cvId )
) ;procedure

As you can see, I adapted the way to open the cell because I didn't
really understand what you meant by "d_cvId = {cellview database
object}"... do you think this could be the error?

Thanks once again for your kind help.

Regards,

Jorge.
 
On Fri, 16 Nov 2007 10:11:58 -0800 (PST), spectrallypure <jorgelagos@gmail.com>
wrote:

Hi Bernd; thanks a lot for your reply. I tried your code; it runs
without error but unluckily it doesn't remove the flying nets. Here's
what I am doing:

procedure( FixFlyingNets( t_LibName t_CellName )

; open the cellview
d_cvId = dbOpenCellViewByType( t_LibName t_CellName "schematic" nil
"a")

; delete flying nets
dbDeleteObject(
car(
setof( d_net d_cvId~>nets !d_net~>pins )
)
)
; save & exit
dbSave( d_cvId )
dbClose( d_cvId )
) ;procedure

As you can see, I adapted the way to open the cell because I didn't
really understand what you meant by "d_cvId = {cellview database
object}"... do you think this could be the error?

Thanks once again for your kind help.

Regards,

Jorge.
Hmm, Bernd's suggestion is not correct. It will delete the first net it finds
which is not connected to a pin. Since it only deletes the net, the net will get
recreated next time you do a check-and-save, and so most likely you won't see
anything...

You'll need to do something like this:

foreach(net cvId~>nets
unless(net~>instTerms || net~>term
foreach(shape net~>figs
dbDeleteObject(shape)
)
)
)

This was done off the top of my head, and so it _may_ not be correct. I can't
test it right now as I'm in Windows at an airport with no network connection
(how I love BT Openzone; should be called BT Closedzone ;-< )

Regards,

Andrew.
--
Andrew Beckett
Senior Solution Architect
Cadence Design Systems, UK.
 

Welcome to EDABoard.com

Sponsor

Back
Top