Published by Jessica Masters – Latest update: 20/01/2022
Relevant product(s): L-Edit
Operating systems: Linux RHEL 6 and above
Versions affected: All
Relevant area(s): Usage / Automation
In L-Edit, the T-Cell Builder can be used to create a coded view of cells. More details about using the T-Cell Builder can be found in this technote here: https://www.eda-solutions.com/tn24/
This technote details the parameters of a Via instance. This allows for the Via instances to have amended parameters, such as the array size.
The T-Cell Builder code can be amended after it has been generated to include additional parameters and details. T-Cell parameters can be chosen when the T-Cell is placed as an instance.
The table below shows the Via Parameters names so that they can be edited. These are the names in C++. Many of the Via parameters default values can be amended via the GUI by navigating to Setup > Define Standard Via Template.
|Layer1_EncX||Float||The surround cut for the upper layer in the horizontal direction|
|Layer1_EncY||Float||The surround cut for the upper layer in the vertical direction|
|Layer2_EncX||Float||The surround cut for the lower layer in the horizontal direction|
|Layer2_EncY||Float||The surround cut for the lower layer in the vertical direction|
|Layer1_OffsetX||Float||The offset for the upper layer in the horizontal direction|
|Layer1_OffsetY||Float||The offset for the upper layer in the vertical direction|
|Layer2_OffsetX||Float||The offset for the lower layer in the horizontal direction|
|Layer2_OffsetY||Float||The offset for the lower layer in the vertical direction|
|Implant1_EncX||Float||The implant layer surround for the upper layer in the horizontal direction|
|Implant1_EncY||Float||The implant layer surround for the upper layer in the vertical direction|
|Implant2_EncX||Float||The implant layer surround for the lower layer in the horizontal direction|
|Implant2_EncY||Float||The implant layer surround for the lower layer in the vertical direction|
|OriginOffsetX||Float||The horizontal offset between the cell origin and the centre of the via|
|OriginOffsetY||Float||The vertical offset between the cell origin and the centre of the via|
|CutSizeX||Float||The connector layer size in the horizontal direction|
|CutSizeY||Float||The connector layer size in the vertical direction|
|CutLayer||Layer||The connector layer of the via|
|CutColumns||Integer||Number of columns in a single via cell array|
|CutRows||Integer||Number of rows in a single via cell array|
|PitchX||Float||The horizontal spacing between the centre of each via in a via cell array|
|PitchY||Float||The vertical spacing between the centre of each via in a via cell array|
|CutPattern||String||The Quick Set cut pattern for a via array|
Adding code to the T-Cell
At the bottom of this page in Attachments, there is a tdb example file: “TCell_Param.tdb”. Please open this file and continue following this tech note.
To add T-Cell parameters that can be edited when placing an instance, right-click on the T-Cell “Cell1” and select Info…. This brings up a dialog box showing the cell information. Change to the T-Cell Parameters tab, and a variety of parameters are shown. Any additional parameters can be added here, with their data type and default value. The Name value is the name of the parameter in the code, whereas prompt is the parameter’s name when instancing the cell. To add choices as a drop-down list, choose the type “Cyclic” and separate the choices with semi-colons.
If you open the T-Cell in Code View by right-clicking the cell and selecting Open Code, the parameters listed previously will be displayed at the top of the function Cell1_main. This takes the users input and converts it into a variable using the command “LCell_GetParameterAs…”. This variable can then be used in the T-Cell code to define values.
When editing vias, there are a few steps that need to be included. Firstly, find the via section of the code. This will look similar to the image below when the T-Cell is first generated. Note that “pInstCell” is generated by a temporary cell name. Instead of using “LCell_Find”, use the “LCell_GenerateV” and the “LCell_FindEx” commands, which will prevent any regeneration issues due to temporary names.
After amending how the via is instanced, then other amendments need to be made to define parameters. First change “LInstance_New_Ex99” to “LInstance_Set_Ex99”. Then change the “repeat_cnt” variable to use the command “Linstance_GetRepeatCount”, and change “delta” to use “LInstance_GetDelta”. The argument for both commands will be the original via cell name, which is “ViaCellOrig1” in the example provided. I have also included an if statement to ensure that the original via cell can be defined. These changes can be seen in cell1 code.
The parameters for the Via are stored inside an array variable. In the example provided, this is called “params”. This variable is the type const char* and should contain an odd number of arguments. For example, in the code shown below, the parameters defined are the via array size. The parameter array should always end with a NULL value, and any values given should be a string. Variables and numbers can be changed to strings by using “LFormat”. Note, when creating an array in C/C++, the array always starts with value params, so it will count up to one less than the array’s length.
The example provided in attachments below includes more via parameters and allows them to be user-defined when placing the T-Cell as an instance. Examine this code and place the T-Cell into cell2 to see how it appears when generated using different parameters.
T-Cell Builder: https://www.eda-solutions.com/tn24/