• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Custom IC SKILL
  3. Deleting layout pins with dbDeleteObject does not remove...

Stats

  • Locked Locked
  • Replies 3
  • Subscribers 143
  • Views 4373
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Deleting layout pins with dbDeleteObject does not remove the pins from 'navigator' window

MonsieurCascode
MonsieurCascode over 4 years ago

Hi everyone,

I have created a small skill script to delete all pins in my layout view. I do this by identifying shape~>purpose == 'pin' and use the dbDeleteObject.

I have a minimal working example of the script here (don't mind the name 'delete_nets', it is in fact deleting pins):

procedure(delete_nets(@optional (cv geGetEditCellView()))
foreach(shape cv~>shapes
  if(shape~>purpose == "pin" then
      dbDeleteObject(shape)
  ) ; if
) ;foreach shape
t
)

I tested this out an empty layout view, where I created two pins in my 'M3 pin' layer titled 'test1' and 'test2'. See the 'TwoPins.png' file here:

You can see the two M3 layered pins and the navigator shows a '2' in next to 'Pins'.

When I then run my script and delete the pins I get the following here (See DeletedPins.png):

I do succesfully get rid of the two pins, but they still exist in the navigator.

If I then try to create a third pin called 'test3' the result is this (See CreateNewPin.png):

I do only have one pin, but the navigator shows three pins. Had I deleted the pins by marking them with the mouse and pressing 'delete', they do sucesfully remove from the navigator panel.

I am not really sure what is happening and if I am doing something wrong, but it's quite a nuisance when I use scripts to delete tons of pins.
I have tested the issue in both '6.1.8.500.15' and '6.1.8.500.1' and both show the same result.

Would you have any clue on this issue, or is it worth raising as a case?

  • Cancel
Parents
  • mbracht
    mbracht over 4 years ago

    Hi,

    The purpose attribute of a shape is the purpose of the layer purpose pair - to check whether a shape is a pin shape you need to test the pin attribute. So to get at all pin shapes you go like:
    (setof shape cv~>shapes shape~>pin)

    Moreover a pin is more than just the pin shape, it's made up of four database objects, net, terminal, pin and pin shape. So you need to iterate over the terminals, then find the pins on that terminal and eventually the pin shapes on that pin:
    (foreach term cv~>terminals
       (foreach pin term~>pins
          (foreach fig pin~>figs
             (dbDeleteObject fig)
          )
          (dbDeleteObject pin))
       (dbDeleteObject term))

    This code does not delete the nets - not sure whether that's what you wanted.

    Max

    • Cancel
    • Vote Up +1 Vote Down
    • Cancel
Reply
  • mbracht
    mbracht over 4 years ago

    Hi,

    The purpose attribute of a shape is the purpose of the layer purpose pair - to check whether a shape is a pin shape you need to test the pin attribute. So to get at all pin shapes you go like:
    (setof shape cv~>shapes shape~>pin)

    Moreover a pin is more than just the pin shape, it's made up of four database objects, net, terminal, pin and pin shape. So you need to iterate over the terminals, then find the pins on that terminal and eventually the pin shapes on that pin:
    (foreach term cv~>terminals
       (foreach pin term~>pins
          (foreach fig pin~>figs
             (dbDeleteObject fig)
          )
          (dbDeleteObject pin))
       (dbDeleteObject term))

    This code does not delete the nets - not sure whether that's what you wanted.

    Max

    • Cancel
    • Vote Up +1 Vote Down
    • Cancel
Children
  • MonsieurCascode
    MonsieurCascode over 4 years ago in reply to mbracht

    Hi Max,

    Although I implemented it slightly different, I have something working much better than before. I did not realize the depth to a 'pin' unfortunately.

    The only thing I fail to realize is how to also delete the net in the navigator. Say I create the corresponding pins in an otherwise empty layout view. Pins and nests will be asserted and 'saved' in the navigator. Now I can succesfully remove the shape (the physical pin), and the pin from the database (and conversely from the navigator). Now I also want it to delete the nets related to said pins, as long as they are not existing in other locations.

    To try and make my use-case more clear I will describe it. In our digital-on-top workflow we export LEF files for our analog blocks. The LEF files that could have been exported from Cadence are generated based on a set of CSV files otherplace. So to easy the 'LEF' file generation, I have an Excel sheet that contains all pins and their corresponding location. These pins I draw directly into Cadence and translate the Excel to the corresponding CSV files that generate the LEF file.
    But from time to time, we edit the interface and I wish to automatically wipe all pins in the layout view without removing wires and such and then place the new pins at their new locations; possibly with new net names. This is where my above inquiry comes in.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • mbracht
    mbracht over 4 years ago in reply to MonsieurCascode

    Removing the nets requires just a minor change - you delete the net instead of the terminal that net is on:

    (foreach term cv~>terminals
       (foreach pin term~>pins
          (foreach fig pin~>figs
             (dbDeleteObject fig))              
          (dbDeleteObject pin))
       (dbDeleteObject term~>net))

    Deleting the net will silently delete the terminal along with the net.

    Max

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information