optical pins name revised. Pin type added
This commit is contained in:
@@ -125,8 +125,12 @@ class MMI_ML:
|
||||
_my_polygon(layer_wg=layers,vtx=vtx).put(0,0,0)
|
||||
|
||||
|
||||
nd.Pin(name='a1',width=Wsg[0]).put(0,0,180)
|
||||
nd.Pin(name='b1',width=Wsg[-1]).put(L,0,0)
|
||||
## revised in 2026.06.07 by Qin Yue
|
||||
# legacy: nd.Pin(name='a1',width=Wsg[0]).put(0,0,180)
|
||||
nd.Pin(name='opt_a1',width=Wsg[0],type="optical:").put(0,0,180)
|
||||
## revised in 2026.06.07 by Qin Yue
|
||||
# legacy: nd.Pin(name='b1',width=Wsg[-1]).put(L,0,0)
|
||||
nd.Pin(name='opt_b1',width=Wsg[-1],type="optical:").put(L,0,0)
|
||||
|
||||
""" For central MMI """
|
||||
L_mmi = 0
|
||||
@@ -159,17 +163,31 @@ class MMI_ML:
|
||||
L = max(Lsg_mmi)+b1*2
|
||||
nd.strt(length=L,layer=layers,width=w).put(-b1,0,0)
|
||||
|
||||
nd.Pin(name='a1',width=Wsg_mmi[0]).put(0,0,180)
|
||||
nd.Pin(name='b1',width=Wsg_mmi[-1]).put(L_mmi,0,0)
|
||||
## revised in 2026.06.07 by Qin Yue
|
||||
# legacy: nd.Pin(name='a1',width=Wsg_mmi[0]).put(0,0,180)
|
||||
nd.Pin(name='opt_a1',width=Wsg_mmi[0],type="optical:").put(0,0,180)
|
||||
## revised in 2026.06.07 by Qin Yue
|
||||
# legacy: nd.Pin(name='b1',width=Wsg_mmi[-1]).put(L_mmi,0,0)
|
||||
nd.Pin(name='opt_b1',width=Wsg_mmi[-1],type="optical:").put(L_mmi,0,0)
|
||||
|
||||
for idx_in in range(0,self.N_in):
|
||||
Arm_inst = Arm.put('b1',0,self.Dp_in*(-idx_in+(self.N_in-1)/2),180)
|
||||
nd.Pin(name='a'+str(round(idx_in+1)),pin=Arm_inst.pin['a1']).put()
|
||||
## revised in 2026.06.07 by Qin Yue
|
||||
# legacy: Arm_inst = Arm.put('b1',0,self.Dp_in*(-idx_in+(self.N_in-1)/2),180)
|
||||
Arm_inst = Arm.put('opt_b1',0,self.Dp_in*(-idx_in+(self.N_in-1)/2),180)
|
||||
## revised in 2026.06.07 by Qin Yue
|
||||
# legacy: nd.Pin(name='a'+str(round(idx_in+1)),pin=Arm_inst.pin['a1']).put()
|
||||
nd.Pin(name='opt_a'+str(round(idx_in+1)),pin=Arm_inst.pin['opt_a1'],type="optical:").put()
|
||||
|
||||
for idx_in in range(0,self.N_out):
|
||||
Arm_inst = Arm.put('b1',L_mmi,self.Dp_out*(-idx_in+(self.N_out-1)/2),0)
|
||||
nd.Pin(name='b'+str(round(idx_in+1)),pin=Arm_inst.pin['a1']).put()
|
||||
MMI.put('a1',0,0,0)
|
||||
## revised in 2026.06.07 by Qin Yue
|
||||
# legacy: Arm_inst = Arm.put('b1',L_mmi,self.Dp_out*(-idx_in+(self.N_out-1)/2),0)
|
||||
Arm_inst = Arm.put('opt_b1',L_mmi,self.Dp_out*(-idx_in+(self.N_out-1)/2),0)
|
||||
## revised in 2026.06.07 by Qin Yue
|
||||
# legacy: nd.Pin(name='b'+str(round(idx_in+1)),pin=Arm_inst.pin['a1']).put()
|
||||
nd.Pin(name='opt_b'+str(round(idx_in+1)),pin=Arm_inst.pin['opt_a1'],type="optical:").put()
|
||||
## revised in 2026.06.07 by Qin Yue
|
||||
# legacy: MMI.put('a1',0,0,0)
|
||||
MMI.put('opt_a1',0,0,0)
|
||||
|
||||
if (show_pins):
|
||||
nd.put_stub()
|
||||
@@ -190,12 +208,16 @@ class MMI_ML:
|
||||
pic_strip = Route(width=self.w_arm[0],radius=R_bend,xs=self.xs)
|
||||
for idx_in in range(0,self.N_in):
|
||||
GC = gc_cell.put('g1',-dX_gc2gc/2,dY_gc2gc*(-idx_in + (self.N_in-1)/2),180)
|
||||
pic_strip.sbend_p2p(pin1=GC.pin['g1'],pin2=INST.pin['a'+str(idx_in+1)],Lstart=dX_gc2gc/10).put()
|
||||
## revised in 2026.06.07 by Qin Yue
|
||||
# legacy: pic_strip.sbend_p2p(pin1=GC.pin['g1'],pin2=INST.pin['a'+str(idx_in+1)],Lstart=dX_gc2gc/10).put()
|
||||
pic_strip.sbend_p2p(pin1=GC.pin['g1'],pin2=INST.pin['opt_a'+str(idx_in+1)],Lstart=dX_gc2gc/10).put()
|
||||
|
||||
for idx_in in range(0,self.N_out):
|
||||
toggle = np.mod(idx_in,2)-0.5
|
||||
GC = gc_cell.put('g1', dX_gc2gc/2+Xout_offset*toggle,dY_gc2gc*(-idx_in + (self.N_out-1)/2),0)
|
||||
pic_strip.sbend_p2p(pin1=GC.pin['g1'],pin2=INST.pin['b'+str(idx_in+1)],Lstart=dX_gc2gc/10).put()
|
||||
## revised in 2026.06.07 by Qin Yue
|
||||
# legacy: pic_strip.sbend_p2p(pin1=GC.pin['g1'],pin2=INST.pin['b'+str(idx_in+1)],Lstart=dX_gc2gc/10).put()
|
||||
pic_strip.sbend_p2p(pin1=GC.pin['g1'],pin2=INST.pin['opt_b'+str(idx_in+1)],Lstart=dX_gc2gc/10).put()
|
||||
|
||||
return C
|
||||
|
||||
|
||||
Reference in New Issue
Block a user