• 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. Pin Connection of Two instances in Order

Stats

  • Locked Locked
  • Replies 5
  • Subscribers 143
  • Views 16394
  • 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

Pin Connection of Two instances in Order

mobileee
mobileee over 16 years ago

Hi All, 

I am able to create config view and extracting netlist from the config view in a simpler way. I will put my SKILL code here soon. But suggest me one thing, when ever I am connecting the pins of two instances by skill code ( schCreateWire ) they are getting connected in random order i.e. pin A of instance I0 is getting connected with pin B of I2 instead of getting connected to pin A of I2 . I want to connect the nets of same pins of two insatances ( i.e. pin A of I0 to pin A of I1 ). Please suggest some way to connect the pins properly.

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

    It's very hard to read the code, because the formatting is terrible. Anyway, the key problem is that you are building the array inside a loop:

       a[i] = wireOriginX
        i++
        wireOriginY=(instTermLLY+instTermURY)/2
        a[i] = wireOriginY
        i++

    but the order of the loop is completely dependent on the database - you just have a foreach loop over the instances. That seems a very dangerous and illogical thing to do.

    A far better approach would be to have a function which allowed you to find the coordinates of a particular pin on a particular named instance - something like:

        defun(ABgetPinPositions (cellView)
    	let((positionArray pin)
    	    positionArray=makeTable("pinPositions" nil)
    	    foreach(terminal cellView->terminals
    		pin=car(terminal->pins)
    		when(pin
    		    positionArray[terminal->name]=centerBox(pin~>fig~>bBox)
    		)
    	    )
    	    positionArray
    	)
        ) ; defun getPinPositions
    

    This returns a has of pin positions for a particular master, indexed by pin name. I'd probably then keep a hash of all these hash tables indexed by cellView. You can then look up the location of a particular pin name in a particular cellView, and transform it (using dbTransformPoint) using the transform of the instance of that cellView, and do the same for the other instance and pin you're trying to connect to.

    That way you can then describe your wiring as a set of connections from pin A of I1 to pin B of I2 and so on. No need for any assumed orders of the database.

    Sorry for a not particularly complete example - I wanted to outline the principle. I think your code at the moment has too many assumptions hard coded in - better to try to make it more generic - give  yourself the ability to create wires between pairs of named instance/pin combinations, and you'll find it much easier.

    Regards,

    Andrew.

     

    • Cancel
    • Vote Up +1 Vote Down
    • Cancel
Reply
  • Andrew Beckett
    Andrew Beckett over 16 years ago

    It's very hard to read the code, because the formatting is terrible. Anyway, the key problem is that you are building the array inside a loop:

       a[i] = wireOriginX
        i++
        wireOriginY=(instTermLLY+instTermURY)/2
        a[i] = wireOriginY
        i++

    but the order of the loop is completely dependent on the database - you just have a foreach loop over the instances. That seems a very dangerous and illogical thing to do.

    A far better approach would be to have a function which allowed you to find the coordinates of a particular pin on a particular named instance - something like:

        defun(ABgetPinPositions (cellView)
    	let((positionArray pin)
    	    positionArray=makeTable("pinPositions" nil)
    	    foreach(terminal cellView->terminals
    		pin=car(terminal->pins)
    		when(pin
    		    positionArray[terminal->name]=centerBox(pin~>fig~>bBox)
    		)
    	    )
    	    positionArray
    	)
        ) ; defun getPinPositions
    

    This returns a has of pin positions for a particular master, indexed by pin name. I'd probably then keep a hash of all these hash tables indexed by cellView. You can then look up the location of a particular pin name in a particular cellView, and transform it (using dbTransformPoint) using the transform of the instance of that cellView, and do the same for the other instance and pin you're trying to connect to.

    That way you can then describe your wiring as a set of connections from pin A of I1 to pin B of I2 and so on. No need for any assumed orders of the database.

    Sorry for a not particularly complete example - I wanted to outline the principle. I think your code at the moment has too many assumptions hard coded in - better to try to make it more generic - give  yourself the ability to create wires between pairs of named instance/pin combinations, and you'll find it much easier.

    Regards,

    Andrew.

     

    • Cancel
    • Vote Up +1 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