001_auto_gen : JavaScript for layout automation
Minimum Required Version: Expert 4.10.39.R
Many layout-editing tasks can be automated through the use of scripting. This is especially useful when a certain task needs to be performed repetitively or for a large amount of geometries.
This example will show how to automate the labeling of a DRAM array through the use of JavaScript.
1.0. Preliminary steps to start example
- Run the Expert application
- Load the "scipting_ex01.eld" project
1.1 Loading/creating the JavaScript
From the Expert window choose the menu Tool->Script and select JS. To open the script window, select Tool->Script->Script Panel . From within the script window, choose File->Open and select the file scripting_ex01.js, the script should then appear in the window as shown in Figure 1 .
This script will perform the following task:
- Open the layout cell named "array_top"
- The first loop will place the text bl_0, bl_1, bl_2 ... with layer metal1 on the bit lines
- The second loop will place the text wl_0, wl_1, wl_2 ... with layer poly on the word lines
Figure 2 illustrates the cell "array_top" before the execution of the script.
In order to run the script, press the green arrow icon located in the script panel window, or choose Script->Run. Figure 3 illustrates the cell "array_top" after the execution of the script.
The file expertapi_ref1.pdf located in "<Silvaco_install_dir>/lib/expert/4.10.39.R/docs/" will help with the syntax while creating JavaScript.
1.2 Expert Log Window
Another useful feature of Expert that can assist in the creation of JavaScript is the use of the Expert log window ( View->Dock Windows->Expert Log ). This window lists each command performed during the Expert session in the proper JavaScript (or LISA) syntax.
scripting_ex01.js.txt
// SCRIPTLANG = JS // This script labels row and column bit line // and word line with text labels var bl_pitch= 7.4; var wl_pitch= 7.8; var Xorg=-1.2; var Yorg=0; var cols=64; var rows=64; var cell_name="array_top"; openCell(cell_name); // Start bit line loop for(var bl_num=0;bl_num < cols; ++bl_num) { text((Xorg+bl_num*bl_pitch), (Yorg-3), ("bl_"+bl_num), {layer:"metal1", height:2, width:0.8, align:TA_BOTTOMCENTER, proportional:true}); } // Start word line loop for(var wl_num=0; wl_num < rows; ++wl_num) { text((Xorg), (Yorg+wl_num*wl_pitch), ("wl_"+wl_num), {layer:"poly", height:2, width:0.8, align:TA_BOTTOMRIGHT, proportional:true}); } // End of word line loop