Quantcast
Channel: Cadence Custom IC Skill Forum
Viewing all articles
Browse latest Browse all 5177

Creating aligned array of diffusion contacts

$
0
0

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")
   )

 


Viewing all articles
Browse latest Browse all 5177

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>