full compile system build. 2. beam_spliter, MMI and spiral classes added
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
import nazca as nd
|
||||
import numpy as np
|
||||
|
||||
class Foundry:
|
||||
## Generall parameters
|
||||
STD_SMWG_WIDTH = 0.45
|
||||
SLAB_GROWTH = 2
|
||||
W_METAL_MIN = 1
|
||||
SPACING_HEATER_MIN = 1
|
||||
SPACING_METAL_MIN = 1.5
|
||||
W_HEATER_MIN = 1
|
||||
W_VIA_H2M = 0.25
|
||||
SPACING_VIA_H2M = 0.35
|
||||
ISL_W_MIN = 4
|
||||
ISL_SP_MIN = 5
|
||||
|
||||
show_pins = False
|
||||
|
||||
def __init__(self,layermap=None):
|
||||
if (layermap!=None):
|
||||
self.layermap = layermap
|
||||
for layers in layermap:
|
||||
|
||||
nd.add_layer(name=layers,layer=layermap[layers],overwrite=True) ## adding layers to the program, globally
|
||||
# nd.add_layer(name=layermap[layers][1],layer=layermap[layers][0],overwrite=True) ## same layer with different name
|
||||
|
||||
nd.add_xsection(name=layers.lower()) ## adding the same name xsections, globally
|
||||
nd.add_layer2xsection(xsection=layers.lower(), layer=layers)
|
||||
|
||||
setattr(self, "LAYER_"+layers, layers)
|
||||
setattr(self, "XS_"+layers, layers.lower())
|
||||
|
||||
|
||||
def _add_xsection_(self,xsection=None,layers=None,growth=None,growy=None):
|
||||
if (len(layers)!=len(growth)):
|
||||
print("WARNING: In <mxpic::Foundry> layer growth do not match number of layer")
|
||||
return 0
|
||||
|
||||
if (xsection!=None):
|
||||
nd.add_xsection(name=xsection)
|
||||
|
||||
for _idx_ in range(0,len(layers)):
|
||||
# nd.add_layer2xsection(xsection=xsection, layer=layers[_idx_],leftedge=(0.5, growth[_idx_]), rightedge=(-0.5, -growth[_idx_]),overwrite=True
|
||||
# ,growy1=growth[_idx_],growy2=growth[_idx_])
|
||||
nd.add_layer2xsection(xsection=xsection, layer=layers[_idx_],leftedge=(0.5, growth[_idx_]), rightedge=(-0.5, -growth[_idx_]),
|
||||
overwrite=True,growy1=growy,growy2=growy)
|
||||
setattr(self, "XS_"+xsection.upper(), xsection)
|
||||
|
||||
Reference in New Issue
Block a user