• 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. How to write more efficient skill code for PCell?

Stats

  • Locked Locked
  • Replies 3
  • Subscribers 143
  • Views 14787
  • 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

How to write more efficient skill code for PCell?

richardyuan
richardyuan over 11 years ago

I wrote a PCell program for a MEMS project recently. The code imitates virtuoso automatic generated PCell program. It looks lengthy and run very slowly.

How can i make it more effective? 

1. How to retrieve PCell parameters more simply. Here is my let paragraph, looks ugly:

    let((p1_d1 p1_r2 p1_r3 v1_r p1_leaf_style p1_leaf_l p1_leaf_w p1_leaf_hd 

p1_notch_w p1_slot_angle p1_slot_ir p1_slot_or p1_slot p2_notch_angle

p2_notch_ir p2_notch_or p2_notch ang ang0 ang1 angi inita DPI x y i num 

p1 p2 p3 p4 sides

pcInst  pcParameters pcParamProp pcLayer pcPurpose 

) ;local parameters 

(pcLib = (pcCellView~>lib)) 

;Retrieve pCell parameters

(pcParameters = ((pcCellView~>parameters)~>value)) 

(pcParamProp = car(exists(prop pcParameters 

   ((prop~>name) == "P1_Visible")

)

   )) 

(p1v = (pcParamProp~>value)) ;P1_Visible

(pcParamProp = car(exists(prop pcParameters 

   ((prop~>name) == "P2_Style")

)

   )) 

(p2s = (pcParamProp~>value)) ;P2_Style

(pcParamProp = car(exists(prop pcParameters 

   ((prop~>name) == "P1_D1")

)

   )) 

(p1_d1 = (pcParamProp~>value)) ;P1_D1

(pcParamProp = car(exists(prop pcParameters 

   ((prop~>name) == "P2_D1")

)

   )) 

(p2_d1 = (pcParamProp~>value)) ;P2_D1

(pcParamProp = car(exists(prop pcParameters 

   ((prop~>name) == "P1_R2")

)

   )) 

(p1_r2 = (pcParamProp~>value)) ;P1_R2

(pcParamProp = car(exists(prop pcParameters 

   ((prop~>name) == "P2_R2")

)

   )) 

(p2_r2 = (pcParamProp~>value)) ;P2_R2

(pcParamProp = car(exists(prop pcParameters 

   ((prop~>name) == "P1_R3")

)

   )) 

(p1_r3 = (pcParamProp~>value)) ;P1_R3

(pcParamProp = car(exists(prop pcParameters 

   ((prop~>name) == "P2_R3")

)

   )) 

(p2_r3 = (pcParamProp~>value)) ;P2_R3

(pcParamProp = car(exists(prop pcParameters 

   ((prop~>name) == "V1_R")

)

   )) 

(v1_r = (pcParamProp~>value)) ;V1_R

(pcParamProp = car(exists(prop pcParameters 

   ((prop~>name) == "V1_L")

)

   )) 

(v1_l = (pcParamProp~>value)) ;V1_L

(pcParamProp = car(exists(prop pcParameters 

   ((prop~>name) == "V3_D")

)

   )) 

(v3_d = (pcParamProp~>value)) ;V3_D

(pcParamProp = car(exists(prop pcParameters 

   ((prop~>name) == "V3_SP")

)

   )) 

(v3_sp = (pcParamProp~>value)) ;V3_SP

(pcParamProp = car(exists(prop pcParameters 

   ((prop~>name) == "V3_EE")

)

   )) 

(v3_ee = (pcParamProp~>value)) ;V3_EE

(pcParamProp = car(exists(prop pcParameters 

   ((prop~>name) == "P1_Leaf_Style")

)

   )) 

(p1_leaf_style = (pcParamProp~>value)) ;P1_Leaf_Style

(pcParamProp = car(exists(prop pcParameters 

   ((prop~>name) == "P1_Leaf_L")

)

   )) 

(p1_leaf_l = (pcParamProp~>value)) ;P1_Leaf_L

(pcParamProp = car(exists(prop pcParameters 

   ((prop~>name) == "P1_Leaf_W")

)

   )) 

(p1_leaf_w = (pcParamProp~>value)) ;P1_Leaf_W

(pcParamProp = car(exists(prop pcParameters 

   ((prop~>name) == "P1_Leaf_HD")

)

   )) 

(p1_leaf_hd = (pcParamProp~>value)) ;P1_Leaf_HD

(pcParamProp = car(exists(prop pcParameters 

   ((prop~>name) == "P1_Notch_W")

)

   )) 

(p1_notch_w = (pcParamProp~>value)) ;P1_Notch_W

(pcParamProp = car(exists(prop pcParameters 

   ((prop~>name) == "P2_Notch_W")

)

   )) 

(p2_notch_w = (pcParamProp~>value)) ;P2_Notch_W

2. How to fill shape A with array of circular shape B efficiently,

    make sure B is inside A and the distance of B edge to A edge should be larger than 3um?

    I tried to use dbCreateEllipse in multiple loops. And it took several minutes to get a final result, seems very inefficient.

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

    Nothing really there that should be slow. You don't need these lines in the code:


    (pcLib = (pcCellView~>lib)) 

    ;Retrieve pCell parameters
    (pcParameters = ((pcCellView~>parameters)~>value))
     

    Because they aren't used, but that won't slow it down really.

    Regards,

    Andrew.

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

    Nothing really there that should be slow. You don't need these lines in the code:


    (pcLib = (pcCellView~>lib)) 

    ;Retrieve pCell parameters
    (pcParameters = ((pcCellView~>parameters)~>value))
     

    Because they aren't used, but that won't slow it down really.

    Regards,

    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