• 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. Creating aligned array of diffusion contacts

Stats

  • Locked Locked
  • Replies 4
  • Subscribers 144
  • Views 15212
  • 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

Creating aligned array of diffusion contacts

ssarik
ssarik over 10 years ago

Hi,
I am a new SKILL user. As a start point I am trying to make an inverter using ROD.

For diffcons I have created an array of diffcons using rodCreateObj, but when I am trying to align it is giving a warning that it is not a valid ROD object.

Below is the skill code which I have written.

procedure( TrCreateInverterROD2(libName)

   ;-- Create a new layout cellview for the inverter

   newCV = dbOpenCellViewByType(libName "inverterROD2" "layout" "maskLayout" "w") ;;; New layout cell view for the inverter
   invWid = geOpen(?lib libName ?cell "inverterROD2" ?view "layout") ;;; Opening the layout window

   ;-- Delete any object present in the cellview

            geSelectAll() ;;; Select all the objects in the design
            foreach( dbObject geGetSelSet()
                              dbDeleteObject( dbObject)
                   )   ;;; Loop through each of the object and delete them

            ;-- Create required shapes for inveretr in ROD format

   nwell   = rodCreateRect( ?cvId newCV ?name "nwell" ?layer "nwell" ?width 3.4 ?length 3.4 )

   poly    = rodCreateRect( ?cvId newCV ?name "poly" ?layer "poly" ?width 0.4 ?length 5.2   )

   pdiff1  = rodCreateRect( ?cvId newCV ?name "pdiff1" ?layer "pdiff" ?width 1 ?length 2.4  )
            pdiff2  = rodCreateRect( ?cvId newCV ?name "pdiff2" ?layer "pdiff" ?width 1 ?length 2.4  )

            ndiff1  = rodCreateRect( ?cvId newCV ?name "ndiff1" ?layer "ndiff" ?width 1 ?length 1.4  )
            ndiff2  = rodCreateRect( ?cvId newCV ?name "ndiff2" ?layer "ndiff" ?width 1 ?length 1.4  )

            metal0  = rodCreateRect( ?cvId newCV ?name "metal0" ?layer "metal0" ?width 0.4 ?length 0.4 )
            metal1  = rodCreateRect( ?cvId newCV ?name "metal1" ?layer "metal1" ?width 0.5 ?length 2.03 )
            metal2  = rodCreateRect( ?cvId newCV ?name "metal2" ?layer "metal1" ?width 0.5 ?length 1.305)
            metal3  = rodCreateRect( ?cvId newCV ?name "metal3" ?layer "metal1" ?width 0.5 ?length 4.567)

            arrayOfDiffCon0  = rodCreateRect( ?cvId newCV ?name "arrayOfDiffCon0" ?layer "diffcon" ?width 0.5 ?length 0.5
            ?elementsX 1 ?elementsY 3 ?spaceY 0.225 )
            arrayOfDiffCon1  = rodCreateRect( ?cvId newCV ?name "arrayOfDiffCon1" ?layer "diffcon" ?width 0.5 ?length 0.5
            ?elementsX 1 ?elementsY 3 ?spaceX 0.225)
   arrayOfDiffCon2  = rodCreateRect( ?cvId newCV ?name "arrayOfDiffCon2" ?layer "diffcon" ?width 0.5 ?length 0.5
            ?elementsX 1 ?elementsY 2 ?spaceX 0.225 )
            arrayOfDiffCon3  = rodCreateRect( ?cvId newCV ?name "arrayOfDiffCon3" ?layer "diffcon" ?width 0.5 ?length 0.5
            ?elementsX 1 ?elementsY 2 ?spaceX 0.225 )
           
   viag = rodCreateRect( ?cvId newCV ?name "viag" ?layer "viag" ?width 0.4 ?length 0.4 )

            chkBoundary = rodCreateRect( ?cvId newCV ?name "chkBoundary" ?layer (list "chkBoundary" "boundary") ?width 3.4 ?length 5.8)

   ;--- Align the nwell and poly

   rodAlign( ?alignObj    poly
       ?alignHandle "upperLeft"
                      ?refObj      nwell
                      ?refHandle   "upperLeft"
                      ?xSep        1.5
       ?ySep        -0.3
                   )
                  
   ;--- Align the pdffis
   rodAlign( ?alignObj    pdiff2
       ?alignHandle "upperLeft"
                      ?refObj      pdiff1
                      ?refHandle   "upperRight"
                      ?xSep        0.4
       ?ySep        0
                    )  

            ;--- Align the ndiffs
            rodAlign( ?alignObj    ndiff2
       ?alignHandle "upperLeft"
                      ?refObj      ndiff1
                      ?refHandle   "upperRight"
                      ?xSep        0.4
       ?ySep        0
                    )

            ;--- Align poly and pdiff
   rodAlign( ?alignObj    poly
       ?alignHandle "upperLeft"
                      ?refObj      pdiff1
                      ?refHandle   "upperRight"
                      ?ySep        0.2
                      ?xSep     0
                    )

   ;--- Align pdiff and ndiff
   rodAlign( ?alignObj    pdiff1
       ?alignHandle "lowerLeft"
                      ?refObj      ndiff1
                      ?refHandle   "upperLeft"
                      ?ySep        1
                      ?xSep     0
                    )

            ;--- Align output metal line
   rodAlign( ?alignObj    metal3
       ?alignHandle "upperRight"
                      ?refObj      pdiff2
                      ?refHandle   "upperRight"
                      ?ySep        -0.185
                      ?xSep     -0.25
                    )

   ;--- Align source drain metal contacts
   rodAlign( ?alignObj    metal1
       ?alignHandle "upperLeft"
                      ?refObj      pdiff1
                      ?refHandle   "upperLeft"
                      ?ySep        -0.185
                      ?xSep     0.25
                    )

            rodAlign( ?alignObj    metal2
       ?alignHandle "upperLeft"
                      ?refObj      ndiff1
                      ?refHandle   "upperLeft"
                      ?ySep        -0.047
                      ?xSep     0.25
                    )

            ;--- Creating gate connection
   rodAlign( ?alignObj    viag
                      ?alignHandle "lowerCenter"
                      ?refObj      poly
                      ?refHandle   "lowerCenter"
                      ?ySep        1.9
                    )
   rodAlign( ?alignObj    metal0
                      ?alignHandle "centerCenter"
                      ?refObj      viag
                      ?refHandle   "centerCenter"
                    )

   ;--- Creating diffusion connection
      rodAlign( ?alignObj   arrayOfDiffCon0
                      ?alignHandle "lowerLeft"
                      ?refObj         metal3
                      ?refHandle   "lowerLeft"
                      ?ySep        2.4
                      ?xSep     0
                    )


   
   ;--- Align the check boundry
   rodAlign( ?alignObj    chkBoundary
       ?alignHandle "lowerLeft"
                      ?refPoint 0:0
                    )

   ;--- Align nwell with check boundry
   rodAlign( ?alignObj    nwell
       ?alignHandle "lowerLeft"
                      ?refObj      chkBoundary
                      ?refHandle   "lowerLeft"
                      ?ySep        2.4
                      ?xSep     0
                    )
   dbSave(newCV)  
   printf("Done\n")
   )

 

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 10 years ago

    This is because arrayOfDiffCon0 etc contains a list of rod objects - one per rectangle that was created. You can't align (or align to) a list of rod objects - you have to align to a handle of an individual rod object. So you'll need to either create a multi-part rectangle and align that, or align the individual rectangles in the list.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • ssarik
    ssarik over 10 years ago

    Thanks for the reply.

    I changed the diffcon code to the following

    ;--- Creating diffusion connection
          rodAlign( ?alignObj   arrayOfDiffCon0.1
                          ?alignHandle "lowerLeft"
                          ?refObj         metal3
                          ?refHandle   "lowerLeft"
                          ?ySep        2.4
                          ?xSep     0
                        )

    Now I am getting an error stating that there is a syntax error at arrayOfDiffCon0.1

    Thanks,

    Shahbaz

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 10 years ago

    You either need to pass one of the members of the list (e..g car(arrayOfDiffCon0) ) or a rod object - here you're just passing a variable name - and that's an illegal variable name (with a dot in). Maybe you want to use:

    ?alignObj rodGetObj("arrayOfDiffCon0.1" newCV)

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • theopaone
    theopaone over 10 years ago

    This is not valid SKILL syntax: arrayOfDiffCon0.1

    To access a member of a list in SKILL, you can use

    the positional functions (nth or nthelem) - nth(arrayOfDiffCont0)

    the faster ones based on the lisp pointers such as car, cadr, cadar, etc. - car(arrayOfDiffCont0)

    find the ROD object in the database like Andrew's example. - rodGetObj("arrayOfDiffCon0.1" newCV)

    The second one is the fastest.

    Ted

    • 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