-
Notifications
You must be signed in to change notification settings - Fork 1
/
RunLibrary.lym
46 lines (38 loc) · 1.17 KB
/
RunLibrary.lym
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<?xml version="1.0" encoding="utf-8"?>
<klayout-macro>
<description/>
<version/>
<category>pymacros</category>
<prolog/>
<epilog/>
<doc/>
<autorun>false</autorun>
<autorun-early>false</autorun-early>
<shortcut/>
<show-in-menu>false</show-in-menu>
<group-name/>
<menu-path/>
<interpreter>python</interpreter>
<dsl-interpreter-name/>
<text>"""
This macros is automatically ran at startup, and register custom pcells and my own library
"""
import pya
class MyLib(pya.Library):
"""
The library where we will put the PCell into
"""
def __init__(self):
# Set the description
self.description = "LFL Library"
# Create the PCell declarations
self.layout().register_pcell("MakeMeanderCPW", MakeMeanderCPW())
self.layout().register_pcell("NBRCoupler", NBRCoupler())
self.layout().register_pcell("CouplingPort", CouplingPort())
# That would be the place to put in more PCells ...
# Register us with the name "MyLib".
# If a library with that name already existed, it will be replaced then.
self.register("LFL_Lib")
# Instantiate and register the library
MyLib()</text>
</klayout-macro>