Home > Community > Forums > Custom IC SKILL > Re: Problem with XStream out and customized pcell

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: *

 Re: Problem with XStream out and customized pcell 

Last post Wed, Sep 26 2012 1:19 PM by Andrew Beckett. 5 replies.
Started by slim5 24 Sep 2010 08:34 AM. Topic has 5 replies and 1862 views
Page 1 of 1 (6 items)
Sort Posts:
  • Fri, Sep 24 2010 8:34 AM

    • slim5
    • Not Ranked
    • Joined on Thu, Sep 23 2010
    • Posts 16
    • Points 305
    Re: Problem with XStream out and customized pcell Reply

    Hi,

     

      I have created a customized pcell that generates layout blocks and it generates the correct layers and etc in the layout view. Unfortunately, XStream refuses to stream it out and returns error 211. Below is the error message:

     ERROR (211): Pcell evaluation has failed. This is because of either a syntax error or the usage of an unsupported XStream function in Pcell SKILL code. For more information refer to the standard output or CDS.log. To continue, either specify the ignorePcellEvalFail option in Stream In/Out options or correct the Pcell SILL code.

      The problem appear to be that XStream does not "see" the procedures that are defined in the pcell's SKILL code (see below for the SKILL code). I loaded the SKILL code by typing load("./MySubContact_SKill.il") in the Virtuoso/ICFB window and had the impression that the procedures (MY_ViaRepeat and MYDrawRect) were to be available for every commands thereafter. Any suggestions as to how I can solve this would be greatly appreciated. Thank you!

     

    Regards,

    Su Lim

    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;                                                                            ;;
    ;; Procedures for Making Replicates in X & Y direction (center)               ;;
    ;;                                                                            ;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    procedure( MY_ViaRepeat(
                 MY_min_Size_Via
                 MY_Pitch_X_Via
                 MY_Pitch_Y_Via
                 MY_min_Space_Via
                 MY_X_Size
                 MY_Y_Size
                 MY_Layer
                 MY_Purpose)

      pcStepX = pcStepY = 0
      pcStepX = car(errset(MY_Pitch_X_Via) )
      pcStepY = car(errset(MY_Pitch_Y_Via) )
      pcStepX = MY_Pitch_X_Via
      pcStepY = MY_Pitch_Y_Via


      ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
      ;;                                                                        ;;
      ;; Determine the number of vias to repeate                                ;;
      ;;                                                                        ;;
      ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
      pcRepeatX = pcFix((MY_X_Size + MY_Pitch_X_Via - MY_min_Size_Via - MY_min_Space
    _Via)/MY_Pitch_X_Via)
      pcRepeatY = pcFix((MY_Y_Size + MY_Pitch_Y_Via - MY_min_Size_Via - MY_min_Space
    _Via)/MY_Pitch_Y_Via)


      ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
      ;;                                                                        ;;
      ;; Make sure # of vias is more than 1x1 and have some space left over on  ;;
      ;; the edges                                                              ;;
      ;;                                                                        ;;
      ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
      MY_end2end_X_Via =
         ((pcRepeatX - 1)*MY_Pitch_X_Via + MY_min_Size_Via + MY_min_Space_Via)
      MY_end2end_Y_Via =
         ((pcRepeatY - 1)*MY_Pitch_Y_Via + MY_min_Size_Via + MY_min_Space_Via)

      if( (pcRepeatX > 1) then
        if( (MY_X_Size <= MY_end2end_X_Via ) then
          pcRepeatX = pcRepeatX - 1
        ) ; End-if
      else
        pcRepeatX = 1
      ) ; End-if

      if( (pcRepeatY > 1) then
        if( (MY_Y_Size <= MY_end2end_Y_Via ) then
          pcRepeatY = pcRepeatY - 1
        ) ; End-if
      else
        pcRepeatY = 1
      ) ; End-if

      ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
      ;;                                                                        ;;
      ;; Calculate Via's offset for centre positioning                          ;;
      ;;                                                                        ;;
      ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
      MY_min_X_Via_offset = (pcRepeatX - 1)*MY_Pitch_X_Via/2
      MY_min_Y_Via_offset = (pcRepeatY - 1)*MY_Pitch_Y_Via/2

      ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
      ;;                                                                        ;;
      ;; For loops to draw vias in X and Y Directions                           ;;
      ;;                                                                        ;;
      ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
      for(pcIndexX 0 (pcRepeatX - 1)
        for(pcIndexY 0 (pcRepeatY - 1)


          MY_IncrementX = pcIndexX*pcStepX
          MY_IncrementY = pcIndexY*pcStepY
          LowerX = -MY_min_Size_Via/2 - MY_min_X_Via_offset + MY_IncrementX
          LowerY = -MY_min_Size_Via/2 - MY_min_Y_Via_offset + MY_IncrementY
          UpperX =  MY_min_Size_Via/2 - MY_min_X_Via_offset + MY_IncrementX
          UpperY =  MY_min_Size_Via/2 - MY_min_Y_Via_offset + MY_IncrementY

           pcInst = dbCreateRect(
                     pcCellView
                     list(MY_Layer MY_Purpose)
                     list((LowerX:LowerY) (UpperX:UpperY))
                   ) ;End-dbCreateRect
        ) ;End-for-loop
      ) ;End-for-loop

    ) ;End-Procedure

    ;; fprintf(stdout "pcRepeatY = %L \n" pcRepeatY)

    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;                                                                            ;;
    ;; Procedures for drawing scalable rectangle                                  ;;
    ;;                                                                            ;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    procedure( MYDrawRect(
                 MY_min_X_Size
                 MY_min_Y_Size
                 MY_X_Size
                 MY_Y_Size
                 MY_Layer
                 MY_Purpose)
     
      MY_min_X_Size = MY_min_X_Size/2
      MY_min_Y_Size = MY_min_Y_Size/2
      MY_X_Size = MY_X_Size
      MY_Y_Size = MY_Y_Size
     
      pcInst = dbCreateRect(
                 pcCellView
                 list( MY_Layer MY_Purpose)
                 list( ((-MY_min_X_Size - MY_X_Size):(-MY_min_Y_Size - MY_Y_Size))
                       (( MY_min_X_Size + MY_X_Size):( MY_min_Y_Size + MY_Y_Size))
                     ) ; End-list
               ) ; End-dBCreateRect

    ) ; End-procedure

    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    pcDefinePCell(
      list(ddGetObj("RangingRadar") "stl_MySubContact" "layout")
      (
        (Height float 0.56)
        (Width float 0.56)
      ) ; End of parameters
     
      let(
        (Width Widthoffset Height Heightoffset
         pcParamProp pcLayer pcPurpose
        ) ; End of local variables
     
      pcCellView~>lib
      pcParameters = ((pcCellView~>parameters)~>value)
      ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
      pcParamProp = car(exists(prop pcParameters ((prop~>name) == "Height")) )
      Height = (pcParamProp~>value)
      if(((pcParamProp~>valueType) == "boolean")
        (Height = (Height == "TRUE"))
      )
      ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
      pcParamProp = car(exists(prop pcParameters ((prop~>name) == "Width")) )
      Width = (pcParamProp~>value)
      if(((pcParamProp~>valueType) == "boolean")
        (Width = (Width == "TRUE"))
      )
      ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
      if( (Width < 0.56) then
        (Width = 0.56)
      )
      if((Height < 0.56) then
        (Height = 0.56)
      )
     
      Widthoffset = ((Width - 0.56) / 2)
      Heightoffset = ((Height - 0.56) / 2)
     
     ;; cvID = deGetCellView()
      tfID = techGetTechFile(pcCellView)

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

      pcPurpose = "drawing"
      MetalLayers  = list("M1" "RX" "BP")
      MinDimension = list(0.24 0.28 0.56)

      ViasList = list("CA")
      MinMetalViaSpacing = list(0.40)   ; in both positive and negative direction
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;                                                                            ;;
    ;; For repeating Vias                                                         ;;
    ;;                                                                            ;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
      x = 0
      foreach( Current_Via ViasList
        x = x+1
        pcLayer       = techGetLayerNum(tfID Current_Via)
        min_Size_Via  = techGetSpacingRule(tfID "minWidth" Current_Via)
        min_Space_Via = techGetSpacingRule(tfID "minSpacing" Current_Via)
        Pitch_Via     = min_Space_Via + min_Size_Via
        min_Metal_Via_Spacing = nthelem( x MinMetalViaSpacing)
        MY_ViaRepeat( min_Size_Via Pitch_Via Pitch_Via
                          min_Metal_Via_Spacing Width Height pcLayer pcPurpose)
      ) ;end-foreach
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;                                                                            ;;
    ;; Draw scalable metal layers listed in varialbe MetalLayers                  ;;
    ;;                                                                            ;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
        x = 0
        foreach( Current_MetalLayer MetalLayers
          x = x+1
          min_X_Metal = nthelem( x MinDimension)
          min_Y_Metal = nthelem( x MinDimension)
          pcLayer     = techGetLayerNum(tfID Current_MetalLayer)
          MYDrawRect( min_X_Metal min_Y_Metal Widthoffset Heightoffset
                          pcLayer pcPurpose)
        ) ;end-foreach

          ;; min_X_Metal = min_Y_Metal =
          ;;  techGetSpacingRule(tfID "minWidth" Current_MetalLayer)
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
      ) ; End-let
    ) ; End-pcDefinePCell

    • Post Points: 20
  • Fri, Sep 24 2010 11:55 AM

    • skillUser
    • Top 10 Contributor
    • Joined on Fri, Sep 19 2008
    • Austin, TX
    • Posts 2,570
    • Points 15,605
    Re: Problem with XStream out and customized pcell Reply

    Hi Su Lim,

    Create a file called libInit.il in the library where the PCell resides, in this SKILL syntax file, load the SKILL code you noted above, i.e load("./MySubContact_SKill.il") and ensure that the path to the SKILL file is correct (it will be relative to the location of the libInit.il file in the library, so perhaps you could putyour SKILL file in the library too, or perhaps symbolically link it there?

    The libInit.il file provides a method to load SKILL code on demand when the library is accessed; thus it is a great way to supply code for PCells that reside in a library.  This is how many PDKs load their SKILL code dependencies. 

    I think that this should solve your problem.

    Regards,

    Lawrence.

    • Post Points: 20
  • Wed, Sep 26 2012 10:30 AM

    • drhogue
    • Not Ranked
    • Joined on Tue, Jan 27 2009
    • Posts 2
    • Points 40
    Re: Problem with XStream out and customized pcell Reply

    This solution is exactly what I need. Why doesn't Cadence just make Xstream so that it picks up the custom pcell procedures defined in the CIW? Wouldn't that be simpler?

    • Post Points: 20
  • Wed, Sep 26 2012 1:08 PM

    Re: Problem with XStream out and customized pcell Reply

     I wouldn't describe it as "simpler" - because then you'd have a problem next time you open Virtuoso and attempt to open your layout - you'll need to manually load the functions required by your SKILL code again. Having a standard loading mechanism which will work in any external program makes sense.

    The stream interfaces were traditionally run in the background, and so were a separate process from the main Virtuoso session. However, in IC615 (IC614 as well), you can elect to run the stream out from virtual memory - in which case the functions will be picked up from what is in the memory of the main Virtuoso process, and hence does exactly what you're after.

    Regards,

    Andrew.

    • Post Points: 20
  • Wed, Sep 26 2012 1:11 PM

    • drhogue
    • Not Ranked
    • Joined on Tue, Jan 27 2009
    • Posts 2
    • Points 40
    RE: Problem with XStream out and customized pcell Reply
    Thanks. I like 6.1.5 and that is what I am using. I will try telling it to run from virtual memory. Does that mean that the layout must be open so it is in virtual memory?

    David Hogue
    • Post Points: 20
  • Wed, Sep 26 2012 1:19 PM

    Re: RE: Problem with XStream out and customized pcell Reply

    No, because it will load it into memory if not already in memory. So it will work fine. The idea is that strictly speaking you don't need to have saved the design (some people don't like that though!). If it's already in memory though, it avoids it having to read it into memory again and hence doubling the memory requirements on the machine.

    Regards,

    Andrew.

    • Post Points: 5
Page 1 of 1 (6 items)
Sort Posts:
Started by slim5 at 24 Sep 2010 08:34 AM. Topic has 5 replies.