• 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. Assigning a net name from schematics

Stats

  • Locked Locked
  • Replies 10
  • Subscribers 148
  • Views 23383
  • 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

Assigning a net name from schematics

bharath2k4er
bharath2k4er over 15 years ago

 Hi All,

 

        Recently i came accross a requirement to assign net names to all the nets from schematics..Is this possible to do in skill..? Pls provide me some inputs to work on..

 

Ex: For an inverter i/p net name is A & o/p is B in sch

                Layout also should have the netname A to the input & B to the output

 

 Thanks,

Bharath. 

  • Cancel
Parents
  • Andrew Beckett
    Andrew Beckett over 15 years ago

    Hi Bharath,

    The way to do this in a schematic is to use schCreateWireLabel. If you just attach nets to wires, or change the name of a net, it will get lost next time you do a "check" operation, so the only sensible way is to label the wires.

    Here's some very old code which uses this approach - hopefully you can get the idea from this. It was to label any unlabelled nets, and was originally done before there was a mode where you could name nets automatically based on what the net was connected to, rather than just the simple "net1", "net2" type approach:

    /* abAddWireLabels.il

    Author A.D.Beckett
    Group Structured Custom, Cadence Design Systems Ltd
    Machine SUN
    Date Nov 29, 1993
    Modified
    By

    Creates wire labels on nets that have been named by
    the extractor. This means that more meaningful names
    can easily be added.

    ***************************************************
    SCCS Info: @(#) abAddWireLabels.il 11/20/08.15:26:10 1.1

    */

    /***************************************************************
    * *
    * (abRankDirection direction) *
    * *
    * Given a direction, return a rank number where the highest *
    * is the most preferred pin direction. *
    * *
    ***************************************************************/

    (procedure (abRankDirection direction)
    (case direction
    ("input" 1)
    ("inputOutput" 2)
    ("output" 3)
    (t 0)))

    /***************************************************************
    * *
    * (abAddWireLabels) *
    * *
    * Automatically add wire labels to a schematic on the nets *
    * which have been named by the extractor *
    * *
    ***************************************************************/

    (procedure (abAddWireLabels @key (prefix "net") (separator "_") (snap 0.0625)
    (height 0.03125) (font "stick")
    (justify "lowerLeft") (orient "R0")
    (cellView nil))
    (let (prefixLength pinCentre inst xy labelText wire bestTerm)
    (setq prefixLength (strlen prefix))
    (unless cellView (setq cellView (geGetEditCellView)))
    (if (lessp (compareTime (dbGetq cellView lastSchematicExtraction)
    (dbGetq cellView instancesLastChanged)) 0)
    (progn
    (hiDisplayAppDBox
    ?name 'abAWLschematicChanged
    ?dboxBanner "Schematic Changed"
    ?dboxText "Schematic has been changed since last extraction"
    ?dialogType hicMessageDialog
    ?buttonLayout 'Close)
    nil)
    (progn
    (foreach net (dbGetq cellView nets)
    (when (zerop (strncmp (dbGetq net name) prefix prefixLength))
    (setq bestTerm nil)
    (foreach term (dbGetq net instTerms)
    (when (greaterp (abRankDirection (dbGetq term direction))
    (abRankDirection (dbGetq bestTerm direction)))
    (setq bestTerm term)))
    (when bestTerm
    (setq pinCentre
    (abGetPinCentre (dbGetq bestTerm term) snap))
    (setq inst (dbGetq bestTerm inst))
    (setq labelText (strcat (dbGetq inst name)
    separator
    (dbGetq bestTerm name)))
    (setq xy (geTransformUserPoint
    pinCentre
    (list (dbGetq inst xy)
    (dbGetq inst orient))))
    (setq xy (list (plus snap (xCoord xy))
    (plus snap (yCoord xy))))
    (setq wire
    (car (dbGetq (dbGetq bestTerm net) figs)))
    (when wire
    (schCreateWireLabel cellView
    wire
    xy
    labelText
    justify
    orient
    font
    height
    nil)
    (foreach label (dbGetq wire children)
    (when (equal (dbGetq label theLabel)
    labelText)
    (dbSetq label t abAutoLabel)
    )))
    )))
    t)
    )))

    /***************************************************************
    * *
    * (abDeleteWireLabels) *
    * *
    * Delete all the labels which have been added automagically *
    * *
    ***************************************************************/

    (procedure (abDeleteWireLabels @key (cellView nil))
    (unless cellView (setq cellView (geGetEditCellView)))
    (foreach shape (dbGetq cellView shapes)
    (when (and (equal (dbGetq shape objType) "label")
    (dbGetq shape abAutoLabel))
    (dbDeleteObject shape)))
    t)
    /**********************************************
    * *
    * find the centre of the pin in question, and *
    * snap it to the grid *
    * *
    **********************************************/

    (procedure (abGetPinCentre term snap)
    (let (centre)
    /* get the centre of the pin */
    (setq centre (centerBox (car (dbGetq (dbGetq
    (dbGetq term pins) inst) bBox))))
    (setq centre (list
    (times (round (quotient (xCoord centre) snap)) snap)
    (times (round (quotient (yCoord centre) snap)) snap)))
    centre))

     

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Andrew Beckett
    Andrew Beckett over 15 years ago

    Hi Bharath,

    The way to do this in a schematic is to use schCreateWireLabel. If you just attach nets to wires, or change the name of a net, it will get lost next time you do a "check" operation, so the only sensible way is to label the wires.

    Here's some very old code which uses this approach - hopefully you can get the idea from this. It was to label any unlabelled nets, and was originally done before there was a mode where you could name nets automatically based on what the net was connected to, rather than just the simple "net1", "net2" type approach:

    /* abAddWireLabels.il

    Author A.D.Beckett
    Group Structured Custom, Cadence Design Systems Ltd
    Machine SUN
    Date Nov 29, 1993
    Modified
    By

    Creates wire labels on nets that have been named by
    the extractor. This means that more meaningful names
    can easily be added.

    ***************************************************
    SCCS Info: @(#) abAddWireLabels.il 11/20/08.15:26:10 1.1

    */

    /***************************************************************
    * *
    * (abRankDirection direction) *
    * *
    * Given a direction, return a rank number where the highest *
    * is the most preferred pin direction. *
    * *
    ***************************************************************/

    (procedure (abRankDirection direction)
    (case direction
    ("input" 1)
    ("inputOutput" 2)
    ("output" 3)
    (t 0)))

    /***************************************************************
    * *
    * (abAddWireLabels) *
    * *
    * Automatically add wire labels to a schematic on the nets *
    * which have been named by the extractor *
    * *
    ***************************************************************/

    (procedure (abAddWireLabels @key (prefix "net") (separator "_") (snap 0.0625)
    (height 0.03125) (font "stick")
    (justify "lowerLeft") (orient "R0")
    (cellView nil))
    (let (prefixLength pinCentre inst xy labelText wire bestTerm)
    (setq prefixLength (strlen prefix))
    (unless cellView (setq cellView (geGetEditCellView)))
    (if (lessp (compareTime (dbGetq cellView lastSchematicExtraction)
    (dbGetq cellView instancesLastChanged)) 0)
    (progn
    (hiDisplayAppDBox
    ?name 'abAWLschematicChanged
    ?dboxBanner "Schematic Changed"
    ?dboxText "Schematic has been changed since last extraction"
    ?dialogType hicMessageDialog
    ?buttonLayout 'Close)
    nil)
    (progn
    (foreach net (dbGetq cellView nets)
    (when (zerop (strncmp (dbGetq net name) prefix prefixLength))
    (setq bestTerm nil)
    (foreach term (dbGetq net instTerms)
    (when (greaterp (abRankDirection (dbGetq term direction))
    (abRankDirection (dbGetq bestTerm direction)))
    (setq bestTerm term)))
    (when bestTerm
    (setq pinCentre
    (abGetPinCentre (dbGetq bestTerm term) snap))
    (setq inst (dbGetq bestTerm inst))
    (setq labelText (strcat (dbGetq inst name)
    separator
    (dbGetq bestTerm name)))
    (setq xy (geTransformUserPoint
    pinCentre
    (list (dbGetq inst xy)
    (dbGetq inst orient))))
    (setq xy (list (plus snap (xCoord xy))
    (plus snap (yCoord xy))))
    (setq wire
    (car (dbGetq (dbGetq bestTerm net) figs)))
    (when wire
    (schCreateWireLabel cellView
    wire
    xy
    labelText
    justify
    orient
    font
    height
    nil)
    (foreach label (dbGetq wire children)
    (when (equal (dbGetq label theLabel)
    labelText)
    (dbSetq label t abAutoLabel)
    )))
    )))
    t)
    )))

    /***************************************************************
    * *
    * (abDeleteWireLabels) *
    * *
    * Delete all the labels which have been added automagically *
    * *
    ***************************************************************/

    (procedure (abDeleteWireLabels @key (cellView nil))
    (unless cellView (setq cellView (geGetEditCellView)))
    (foreach shape (dbGetq cellView shapes)
    (when (and (equal (dbGetq shape objType) "label")
    (dbGetq shape abAutoLabel))
    (dbDeleteObject shape)))
    t)
    /**********************************************
    * *
    * find the centre of the pin in question, and *
    * snap it to the grid *
    * *
    **********************************************/

    (procedure (abGetPinCentre term snap)
    (let (centre)
    /* get the centre of the pin */
    (setq centre (centerBox (car (dbGetq (dbGetq
    (dbGetq term pins) inst) bBox))))
    (setq centre (list
    (times (round (quotient (xCoord centre) snap)) snap)
    (times (round (quotient (yCoord centre) snap)) snap)))
    centre))

     

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
No Data

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