Object Creation FAQs
The following are the FAQs related to creating objects:
- How do I set Auto mode in the Create Label command as the default label creation mode?
- When I create pins, why are the labels not being displayed?
- How do I create pins by reading data from a text file?
- How do I set the default via on the Create Via form?
- How do I map the parameters on the System tab while creating a custom via?
How do I set Auto mode in the Create Label command as the default label creation mode?
You can control default mode for the Create Label command by setting the labelMode option environment variable in the home directory or the .cdsenv file, as shown below:
layout labelMode cyclic "auto"
You can also set it through the .cdsinit file:
envSetVal("layout" "labelMode" 'cyclic "auto")
Also, the
leHiCreateLabel(hiGetCurrentWindow() "auto")
You can also permanently change the bindkey settings to set the auto mode as the default mode for the Create Label command, as shown below:
hiSetBindKey("Layout" "<Key>L" "leHiCreateLabel(hiGetCurrentWindow() \"auto\")")
In IC614 and above releases, you need to press F3 to open the Create Label form. As a workaround, you can define a SKILL function and a bindkey to display the form by default, as shown below:
;---------------
procedure(CCScreateLabel()
envSetVal("ui" "showOptionForms" 'boolean t)
leHiCreateLabel()
envSetVal("ui" "showOptionForms" 'boolean nil)
)
hiSetBindKey("Layout" "<Key>L" "CCScreateLabel")
;--------------
The L bindkey can be used to invoke the Create Label command.
When I create pins, why are the labels not being displayed?
You should enable the Pin Names option on the Display Options form to display the labels for pins. You can also enable the display of pin names by setting the displayPinNames environment variable in the .cdsenv file, as shown below:
layout displayPinNames boolean t
How do I create pins by reading data from a text file?
You can automate the pin creation process by reading an ASCII/text file as an input. The input file can contains details of pin coordinates, layer, pin names, and access direction, as shown in the sample input text file and SKILL code below.
->layer purpose shape points termName termDirection accessDirection<-
"Poly" "drawing" "rectangle" 1.7 1.5 2.4 2.6 "my_pin1" "inputOutput" "top"
"Metal1" "drawing" "rectangle" 3.2 3.3 4.3 4.8 "my_pin2" "input" "bottom"
"Metal2" "drawing" "rectangle" 5.1 5.2 6.4 6.7 "my_pin3" "output" "none"
The following is a sample SKILL code that can be used for pin creation:
;----------------CCSCreatePin.il----------------------------------------------------------------
procedure(CCSCreatePin(pinListfile libName cellName viewName)
let((z inPort cvId nextline layer purpose lpp shape p1 p2 p3 p4 points termName termDir accessDir)
inPort = infile(pinListfile)
cvId=dbOpenCellViewByType(libName cellName viewName "" "a")
when( inPort
while(z=gets(nextline inPort)
layer=readstring(nth(0 parseString(z)))
purpose=readstring(nth(1 parseString(z)))
lpp=list(layer purpose)
shape=readstring(nth(2 parseString(z)))
p1=readstring(nth(3 parseString(z)))
p2=readstring(nth(4 parseString(z)))
p3=readstring(nth(5 parseString(z)))
p4=readstring(nth(6 parseString(z)))
points=list(p1:p2 p3:p4)
termName=readstring(nth(7 parseString(z)))
termDir=readstring(nth(8 parseString(z)))
accessDir=list(readstring(nth(9 parseString(z))))
leCreatePin(cvId lpp shape points termName termDir accessDir)
)
close(inPort)
);when
);let
);procedure
To create pins by reading data from a text file:
-
Load the SKILL script
CCSCreatePin.ilthrough the CIW or.cdsinitfile. Ensure that the layout cellview exists. -
Call the below mentioned SKILL procedure:
You should specify the first argument as the input file name, followed the library name, cell name, and view name of the layout cellview where the pins need to be created.CCSCreatePin("./indata" "library" "cell" "layout")
How do I set the default via on the Create Via form?
The Create Via form reads the constraint group set in Create Via section of Layout Editor Options form. The list of valid vias for this constraint group are populated in Via Definition field. You can change the default value of Via Definition in the Create Via form. For example, you might want that whenever you open a new layout window, by default, the M5_M4v via should appear in the Via Definition field.
You can use the following sample SKILL code to change the default via.
procedure(CCSRegProc(args)
hiRegTimer("CCSSetDefVia(args->window)" 5)
leHiCreateVia()
) ;proc
procedure(CCSSetDefVia(window)
let((cv cstG currCG techId validVias)
cancelEnterFun('le0ViaForm)
cv=geGetWindowCellView(window)
if(envGetVal("layout" "viaConstraintGroup")=="Same as Wire" then
currCG=envGetVal("layout" "wireConstraintGroup")
else
currCG=envGetVal("layout" "viaConstraintGroup")
) ;if
techId=techGetTechFile(cv)
cstG=cstFindConstraintGroupIn(techId currCG)
validVias=car(setof(x cstG~>objects x~>defName=="validVias"))~>value
if(member("M5_M4v" validVias) then
le0ViaForm->viaSingleModeScrollView->viaDefName->value="M5_M4v"
) ;if
) ;let
) ;procedure
deRegUserTriggers("maskLayout" nil nil 'CCSRegProc)
deRegUserTriggers("maskLayoutXL" nil nil 'CCSRegProc)
hiSetBindKey("Layout" "<Key>o" "CCSSetDefVia(hiGetCurrentWindow()) leHiCreateVia()")
To use the above sample SKILL code:
-
Save the above code in a file, for example,
CCSChangeDefaultVia.il. -
Add the
loadcommand to load this file to your.cdsinitfile:load"<path_to_file>"/CCSChangeDefaultVia.il" -
Start Virtuoso and open any layout cellview. If the constraint group set for the Create Via option in the Layout Editor Options form has
M5_M4vin the list of valid vias, then it will become the default via in the Via Definition field. -
Change the constraint group for Create Via in the Layout Editor Options form. Then, open the Create Via form using the bindkey
O. After this, you may use either the bindkey or the menu option.
How do I map the parameters on the System tab while creating a custom via?
You can use the Rows and Columns values of the System tab, instead of the User defined tab, of the Create Via form if you specify the parameter names in the via Pcell code as row and column. For mapping the Pcell via, use the following names to map the system parameters: row, column, w, l, xCutSpacing, yCutSpacing, xBias, and yBias.
If the Pcell via has the enclosure information, it is displayed under the User Defined tab and you can modify the value only on this tab.
Related Topics
Return to top