• 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. Create condition based parameter check options in pcell

Stats

  • Locked Locked
  • Replies 2
  • Subscribers 144
  • Views 14672
  • 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

Create condition based parameter check options in pcell

skillforpcells
skillforpcells over 10 years ago

I am working on creation of Pcell which has around 15 parameters in form of check box(value type = boolean) and each check box enables a object in the Pcell. I want to create condition based checkbox where 8 checkbox are primary and independent and rest 7 are dependent on previous 8 and enables or disables depending on the 8 primary one. 

For example in the code below(with only 4 parameters(checkbox)) which is generated by graphical pcell option (as I am beginner in Pcell skill and want to start with a working code), If m1 is selected then contLD checkbox is disabled and if m1LD is selected by user then cont is disabled. How can this be done.

Also is there a possibility I can make one checkbox behave differently based on primary checkboxes( for example m1 and m1LD are primary and instead of having two parameters cont and contLD I can have just cont which behaves as cont or contLD depending on whether m1 or m1LD are selected respectively )

pcDefinePCell(list(ddGetObj("Pcells") "MESH_SKILL" "layout")
    ((cont boolean "TRUE")
    (contLD boolean "TRUE")
    (m1 boolean "TRUE")
    (m1LD boolean "TRUE")
    )
    let((m1 cont contLD m1LD pcMember
        pcStretchGroup stretchOffsetX stretchOffsetY pcLib pcMaster
        pcInst pcTerm pcPin pcPinName pcNet
        pcTermNet pcNetName pcTermNetName pcMosaicInst pcParameters
        pcParamProp pcStep pcStepX pcStepY pcRepeat
        pcRepeatX pcRepeatY pcIndexX pcIndexY pcLayer
        pcPurpose pcLabelText pcLabelHeight pcPropText pcParamText
        pcCoords pcPathWidth pcPolygonMargin
    )
    (pcLib = (pcCellView~>lib))
    (pcParameters = ((pcCellView~>parameters)~>value))
    (pcParamProp = car(exists(prop pcParameters
            ((prop~>name) == "m1")
        )
        ))
    (m1 = (pcParamProp~>value))
    if(((pcParamProp~>valueType) == "boolean")
        (m1 = (m1 == "TRUE"))
    )
    (pcParamProp = car(exists(prop pcParameters
            ((prop~>name) == "cont")
        )
        ))
    (cont = (pcParamProp~>value))
    if(((pcParamProp~>valueType) == "boolean")
        (cont = (cont == "TRUE"))
    )
    (pcParamProp = car(exists(prop pcParameters
            ((prop~>name) == "contLD")
        )
        ))
    (contLD = (pcParamProp~>value))
    if(((pcParamProp~>valueType) == "boolean")
        (contLD = (contLD == "TRUE"))
    )
    (pcParamProp = car(exists(prop pcParameters
            ((prop~>name) == "m1LD")
        )
        ))
    (m1LD = (pcParamProp~>value))
    if(((pcParamProp~>valueType) == "boolean")
        (m1LD = (m1LD == "TRUE"))
    )
    dbReplaceProp(pcCellView "viewSubType" "string" "maskLayoutParamCell")
    dbReplaceProp(pcCellView "_pcCompiledCounter" "int" 1081)
    if(m1LD then
        (pcLayer = 8)
        (pcPurpose = "drawing")
        (pcInst = dbCreatePolygon(pcCellView
            list(pcLayer pcPurpose)
            list((-2.5:2.5)
            (2.5:2.5)
            (2.5:-2.5)
            (-2.5:-2.5)
            (-2.5:-1.5)
            (1.5:-1.5)
            (1.5:1.5)
            (-1.5:1.5)
            (-1.5:-1.5)
            (-2.5:-1.5)
            )
        ))
    )
    if(m1 then
        (pcLayer = 8)
        (pcPurpose = "drawing")
        (pcInst = dbCreatePolygon(pcCellView
            list(pcLayer pcPurpose)
            list((2.5:2.5)
            (1.0:2.5)
            (1.0:-1.0)
            (-1.0:-1.0)
            (-1.0:1.0)
            (1.0:1.0)
            (1.0:2.5)
            (-2.5:2.5)
            (-2.5:-2.5)
            (2.5:-2.5)
            )
        ))
    )
    (pcLayer = 2)
    (pcPurpose = "drawing")
    (pcInst = dbCreateRect(pcCellView
        list(pcLayer pcPurpose)
        list((-2.5:-2.5)
            (2.5:2.5)
        )
        ))
    if(cont then
        (pcLayer = 7)
        (pcPurpose = "drawing")
        (pcInst = dbCreateRect(pcCellView
            list(pcLayer pcPurpose)
            list((1.0:1.5)
            (1.5:2.0)
            )
        ))
    )
    if(contLD then
        (pcLayer = 7)
        (pcPurpose = "drawing")
        (pcInst = dbCreateRect(pcCellView
            list(pcLayer pcPurpose)
            list((1.0:-2.0)
            (1.5:-1.5)
            )
        ))
    ) t
    )
)

  • Cancel
  • theopaone
    theopaone over 10 years ago

    The interrelationship of parameters is handled by the CDF on the master. The CDF determines how the parameters are displayed and what happens after they changed. In your case, the CDF has 4 Boolean parameters, cont, contLD, M1, M1LD.  The callback for the parameters should check the values and modify the 'editable or 'display attributes on the related parameters:

    This code has not been tested, you mileage may vary.

    cdfCreateParam( cdfId ?name "M1" ?type "boolean" ... ?callback "myDeviceCallback( cdfgData 'M1 )" ... )

    procedure( MESH_SKILL_Callback( cdfId param )

    case( param
      ( 'M1
          if( cdfId->M1->value == "TRUE" then
             cdfId->cont->editable = t
    ;; Set contLD to be not editable and FALSE
             cdfId->contLD->editable = nil
             cdfId~>contLd~>value = "FALSE"
        else
    ;; Set cont to be not editable and FALSE
             cdfId~>cont~>editable = nil
             cdfId~>cont~>value = "FALSE"
        ) ; if
      ) ; M1

    ...

     ) ;case

    ) ; procedure

    The callback can manage the relationships between the parameters. The pcell parameters do not have that relationship.


     Ted

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • skillforpcells
    skillforpcells over 10 years ago
    Thanks theopaone for your reply.
    • 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