Skip to content

OuDret/gds2lef

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Script to convert gds library to lef cells definition

Dependencies

Need to have klayout installed https://www.klayout.de/

Usage

klayout  -zz -rd gds_path="LIB.GDS" -rd out_file="LIB.lef" -rm ./gds2lef.py

At the top of gds2lef.py file you will find where to define the layers the script will look for pins/obstructions. You can also specify cells to be ignored.

###### CONSTANTS ######                                                        
layers={                                                  
    "metal1": (1,0),                                      
    "metal2": (3,0),                                       
    "metal3": (7,0),                                       
    "via"   : (6,0)                                        
}                                                          
ignore_cells = ["via"]                                     
#######################

The script assumes all rectangle, polygon and path are obstruccions unless they have text label on it. If so, they will be treated as PIN .

It also assumes cells are adjusted to origin by its lower left bounding box

Limitations

MACRO SIMMETRY, SITE, PINS DIRECTION AND PINS USE are constant strings set inside print functions. You may need to change those strings or edit the lef file later.

print("\tCLASS CORE ;", file=file)
print("\tSYMMETRY X Y ;", file=file)
print("\tSITE std_cell ;", file=file)
...

It can only handle boxes polygons & paths.

TODO

Refactoring

Add config file for string values to be printed instead of being hardcoded

Error Handling

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages