Converting Mentor L Files to Tanner TDB Format


1. Convert the L file to gdsII format.

Use the Mentor Graphics Lc command.
  Lc -t [tech_name] -l [tech_directory] -gds2merge -o [gds_outfile] [input_file]
For example, converting a nor gate produced with Led in the 0.6um HP process to gds2 would use the following command:
  Lc -t scn06hp -l /ecad/local/tech/rel/gdt -gds2merge -o nor2.gds nor2.L

2. Import the GDSII file.

For the Tanner layout editor to run correctly, you need to have a technology file in the directory that you start the tool. Ledit automatically looks for the file named ledit.tdb and uses any technology information found in that file. The technology files can be found in the /ecad/tanner/default/tech directory. The file named Readme1.txt in that directory describes the various technology files. To make this visible to Ledit, just make a link to a technology file and name it ledit.tdb. For example, to setup Ledit to use the 0.5um HP process with sub-micron rules, type the following command:
  ln -s /ecad/tanner/default/tech/mhp_ns5.tdb ledit.tdb

To execute the Tanner toolset layout editor, Ledit, type the following commands:
  swsetup tanner
  ledit &

Once in Ledit, open the GDSII file by clicking on File->Open (or use CNTL-O). Click on the GDSII selection, and type the name of your layout file. Ledit loads an Led converted GDSII file with each contact, wire, etc. being a separate component. To use this layout, it needs to be flattened. Click on Cell-Open (or press O) and select the top-level layout. This is the cell name given to the layout by Led, and is almost always the last entry on the list.
Once the entire layout is visible, click on Cell->Flatten and press the Continue button when given the warning message.

3. Fixing the technology sizing.

Inspection of the grid sizing shows that the technology sizing is not imported properly. To fix this problem, the layout must be copied into a file where the technology is correct and then scaled to the correct size. (This happens because Tanner imports technology from the layout file if available, and the GDSII has the wrong sizing embedded in it.)
Click on Cell->Open (or press O) then click the File button in the popup. The file field should change to File0 and the cell field should only have one entry, Cell0. This is the default file opened when Ledit is started and if the technology was set up correctly, then this file has the correct grid sizing, etc. Select the Cell0 entry and click OK.

The screen should display a blank layout. Copy the imported layout into this file by clicking on Cell->Instance (or press I) and pressing the File button in the popup until the File MGC1 appears. Select the flattened layout (should still be highlighted) and press OK. The layout is placed in the current file with the correct grid, but the layout itself is not the correct size for the grid. To remedy this, scale the layout according to the current technology lambda. To do this, make sure the flatten layout is selected and click on Edit->Edit Object. There are two fields for the numerator and denominator of the scaling factor. The layout must be scaled by the inverse of the required lambda value. For example, if your desired lambda were .3um, or 3/10 um, then the correct scaling value would be 10/3. After entering the numerator and denominator of the scaling factor, press OK.
The layout should now be correctly sized. Flatten this design by clicking on Cell->Flatten. Finally, clean up useless cells that were created in the translation process. To do this, click on Cell->Delete and select the cell that was imported while leaving Cell0 intact. Next close the original import file by first switching to it with Cell->Open, clicking on file until MGC1 is selected, then clicking on File->Close.
Change the name of your new cell by selecting Cell->Rename. Finally, save the file as a TDB format file.

4. Convert the ports

The final step is making the imported ports fit the Tanner format. The ports should already by in the right layer, but they are usually converted as a single point, while tanner wants to see a line. To change a port, highlight the port by clicking on the port name until it is highlighted. Next, find the location of the port. The port is a single dot and can't be seen unless the port is moved. The dot is usually to the upper-left of the port name. Use the middle-button to move the highlighted port. If you press the middle-button over the top of the port, it will be stretched. Otherwise, the port will be moved. The goal is to stretch the port to cover the entire abuttment area. For a single contact, this is the width of the contact. For a power rail, this is the width of the metal bus. Consult the Tanner documentation for more information of abuttment and port placement if need be.

Once the ports have been stretched and placed in the correct location, a special abuttment port must be created. Click on the port creation tool (the symbol with a square and the letter A in it). Next, select the Icon/Outline layer from the layout list. Using the left mouse button, drag a box around the cell at the location where you want the cell to abutt with other cells. After you let go of the button, the program will prompt for a name. The default name is Abut but may be different depending on your individual settings in the SPR setup.

Finally, select everything in the layout by clicking on Edit->Select All or press CNTL-A. Use the middle mouse button to move the layout so that the lower-left corner of the Abut port is at the same point as the origin.

At this point, the cell should be ready for place and route.
Jon Robinson