Home > Community > Forums > Custom IC SKILL > pCell skill for beginners

Email

* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

 pCell skill for beginners 

Last post Thu, Feb 6 2014 8:52 AM by skillUser. 21 replies.
Started by stuso 12 Jun 2009 07:11 AM. Topic has 21 replies and 21340 views
Page 2 of 2 (22 items) < Previous 1 2
Sort Posts:
  • Wed, Mar 23 2011 4:23 PM

    • NewStudent
    • Not Ranked
    • Joined on Thu, Mar 17 2011
    • Posts 2
    • Points 25
    Re: pCell skill for beginners Reply

    Thanks Andrew. I started with top-down approach with skill rather then bottom-up.I thought it was easier way for me to learn skill coding.

    What I mean by that is :I have written skill code that can generate array and labels from already layed out cell.

    I had few questions regarding this :

    Is there any way I can generate skill code from layout I have? I had this question because I wanted generic way for generating text from lower level layout cells on top level cells.

    Eg : If I have x cell which has 10 - y cells arrayed.I want labels from y cells to be replicated at x level with _1,_2,_3 .

    I know and I already did skill code for this but I need a standard way ( single code) that can do it for any cell array I want .This without hardcoding the labels and pins in my skill script.

    For this reason wanted to check if there is some way I can generate skill code from layout of lower level.This way I can make my standard skill code point to  skill code generated from layout to pass on the pins labels etc. 

    I am really struggling over making standard code for all the array combinations without having hard coded labels or pins.Please suggest me if you have any other better way or idea regarding this.

     

    Thanks,

    Sapna. 

     

    • Post Points: 5
  • Thu, Dec 6 2012 8:52 AM

    Re: pCell skill for beginners Reply

    Hello Lawrence ,

    I would really appreciate if you could take a look at the following code and the errors im getting .

    ; ------------------------------------------------------------------------------

    ; -- Init

    ; ------------------------------------------------------------------------------

    (define (jfet_fno_SKILL p_libname p_cellname) ; (pcDefinePCell

        (list

          (ddGetObj (eval p_libname) (eval p_cellname)) "layout"

        )

       

    ; ------------------------------------------------------------------------------

    ; -- Params

    ; ------------------------------------------------------------------------------

        (

          (W         float       10.0)

          (L          float       10.0)

          (PWpb       float  -0.20)

          (PDNpb            float   0.0)

          (PDPtop           boolean t)

          (PDPext           boolean t)

          (PDNcover   boolean t)

          (CELLHtop   boolean t)

         

        )

     

    ; ------------------------------------------------------------------------------

    ; -- Main

    ; ------------------------------------------------------------------------------

        (let

          (pcMember pcStretchGroup

              stretchOffsetX stretchOffsetY pcLib pcMaster pcInst

              pcTerm pcPin pcPinName pcNet pcTermNet

              pcNetName pcTermNetName pcMosaicInst tpcParameters pcParamProp

              pcStep pcStepX pcStepY pcRepeat pcRepeatX

              pcRepeatY pcIndexX pcIndexY pcLayer pcPurpose

              pcLabelText pcLabelHeight pcPropText pcParamText pcCoords

              pcPathWidth pcPolygonMargin

          )

          (setq pcLib

              (getSGq pcCellView lib)

          )

          (setq pcParameters

              (getSGq

                (getSGq pcCellView parameters) value

              )

          )

         

          (dbReplaceProp pcCellView "viewSubType" "string" "maskLayoutParamCell")

     

    ; -- Init layer names ----------------------------------------------------------

     

          lay_DIFF    = techGetLP(pcLib `("diff"   "drawing"))~>number

          lay_HV            = techGetLP(pcLib `("diff"   "hv"     ))~>number

          lay_POLY    = techGetLP(pcLib `("poly"   "drawing"))~>number

          lay_PWELL   = techGetLP(pcLib `("pwell"  "drawing"))~>number

          lay_NWELL   = techGetLP(pcLib `("nwell"  "drawing"))~>number

          lay_PDN           = techGetLP(pcLib `("nps"    "drawing"))~>number

          lay_PDP           = techGetLP(pcLib `("pps"    "drawing"))~>number

          lay_NSDM    = techGetLP(pcLib `("nsdm"   "drawing"))~>number

          lay_CELLM   = techGetLP(pcLib `("cellm"  "drawing"))~>number

          lay_CELLTX  = techGetLP(pcLib `("celltx" "drawing"))~>number

          lay_CELLH   = techGetLP(pcLib `("cellh"  "drawing"))~>number

          lay_CELLRS  = techGetLP(pcLib `("cellrs" "drawing"))~>number

          lay_CIRPO   = techGetLP(pcLib `("cirpo"  "drawing"))~>number

     

          lay_PIXID   = techGetLP(pcLib `("areaid" "pixel"))    ~>number

     

          lay_M1            = techGetLP(pcLib `("met1"   "drawing"))~>number

          lay_TEXT    = techGetLP(pcLib `("text"   "drawing"))~>number

     

    ; -- Defaults ------------------------------------------------------------------

     

          tech_lib          = "ts018c0702tc_dv"

          Wmax              = 20.0

          Lmax              = 20.0

          cor_size          = 0.15

         

          ref_x             =  0.0

          ref_y             = -L/2

     

    ; -- Init suncells -------------------------------------------------------------

     

          (setq pcMaster_DFM1 (dbOpenCellViewByType tech_lib "DFM1" "symbolic" "maskLayout"))

          (setq pcMaster_TPM1 (dbOpenCellViewByType tech_lib "TPM1" "symbolic" "maskLayout"))

         

         

    ; -- Metal 1 connection --------------------------------------------------------

         

          (setq pcInst

              (dbCreatePolygon pcCellView

                (list lay_M1 "drawing")

                (list

                    (range  ref_x+1.0                           ref_y+2.4+L)

                    (range  ref_x-1.0                           ref_y+2.4+L)

                    (range  ref_x-1.0                           10)

                    (range  ref_x+1.0                           10)

                )

              )

          )

     

          (setq pcInst

              (dbCreatePolygon pcCellView

                (list lay_M1 "drawing")

                (list

                    (range  ref_x+1.0                           ref_y-2.4)

                    (range  ref_x-1.0                           ref_y-2.4)

                    (range  ref_x-1.0                           -10)

                    (range  ref_x+1.0                           -10)

                )

              )

          )

         

    ; -- Contacts ------------------------------------------------------------------

         

          (numb_of_cont   = (round (Wmax/0.47))-1)

         

          (cell_coord     = (range ref_x-numb_of_cont/2.0*0.47 ref_y-2.5))

          (dbCreateParamInst pcCellView pcMaster_DFM1 nil cell_coord "R0" 1  list(

                      list( "column" "integer" numb_of_cont)

          )) 

     

          (cell_coord     = (range ref_x-numb_of_cont/2.0*0.47 ref_y+2.5+L))

          (dbCreateParamInst pcCellView pcMaster_DFM1 nil cell_coord "MX" 1  list(

                      list( "column" "integer" numb_of_cont)

          )) 

     

    ; -- Tap -----------------------------------------------------------------------

         

          (numb_of_cont   = (round ((Lmax+5)/0.47))-1)

         

          (cell_coord     = (range ref_x-(Wmax/2.0+4.0) -Lmax/2-2.5))

          (dbCreateParamInst pcCellView pcMaster_TPM1 nil cell_coord "R0" 1  list(

                      list( "row" "integer" numb_of_cont)

          )) 

     

          (cell_coord     = (range ref_x+(Wmax/2.0+34.0) -Lmax/2-2.5))

          (dbCreateParamInst pcCellView pcMaster_TPM1 nil cell_coord "R0" 1  list(

                      list( "row" "integer" numb_of_cont)

          )) 

     

         

    ; -- Diff ----------------------------------------------------------------------

     

          if((equal PDPext nil)

          then

          ; -- Do not ADD PDP extentions

                PDPext_diff = 0.0

          else

          ; -- ADD PDP extentions

                PDPext_diff = 1.3

          )

     

          (setq pcInst

              (dbCreatePolygon pcCellView

                (list lay_DIFF "drawing")

                (list

                    (range  ref_x+W/2.0                         ref_y+cor_size)

                    (range  ref_x+W/2.0+cor_size                ref_y+0.0)

                    (range  ref_x+Wmax/2.0+PDPext_diff          ref_y+0.0)

                    (range  ref_x+Wmax/2.0+PDPext_diff          ref_y-1.0)

                    (range  ref_x+Wmax/2.0                      ref_y-1.0)

                    (range  ref_x+Wmax/2.0                      ref_y-2.5)

     

                    (range  ref_x-Wmax/2.0                      ref_y-2.5)

                    (range  ref_x-Wmax/2.0                      ref_y-1.0)

                    (range  ref_x-Wmax/2.0-PDPext_diff          ref_y-1.0)

                    (range  ref_x-Wmax/2.0-PDPext_diff          ref_y+0.0)

                    (range  ref_x-W/2.0-cor_size                ref_y+0.0)

                    (range  ref_x-W/2.0                         ref_y+cor_size)

                   

                    (range  ref_x-W/2.0                         ref_y+0.0+L-cor_size)

                    (range  ref_x-W/2.0-cor_size                ref_y+0.0+L)

                    (range  ref_x-Wmax/2.0-PDPext_diff          ref_y+0.0+L)

                    (range  ref_x-Wmax/2.0-PDPext_diff          ref_y+1.0+L)

                    (range  ref_x-Wmax/2.0                      ref_y+1.0+L)

                    (range  ref_x-Wmax/2.0                      ref_y+2.5+L)

     

                    (range  ref_x+Wmax/2.0                      ref_y+2.5+L)

                    (range  ref_x+Wmax/2.0               ref_y+1.0+L)

                    (range  ref_x+Wmax/2.0+PDPext_diff          ref_y+1.0+L)

                    (range  ref_x+Wmax/2.0+PDPext_diff          ref_y+0.0+L)

                    (range  ref_x+W/2.0+cor_size                ref_y+0.0+L)

                    (range  ref_x+W/2.0                         ref_y+0.0+L-cor_size)

                   

                )

              )

          )

         

         

    ; -- PWELL ----------------------------------------------------------------------

      

          (setq pcInst

              (dbCreatePolygon pcCellView

                (list lay_PWELL "drawing")

                (list

     

                    (range  ref_x+PWpb+W/2.0              ref_y+PWpb+cor_size)

                    (range  40.0                                ref_y+PWpb+cor_size)

                    (range  40.0                                0.0-40.0)

                    (range  40.0                          0.0+40.0)

                    (range  -40.0                               0.0+40.0)

                    (range  -40.0                               0.0-40.0)

                    (range  40.0                                0.0-40.0)

                    (range  40.0                                ref_y+PWpb+cor_size)

     

                    (range  ref_x+PWpb+W/2.0                    ref_y+PWpb+cor_size)

                    (range  ref_x+PWpb+W/2.0+cor_size           ref_y+PWpb+0.0)

                    (range  ref_x+PWpb+Wmax/2.0           ref_y+PWpb+0.0)

                    (range  ref_x+PWpb+Wmax/2.0                       ref_y-PWpb-2.5)

     

                    (range  ref_x-PWpb-Wmax/2.0                 ref_y-PWpb-2.5)

                    (range  ref_x-PWpb-Wmax/2.0                 ref_y+PWpb+0.0)

                    (range  ref_x-PWpb-W/2.0-cor_size           ref_y+PWpb+0.0)

                    (range  ref_x-PWpb-W/2.0                  ref_y+PWpb+cor_size)

                   

                    (range  ref_x-PWpb-W/2.0                    ref_y-PWpb+0.0+L-cor_size)

                    (range  ref_x-PWpb-W/2.0-cor_size           ref_y-PWpb+0.0+L)

                    (range  ref_x-PWpb-Wmax/2.0          ref_y-PWpb+0.0+L)

                    (range  ref_x-PWpb-Wmax/2.0                 ref_y+PWpb+2.5+L)

     

                    (range  ref_x+PWpb+Wmax/2.0                 ref_y+PWpb+2.5+L)

                    (range  ref_x+PWpb+Wmax/2.0                       ref_y-PWpb+0.0+L)

                    (range  ref_x+PWpb+W/2.0+cor_size           ref_y-PWpb+0.0+L)

                    (range  ref_x+PWpb+W/2.0                    ref_y-PWpb+0.0+L-cor_size)

                   

                )

              )

          )

     

    ; -- PDN ----------------------------------------------------------------------

         

          if((equal PDNcover t)

          then

          (setq pcInst

              (dbCreatePolygon pcCellView

                (list lay_PDN "drawing")

                (list

                    (range  ref_x+Wmax/2.0+0.3                  ref_y-2.5-0.3)

                    (range  ref_x-Wmax/2.0-0.3                  ref_y-2.5-0.3)

                    (range  ref_x-Wmax/2.0-0.3                  ref_y+2.5+0.3+L)

                    (range  ref_x+Wmax/2.0+0.3                  ref_y+2.5+0.3+L)

                )

              )

          )

          else

          (setq pcInst

              (dbCreatePolygon pcCellView

                (list lay_PDN "drawing")

                (list

     

                    (range  ref_x+PDNpb+W/2.0                   ref_y+PDNpb+cor_size)

                    (range  ref_x+PDNpb+W/2.0+cor_size          ref_y+PDNpb+0.0)

                    (range  ref_x+PDNpb+Wmax/2.0          ref_y+PDNpb+0.0)

                    (range  ref_x+PDNpb+Wmax/2.0          ref_y-PDNpb-2.5)

     

                    (range  ref_x-PDNpb-Wmax/2.0                ref_y-PDNpb-2.5)

                    (range  ref_x-PDNpb-Wmax/2.0                ref_y+PDNpb+0.0)

                    (range  ref_x-PDNpb-W/2.0-cor_size          ref_y+PDNpb+0.0)

                    (range  ref_x-PDNpb-W/2.0                 ref_y+PDNpb+cor_size)

                   

                    (range  ref_x-PDNpb-W/2.0                   ref_y-PDNpb+0.0+L-cor_size)

                    (range  ref_x-PDNpb-W/2.0-cor_size          ref_y-PDNpb+0.0+L)

                    (range  ref_x-PDNpb-Wmax/2.0                ref_y-PDNpb+0.0+L)

                    (range  ref_x-PDNpb-Wmax/2.0                ref_y+PDNpb+2.5+L)

     

                    (range  ref_x+PDNpb+Wmax/2.0          ref_y+PDNpb+2.5+L)

                    (range  ref_x+PDNpb+Wmax/2.0          ref_y-PDNpb+0.0+L)

                    (range  ref_x+PDNpb+W/2.0+cor_size          ref_y-PDNpb+0.0+L)

                    (range  ref_x+PDNpb+W/2.0                   ref_y-PDNpb+0.0+L-cor_size)

                   

                )

              )

          )

          )

     

         

    ; -- PDP ----------------------------------------------------------------------

      

          if((equal PDPtop t)

          then

          (setq pcInst

              (dbCreatePolygon pcCellView

                (list lay_PDP "drawing")

                (list

                    (range  ref_x+Wmax/2.0+0.3+PDPext_diff      ref_y-1.0-0.3)

                    (range  ref_x-Wmax/2.0-0.3-PDPext_diff      ref_y-1.0-0.3)

                    (range  ref_x-Wmax/2.0-0.3-PDPext_diff      ref_y+1.0+0.3+L)

                    (range  ref_x+Wmax/2.0+0.3+PDPext_diff      ref_y+1.0+0.3+L)

                )

              )

          )

          )

     

    ; -- CELLH ----------------------------------------------------------------------

      

          if((equal CELLHtop t)

          then

          (setq pcInst

              (dbCreatePolygon pcCellView

                (list lay_CELLH "drawing")

                (list

                    (range  ref_x+Wmax/2.0+0.3+PDPext_diff+0.15 ref_y-1.0-0.3-0.15)

                    (range  ref_x-Wmax/2.0-0.3-PDPext_diff-0.15 ref_y-1.0-0.3-0.15)

                    (range  ref_x-Wmax/2.0-0.3-PDPext_diff-0.15 ref_y+1.0+0.3+L+0.15)

                    (range  ref_x+Wmax/2.0+0.3+PDPext_diff+0.15 ref_y+1.0+0.3+L+0.15)

                )

              )

          )

          )

     

    ; -- DIFF HV ----------------------------------------------------------------------

      

          (setq pcInst

              (dbCreatePolygon pcCellView

                (list lay_DIFF "hv")

                (list

     

                    (range  40.0                                -40.0)

                    (range  40.0                           40.0)

                    (range  -40.0                                40.0)

                    (range  -40.0                               -40.0)

     

                )

              )

          )    

     

    ; -- CELLM ----------------------------------------------------------------------

      

          (setq pcInst

              (dbCreatePolygon pcCellView

                (list lay_CELLM "drawing")

                (list

     

                    (range  40.0                                -40.0)

                    (range  40.0                           40.0)

                    (range  -40.0                                40.0)

                    (range  -40.0                               -40.0)

     

                )

              )

          )

     

    ; -- CIRPO ----------------------------------------------------------------------

      

          (setq pcInst

              (dbCreatePolygon pcCellView

                (list lay_CIRPO "drawing")

                (list

     

                    (range   40.3                               -40.3)

                    (range   40.3                                40.3)

                    (range  -40.3                                40.3)

                    (range  -40.3                               -40.3)

     

                )

              )

          )

     

    ; -- AREAID PIX ----------------------------------------------------------------------

      

          (setq pcInst

              (dbCreatePolygon pcCellView

                (list lay_PIXID "pixel")

                (list

     

                    (range  40.0                                -40.0)

                    (range  40.0                           40.0)

                    (range  -40.0                                40.0)

                    (range  -40.0                               -40.0)

     

                )

              )

          )

      

    ; -- label ----------------------------------------------------------------------

     

          (cell_coord     = (range ref_x ref_y))

          (dbCreateLabel pcCellView lay_TEXT cell_coord

                (sprintf nil "W=%.3f\nL=%.3f\nPWpb=%.3f\nPDNpb=%.3f\nPDPtop=%L\nPDPext=%L\nPDNcover=%L\nCELLHtop=%L"

                W L PWpb PDNpb PDPtop PDPext PDNcover CELLHtop  )

                "lowerLeft" "R0" "stick" 1)

         

    ; ------------------------------------------------------------------------------

    )

    )

    )

    I tried to load the skill code using

    load("/home/fg3z7q/Desktop/jfet_fno_SKILL.il")

    function jfet_fno_SKILL redefined

    t

    and when i call the function

    jfet_fno_SKILL "fno_ts018_etest" "jfet_fno_SKILL"

    it gives a waring stating that

    *WARNING* Invalid libId - dd:0x19a9bad4

    *WARNING* Invalid view name - nil

    nil

    Here I created a library named fno_ts018_etest and cell view named jfet_fno_SKILL before loading the skill.

    Im a beginer and I appreciate any sort of help regarding this

    Thanks,

    Satish

    • Post Points: 20
  • Mon, Dec 17 2012 5:20 AM

    Re: pCell skill for beginners Reply

    There's a lot of code to try out there to debug this - I took a quick look, but it would be far easier to try it out as is - without your technology file, I'd have to go through and change all the layer/purpose names to something I have.

    So, can you either post the technology file, or if it's not yours to post, can you say which Foundry PDK you're using?

    Regards,

    Andrew.

    • Post Points: 5
  • Mon, Dec 17 2012 8:51 AM

    • ztzg
    • Not Ranked
    • Joined on Fri, Dec 31 2010
    • M&#252;nchen, Bavaria
    • Posts 15
    • Points 225
    Re: pCell skill for beginners Reply
    Hello Satishbabub,

    One thing I noticed is that you commented the pcDefinePCell form to
    replace it with a (define (jfet... ) ...) procedure.

    That is not a bad idea, but is not sufficient; pcDefinePCell has
    "special" evaluation semantics.

    In the code you posted, (list (ddGetObj ...)) won't cause pcCellView to
    be bound in the body. Similarly, the second argument of pcDefinePCell
    is a list of parameters, and cannot be evaluated as a normal expression.

    You should be able to fix that by adding another let() binding with
    "fake" pcell variables around the body. Have a look at the (UNTESTED!)
    solution in the attached file, or http://s.crosstwine.com/spb/05622ef3.

    Cheers, -D


    satishbabub writes:
    > Hello Lawrence ,
    >
    > I would really appreciate if you could take a look at the following code and the errors
    > im getting .
    >
    > ; ------------------------------------------------------------------------------
    > ; -- Init
    > ; ---------------------------------------------------------------------------
    >
    > (define (jfet_fno_SKILL p_libname p_cellname) ; (pcDefinePCell
    http://www.crosstwine.com tel: +49 89 2189 2939 cell: +49 174 3489 428
    • Post Points: 5
  • Wed, Jan 16 2013 4:22 AM

    • AdiBharati
    • Not Ranked
    • Joined on Mon, Nov 26 2012
    • Posts 1
    • Points 5
    Re: pCell skill for beginners Reply

     Thank you so much..

    That did help a lot.

     

    • Post Points: 5
  • Thu, Feb 6 2014 8:44 AM

    • newbee
    • Not Ranked
    • Joined on Fri, Nov 8 2013
    • Posts 1
    • Points 20
    Re: pCell skill for beginners Reply

    I   try  this, but get  the  following  error  message.

    load("/users/bg027204/CADENCE_SKILL/CCSencapRodPcell.il")
    function CCScreateBoxAndLabels redefined
    *WARNING* Invalid libId - nil
    *WARNING* (DB-270205): dbOpenCellViewByType: must specify either a libName or a contextId.
    t

    • Post Points: 20
  • Thu, Feb 6 2014 8:52 AM

    • skillUser
    • Top 10 Contributor
    • Joined on Fri, Sep 19 2008
    • Austin, TX
    • Posts 2,535
    • Points 14,940
    Re: pCell skill for beginners Reply

    Hi,

    First, please read the forum guidelines -  replying to an old post is not a great idea, start a new thread instead.

    However, it would seem that you do not have the library name correct in the code, it needs to be changed to the name of the library that you want to create the PCell(s) in.  Once you correct this the code may work, if the layer names are the same as in the code - otherwise you will need to update these also to match the layer names from your technology.

    Hopefully this will get you working.

    Regards,

    Lawrence.

    • Post Points: 5
Page 2 of 2 (22 items) < Previous 1 2
Sort Posts:
Started by stuso at 12 Jun 2009 07:11 AM. Topic has 21 replies.