• 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 call a function in a pcDefinePcell

Stats

  • Locked Locked
  • Replies 7
  • Subscribers 143
  • Views 4978
  • 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 call a function in a pcDefinePcell

LorinLiu
LorinLiu over 1 year ago

Hi,

I create a Multi-layer Pcell by calculating the coordinates. The function of calculating the coordinates is so long that the whole code of generating pcell will also be long. So I want to create a function which can calculate these coordinates, and I just need to call this function whenever and wherever I want to calculating these coordinates. Here is the problem, I define this function by using defun(), if I put the  function outside pcDefinePcell, after running DRC, the report says the calculating function that I create is not defined. If I put these function inside pcDefinePcell, the pcell shows one more layer which is "marker error" which is explained as "function .... redefined". I want to know how to figure this problem? thx.

  • Cancel
Parents
  • LorinLiu
    LorinLiu over 1 year ago

    procedure(coordinate_O_function(Width Length Corner) let(() scale = 1.0e6 ; Define the layers w = evalstring(Width ) * scale l = evalstring(Length) * scale cor = evalstring(Corner) * scale x = 0 y = 0 a = w/2 - cor b = l/2 c = w/2 d = l/2 - cor p1 = list(x+a y+b) p2 = list(x+c y+d) p3 = list(x+c -(y+d)) p4 = list(x+a -(y+b)) p5 = list(-(x+a) -(y+b)) p6 = list(-(x+c) -(y+d)) p7 = list(-(x+c) y+d) p8 = list(-(x+a) y+b) ) )

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • LorinLiu
    LorinLiu over 1 year ago

    procedure(coordinate_O_function(Width Length Corner) let(() scale = 1.0e6 ; Define the layers w = evalstring(Width ) * scale l = evalstring(Length) * scale cor = evalstring(Corner) * scale x = 0 y = 0 a = w/2 - cor b = l/2 c = w/2 d = l/2 - cor p1 = list(x+a y+b) p2 = list(x+c y+d) p3 = list(x+c -(y+d)) p4 = list(x+a -(y+b)) p5 = list(-(x+a) -(y+b)) p6 = list(-(x+c) -(y+d)) p7 = list(-(x+c) y+d) p8 = list(-(x+a) y+b) ) )

    • 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