This is an example of how the scripted element model can be used to create a grating coupler element. The scripted element will be useful in cases where the models offered by CML Compiler do not offer capabilities/features needed or there is no model offered that can be used for a specific photonic device. In such cases, a custom model can be built using Lumerical scripting language to model the behavior of the desired photonic device.
Note: the scripted element model is an advanced model. Please see other grating coupler examples in lumfoundry template for more typical implementations.
Note: You are now visiting legacy data format page (2022 R2.4 and older). For current data format page (2023 R1.1 onwards) please visit following link:
Scripted Grating Coupler (Statistical) - Lumfoundry Template
Template: scripted_grating_stat
Photonic Model: scripted_element
Quality Assurance Test: scripted_element QA
Statistically Enabled Parameters: User defined
Parameters: User defined
Virtuoso/Verilog-A Support: No
[[snippet||6622829509139]]
Data File
Comparing with gc_fitted_stat_te_c template offered by CML Compiler for the grating coupler photonic model, while the information in the data file is exactly the same for both, the job of converting the source data into a grating coupler model is done by the setup script in case of the grating coupler template using the scripted element photonic model. Whereas for the template using grating coupler photonic model, this is taken care of by the photonic model itself and no setup script is needed to be provided by the user. In the case of the scripted grating coupler, the user has the complete freedom on how the source data is converted into a grating coupler model and that is an advantage offered by the scripted element photonic model for customization.
Variable | Type | Description |
---|---|---|
setup script |
String |
String defining the set-up script to be loaded. It is often helpful to build "setup script" using a combination of an lsf script stored in a string and the toscript command. The latter translates data from the INTERCONNECT workspace to a string. It currently only supports passive components with s-parameters set with the setsparameter command. |
<custom> |
Custom |
The source data will depend on the custom scripted element. Data and the setup script code can be defined directly in the source .lsf script, or in external data files that are loaded. |
Statistical Data (Optional)
This data is required for CML Compiler to enable statistical modeling. Note that to allow CML Compiler to build statistically enabled models, the statistical_parameter_status has to be defined in the XML file. For more information, see Statistical CMLs.
Variable | Type | Description |
---|---|---|
stat_parameters |
Cell |
A cell of length N containing the statistical data for the element where N is the number of statistical parameters. Each entry in the cell is a struct with the following fields. |
stat_parameters{i}.name |
String |
Name of the i-th statistical parameter. |
stat_parameters{i}.mean |
Number |
Mean value of the i-th statistical parameter. |
stat_parameters{i}.corners |
Matrix |
Corner values for the i-th statistical parameter provides as an Cx1 matrix where C is the number of process corners defined in the XML file. Note: The values for the process corners should follow the same order as in the XML file. |
stat_parameters{i}.LOCAL |
Struct |
A struct describing the LOCAL level variation of the i-th statistical parameter with the following fields: distribution = Defines the type of the PDF used to describe the LOCAL level variation. Currently the options are 'normal' (Gaussian) or 'pearson4' (Non-Gaussian). sigma = The standard deviation of the LOCAL level variation. gamma1: The skewness of the LOCAL level variation (for pearson4 distribution only) beta2: The kurtosis of the LOCAL level variation (for pearson4 distribution only) |
stat_parameters{i}.GLOBAL |
Struct |
A struct containing the GLOBAL level variation of the i-th statistical parameter with the following fields: distribution = Defines the type of the PDF used to describe the GLOBAL level variation. Currently the options are 'normal' (Gaussian) or 'pearson4' (Non-Gaussian). sigma = The standard deviation of the GLOBAL level variation. gamma1: The skewness of the GLOBAL level variation (for pearson4 distribution only) beta2: The kurtosis of the GLOBAL level variation (for pearson4 distribution only) GLOBALGROUP : Name of the GLOBALGROUP defined in the top level XML file. (if a GLOBALGROUP is provided then the description in the XML file takes priority over the data file) Note: It is optional to provide a GLOBAL level variation for statistical parameters. |
stat_parameters{i}.slope_<stat param> |
Number |
A slope can be optionally defined for use inside the set-up script. Note: This is a custom model, so other fields may also be introduced |