PCell callback function example

004_callback : PCell callback function example

Minimum Required Version: Expert 4.10.39.R

Expert PCell parameters support callback functions written in JavaScript. It is very useful for reflecting internal expressions for L, W, R, and C parameters of resistors and capacitors.

This example will show how to add/execute a callback function in PCell parameters.

1.0. Preliminary steps to start example

  • Run the Expert application
  • Load the "scripting_ex04.eld" project

1.1. Checking the PCell Scripts for callback

All types of PCells (LISA, JavaScript) may have a callback.

Open the "RPPLUS" cell, then a Script panel for RPPLUS will appear automatically. This PCell is created using JavaScript, and requires a "callback:" keyword for callback in definePCellParams.

Open the "P1P2CAP" cell, then a Script panel for P1P2CAP will appear automatically. This PCell is created using LISA, and requires a "set_pcell_callback" function in the BODY block.

1.2. Loading the callback JavaScript

To open the script window, select Tool->Script->Script Panel . From within the script window, choose File->Open and select the file callback_func.js.

This script will set up the following sub functions for the PCell callback:

  • RPPLUS_callback: for the RPPLUS PCell
  • PIP_callback: for the P1P2CAP PCell
  • IND_callback: for the IND PCell

Callback scripts must be written in JavaScript only.

Callback script calculates R, L, and W based on R=Rsh*L/W, and L, EachL and Strips based on EachL=L/Strips, where:

  • R: Resistor value
  • L: Length of the resistor
  • W: Width of the resistor
  • Strips: Number of series segments of the resistor
  • EachL: Length of each segment

1.3. Trying the callback functions

Open the "pcell_callback" cell as in pcell_callback_layout.png . Select the RPPLUS PCell in the layout as in rpplus_layout.png .

Change the R, L, W, EachL, and Strips parameters in the Property Bar one at a time. Other related parameter values will be updated according to the expressions in the callback function when you change active parameter in the Property Bar window.