It is currently Tue Nov 25, 2014 10:22 pm

MATLAB & L-Edit Communication

MATLAB & L-Edit Communication

Postby apung » Sun May 20, 2012 12:53 pm

Greetings,

I am writing a script in MATLAB, with the goal out outputting a set of commands that can be used in L-Edit's command window. I first saw this was possible from the MathWorks website (http://tinyurl.com/c62xsu8), where a user created a similar program for a spiral pattern. Where can I find additional documentation for the commands of all shapes? Thanks.
apung
 

Re: MATLAB & L-Edit Communication

Postby Sushmita » Tue May 22, 2012 2:16 pm

L-Edit supports two programming languages: TCL 8.5 and C/C++ for generation of layout objects. You can write TCL commands in L-Edit command window or run a TCL script that can create layout in the layout window. Type help in command window to get the list of TCL commands available in L-Edit. For command help, type the name of the command and then -help,Example:
cell -help

You can also create T-Cells (parameterized cells) or macros in L-Edit which are written in C/C++ to generate layout. L-Edit examples contains a spiral macro example which when run generates a spiral based on user defined parameters.
Sushmita
 

Re: MATLAB & L-Edit Communication

Postby tu2011 » Sun Jun 24, 2012 7:52 pm

apung, what you have shown in MATLAB is using a little known feature called Command Line Editing. You can search for the syntax of this language in the manual by looking for the words, "command line editing". This is certainly one way of getting your computational results from Matlab over to L-Edit. A brute force way is to copy line by line as shown in your link over to the Command Line Window in L-Edit. A little more advance way is batch it by saving all of your commands out to a text file with extension ".tco". To load this file in L-Edit, type the "run" command follows by the name of the file. The default path is the installation directory of Tanner Tools. Should you wish to set your own default directory, you can do so by right clicking on the Command Line Window and choose Customize. Then specify the path in the "Default directory for scripts".

Alternatively (which is more recommended), during your computation in Matlab, you can script it to output the vertices for your polygon directly to a text file in CIF format. You can find out the syntax details by searching for "CIF File Formatting" in the L-Edit manual. This way you can import the file into L-Edit just as you would import a GDS file with no further computation or processing required on the L-Edit side. The only thing to note is that you must multiply all of your coordinates by a certain scale factor as CIF unit/coordinate is on a different scale. For example, the CIF file below contains a box that is 10u x 10um with the center located at (5u,5u):

DS 1 2 40;
9 Cell0;
L NWE;
B 20000 20000 10000,10000;
DF;
E

You get to this by taking each value of the numbers above (20000 20000 10000,10000) and multiply it by 2 and divide it by 40 as specified in the "DS" line. So 20000*2/40 = 1000. CIF is in units of 0.01um. So, 1000*0.01um = 10um. I'll leave the rest for you as an exercise. Therefore, if your numbers are in microns, then you will need to divide it by 0.01, multiply it by 40, and divide it by 2 to get back to the whole numbers as shown in the above example. Hope this helps.
tu2011
 


Return to Layout using L-Edit

Who is online

Users browsing this forum: No registered users and 1 guest

cron

Who is online

In total there is 1 user online :: 0 registered, 0 hidden and 1 guest (based on users active over the past 5 minutes)
Most users ever online was 35 on Thu Jan 09, 2014 2:15 am

Users browsing this forum: No registered users and 1 guest

Login Form