-
Notifications
You must be signed in to change notification settings - Fork 150
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Technology compatible with "import KLayout" import SiEPIC approach
UnitTest_All_Library_Cells.py can be run from VScode or within KLayout @seanlam97 @FarihaIS @mustafacc @jasminabrar Get the latest SiEPIC-Tools.
- Loading branch information
1 parent
3c6ff07
commit dde8d25
Showing
64 changed files
with
972 additions
and
807 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
42 changes: 42 additions & 0 deletions
42
klayout/EBeam/pymacros/Example_scripted_layouts/UnitTest_All_Library_Cells.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# $description: Unit testing: all EBeam libraries' cells | ||
# $show-in-menu | ||
# $group-name: Examples_EBeam | ||
# $menu-path: siepic_menu.exlayout.end | ||
# Unit testing for all library layout fixed cells and PCells | ||
|
||
import pya # klayout | ||
import os, sys | ||
|
||
path_GitHub = '/Users/lukasc/Documents/GitHub/' | ||
if 'SiEPIC' not in sys.modules: | ||
path_siepic = os.path.join(path_GitHub, 'SiEPIC-Tools/klayout_dot_config/python') | ||
if not path_siepic in sys.path: | ||
sys.path.append(path_siepic) | ||
import SiEPIC | ||
from SiEPIC._globals import Python_Env | ||
print('KLayout running in mode: %s' % Python_Env) | ||
from SiEPIC.utils.layout import new_layout, floorplan | ||
from SiEPIC.scripts import load_klayout_technology, instantiate_all_library_cells, zoom_out, export_layout | ||
|
||
path_module = os.path.join(path_GitHub, 'SiEPIC_EBeam_PDK/klayout') | ||
path_lyt_file = os.path.join(path_GitHub, 'SiEPIC_EBeam_PDK/klayout/EBeam/EBeam.lyt') | ||
tech = load_klayout_technology('EBeam', path_module, path_lyt_file) | ||
|
||
|
||
# Create a new layout | ||
topcell, ly = new_layout(tech.name, "UnitTesting", GUI=True, overwrite = True) | ||
# Instantiate all cells | ||
instantiate_all_library_cells(topcell) | ||
# Save the layout | ||
path_out = os.path.dirname(os.path.realpath(__file__)) | ||
ly.write(os.path.join(path_out,'a.gds')) | ||
export_layout(topcell, path_out,'a_static',format='oas') | ||
print('done') | ||
|
||
|
||
''' | ||
path_project = os.path.join(path_GitHub, 'ANT-SiN-2301-H3LoQP/ANT-SiN-2301-H3LoQP') | ||
if not path_project in sys.path: | ||
sys.path.append(path_project) | ||
import Dream_EBeam_Library_SiN | ||
''' |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.