When creating custom elements, users can add customized properties to the Compound Elements and Scripted Elements. The customized properties can also be added to Root Element, but this is generally not used for creating custom elements.
To add a new property to the above-mentioned elements, the user can either edit the element and use the "Add" button in the "Property Editor" window or, use the addproperty command.
User-defined properties have the same general format as primitive properties. However, compared to the latter, all the fields of the Property Editor can be modified for user-defined properties.
Custom elements created by Compound Element and Scripted elements can be version controlled by the "version" property. This is especially useful in building Compact Model Libraries (CML) to distinguish the same model in different versions. When creating the Custom element, the user can customize the "version" property, but once the CML is published and installed in Design Kits, the "version" will no longer be editable for the end-users.
INTERCONNECT provides different protection levels for the user-defined properties in compact models. Following are the four protection levels of user-defined properties:
The newly added properties are default to public properties. This type of property is visible and the property value is editable to the end-user when using the compact model (after installing the compact model library into the Design Kits folder).
Some properties like Description and element Type are non-editable properties. These types of properties are mostly "strings" and are greyed out in the Property View window to indicate they are non-editable.
INTERCONNECT supports the hide property option for Root Element, Compound Element, and Scripted Element. Hidden properties cannot be seen in the element Property View window but can be accessed through script by "set" commands and "get" commands. Users can hide a property by checking the "Hide" option in the element's Editing window or by using the hideproperty command.
INTERCONNECT supports the protected property option for Root Element, Compound Element, and Scripted Element.
The protected properties are especially useful when building compact models and running Monte Carlo (MC) analysis. When a property is protected, end users cannot see, list, or read the property through GUI or script environment, but this property can still be accessed and varied by the simulator in the MC analysis tool. Post-processing and correlation analysis in the MC analysis tool will only be provided for generated results.
Enable protected property
To protect a property, users can open the element Edit window and check the corresponding "Protect" box or use the protectproperty script command. After protecting the property, it will be hidden and be invisible for all script commands except for the protectproperty command.
When an element with protected properties is packaged and published, the protected properties then cannot be accessed in any manner, except in Monte Carlo analysis for variations. This is especially useful for varying process data in Monte Carlo analysis, while at the same time the process data and its variation are protected.
Vary protected property in Monte Carlo analysis
Once the element is packaged and published, its protected properties can only be accessed by the .lib file in Monte Carlo analysis. The variation is defined in the .lib file as by the normal way through "model" or "lotgroup". The attached example (with files run_monte_carlo_protect.icp and wgd_protected.lib) is modified based on the Monte Carlo analysis example in the page Monte Carlo analysis .
We created a Compound element out of the "SW1" element and defined its "model" as "protectWGD". Then we created a new property in the Compound element and named it as "group_index", and passed its value to "SW1" "group index 1". Then we protected the property "group_index" and it became hidden.
In the wgd_protected.lib file, we define the variation of the model "protectWGD" property "group_index" as shown below:
.LIB sigma_1 .LOTGROUP group_a=(uniform,0.2) .MODEL protectWGD "group_index"=2 lotgroup=group_a library="" .ENDL
Create a new Monte Carlo (MC) analysis "MC lib" and upload this wgd_protected.lib file to it. Because the property "group_index" is protected so it won't be shown in the MC Master table. The following figures are the same Monte Carlo simulation with a variation on the same property, protected and unprotected, respectively.
Run the MC analysis and the property variation will be invisible but the MC analysis result variation will be shown in the results as normal (figure below on the left). The MC analysis with unprotected property will have the property variation shown together with the result variation (figure below on the right).
Reference vs Copy
Once the Custom element is successfully created, it can be added to the "Custom" folder in the Element Library for further (repeatable) use and for building CMLs to eventually distribute to end-users for circuit design. For more information on package/publish CMLs, please visit the Package/Publish Compact Model Library page.
User can right-click on the Custom element and select "Copy to Element Library" to add the element to the Custom folder, or use the "addtolibrary" command to do so.
Once added to the Custom folder, the element can be used the same as normal primitive elements in the Element Library. But when drag and drop into the Schematic Editor, the Custom element can be added as a reference or as a copy. As a reference of the Custom element, it will show in light blue color, and its building structures/methods will be protected, for example, a Custom element built by a Compound element cannot be expanded, and cannot be edited to add or delete properties. However, the already added unprotected properties can be accessed by the user. For more information, please visit the Managing Compact Model Libraries page.
As a copy of the Custom element, it will show as the original Compound or Scripted element and the user can edit and expand it, and modify all its properties.