• 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. problem with pcell with radio button

Stats

  • Locked Locked
  • Replies 1
  • Subscribers 141
  • Views 14318
  • 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

problem with pcell with radio button

techrddyz
techrddyz over 8 years ago

Hi all,

i am trying to make a PCELL using SKILL script. I want my PCELL to be able to turn on/off certain layers based on the radio button selected by users. In the following code, I draw m1, m2 and m3. If user selects uptoM1, only M1 should be on, and if user selects uptoM3, all M1, M2 and M3 should be on. I have a call back function, decap_metallevel() in the radio button CDF to turn on and off metal layers. 

However, this function doesnt turn on/off metal layers when i select different radio button. Does anyone see where the problem is??  

pcDefinePCell(list(ddGetObj("testbench") "decap_pcell_test_1_SKILL" "layout") 
    ((uptoM1 boolean "TRUE") 
(uptoM2 boolean "TRUE") 
(uptoM3 boolean "TRUE")
    ) 
    let((uptoM1 uptoM2 uptoM3 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) == "uptoM1")
)
   )) 
(uptoM1 = (pcParamProp~>value))
if(((pcParamProp~>valueType) == "boolean") 
   (uptoM1 = (uptoM1 == "TRUE"))
) 
(pcParamProp = car(exists(prop pcParameters 
   ((prop~>name) == "uptoM2")
)
   )) 
(uptoM2 = (pcParamProp~>value)) 
if(((pcParamProp~>valueType) == "boolean") 
   (uptoM2 = (uptoM2 == "TRUE"))
) 
(pcParamProp = car(exists(prop pcParameters 
   ((prop~>name) == "uptoM3")
)
   ))
(uptoM3 = (pcParamProp~>value)) 
if(((pcParamProp~>valueType) == "boolean") 
   (uptoM3 = (uptoM3 == "TRUE"))
) 
if(uptoM1 then 
   (pcLayer = 12) 
   (pcPurpose = "drawing") 
   (pcInst = dbCreatePath(pcCellView 
   list(pcLayer pcPurpose) 
   list((0.209:0.705) 
(1.963:0.705)
   ) 0.2 "truncateExtend"
))
) 
if(uptoM2 then 
   (pcLayer = 15) 
   (pcPurpose = "drawing") 
   (pcInst = dbCreatePath(pcCellView 
   list(pcLayer pcPurpose) 
   list((0.999:1.429) 
(0.999:0.185)
   ) 0.2 "truncateExtend"
))
) 
if(uptoM3 then 
   (pcLayer = 18) 
   (pcPurpose = "drawing") 
   (pcInst = dbCreatePath(pcCellView 
   list(pcLayer pcPurpose) 
   list((0.344:0.988) 
(1.922:0.988)
   ) 0.2 "truncateExtend"
))
)
t
    )
)
;select or unselect all based on SelectAll 
procedure(decap_metallevel()
case( cdfgData->MetalLevel->value 
( "uptoM1t"
 cdfgData->uptoM1->value = "true"
 cdfgData->uptoM2->value = "nil"
 cdfgData->uptoM3->value = "nil"
)
( "uptoM2t"
 cdfgData->uptoM1->value = "true"
 cdfgData->uptoM2->value = "true"
 cdfgData->uptoM3->value = "nil"
)
( "uptoM3t"
 cdfgData->uptoM1->value = "true"
 cdfgData->uptoM2->value = "true"
 cdfgData->uptoM3->value = "true"
)
);case
)
;; Create the CDF 
let( (cellId cdfId)
  when(cellId = ddGetObj("testbench" "decap_pcell_test_1_SKILL")
    ;; if the cell CDF already exists, delete it
    when( cdfId = cdfGetBaseCellCDF(cellId)
      cdfDeleteCDF(cdfId)
    )
    ;; create the base cell CDF
    cdfId = cdfCreateBaseCellCDF(cellId)
    ;; create the parameters 
     cdfCreateParam( cdfId
      ?name    "uptoM1"
      ?prompt  "uptoM1"
      ?defValue    "true"
      ?type    "boolean"
      ?display    "nil"
    )  
    cdfCreateParam( cdfId
      ?name    "uptoM2"
      ?prompt  "uptoM2"
      ?defValue    "true"
      ?type    "boolean"
      ?display    "nil"
    )
    cdfCreateParam( cdfId
      ?name    "uptoM3"
      ?prompt  "uptoM3"
      ?defValue    "true"
      ?type    "boolean"
      ?display    "nil"
    )
    cdfCreateParam( cdfId
      ?name    "MetalLevel"
      ?type    "radio"
      ?prompt  "MetalLevel"
      ?defValue    "uptoM1t"
      ?choices list("uptoM1t" "uptoM2t" "uptoM3t")
      ?display "t"
      ?callback  "decap_metallevel()"
    )
    cdfSaveCDF(cdfId)
  ); when
); let

Thanks

Rudy

  • Cancel
Parents
  • Andrew Beckett
    Andrew Beckett over 8 years ago

    Rudy,

    Your callback function was wrong. It's setting the boolean parameters to "true" and "nil" (I've no idea why). It should set them to t/nil as follows:

    ;select or unselect all based on SelectAll
    procedure(decap_metallevel()
     case( cdfgData->MetalLevel->value
      ( "uptoM1t"
       cdfgData->uptoM1->value = t
       cdfgData->uptoM2->value = nil
       cdfgData->uptoM3->value = nil
      )
      ( "uptoM2t"
       cdfgData->uptoM1->value = t
       cdfgData->uptoM2->value = t
       cdfgData->uptoM3->value = nil
      )
      ( "uptoM3t"
       cdfgData->uptoM1->value = t
       cdfgData->uptoM2->value = t
       cdfgData->uptoM3->value = t
      )
     );case
    )

    With that, it works fine.

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Andrew Beckett
    Andrew Beckett over 8 years ago

    Rudy,

    Your callback function was wrong. It's setting the boolean parameters to "true" and "nil" (I've no idea why). It should set them to t/nil as follows:

    ;select or unselect all based on SelectAll
    procedure(decap_metallevel()
     case( cdfgData->MetalLevel->value
      ( "uptoM1t"
       cdfgData->uptoM1->value = t
       cdfgData->uptoM2->value = nil
       cdfgData->uptoM3->value = nil
      )
      ( "uptoM2t"
       cdfgData->uptoM1->value = t
       cdfgData->uptoM2->value = t
       cdfgData->uptoM3->value = nil
      )
      ( "uptoM3t"
       cdfgData->uptoM1->value = t
       cdfgData->uptoM2->value = t
       cdfgData->uptoM3->value = t
      )
     );case
    )

    With that, it works fine.

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
No Data

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