optical pins name revised. Pin type added

This commit is contained in:
=
2026-06-07 22:56:33 +08:00
parent a4ac88f002
commit 8462c3397f
262 changed files with 3251 additions and 1134 deletions
+46 -16
View File
@@ -44,9 +44,13 @@ class SplittingTree():
# self.yb_length = ybranch.length
self.yb_length = np.abs(self.yb_cell.pin['a1'].x - self.yb_cell.pin['b1'].x)
## revised in 2026.06.07 by Qin Yue
# legacy: self.yb_length = np.abs(self.yb_cell.pin['a1'].x - self.yb_cell.pin['b1'].x)
self.yb_length = np.abs(self.yb_cell.pin['opt_a1'].x - self.yb_cell.pin['opt_b1'].x)
# self.yb_width = ybranch.width
self.yb_width = np.abs(self.yb_cell.pin['b1'].y - self.yb_cell.pin['b2'].y)
## revised in 2026.06.07 by Qin Yue
# legacy: self.yb_width = np.abs(self.yb_cell.pin['b1'].y - self.yb_cell.pin['b2'].y)
self.yb_width = np.abs(self.yb_cell.pin['opt_b1'].y - self.yb_cell.pin['opt_b2'].y)
self.w_wg = ybranch.w_wg
self.output_number = output_number
@@ -85,29 +89,49 @@ class SplittingTree():
for yb_index in range(np.power(2, level_index)):
y_cur = y_pitch * ((np.power(2, level_index)-1)/2 - yb_index)
# Put the Y-branch
cell_dic[str(level_index)+str(yb_index)] = self.yb_cell.put('a1', x_cur, y_cur)
## revised in 2026.06.07 by Qin Yue
# legacy: cell_dic[str(level_index)+str(yb_index)] = self.yb_cell.put('a1', x_cur, y_cur)
cell_dic[str(level_index)+str(yb_index)] = self.yb_cell.put('opt_a1', x_cur, y_cur)
# Do the routing
stripe_class.sbend_p2p(
pin1=cell_dic[str(level_index-1)+str(yb_index//2)].pin['b'+str(yb_index%2+1)],
pin2=cell_dic[str(level_index)+str(yb_index)].pin['a1'],
## revised in 2026.06.07 by Qin Yue
# legacy: pin1=cell_dic[str(level_index-1)+str(yb_index//2)].pin['b'+str(yb_index%2+1)],
pin1=cell_dic[str(level_index-1)+str(yb_index//2)].pin['opt_b'+str(yb_index%2+1)],
## revised in 2026.06.07 by Qin Yue
# legacy: pin2=cell_dic[str(level_index)+str(yb_index)].pin['a1'],
pin2=cell_dic[str(level_index)+str(yb_index)].pin['opt_a1'],
Lstart=1,
arrow=False
).put()
## Put pins
nd.Pin(name="a0").put(0, 0, 180)
nd.Pin(name="a1",width=self.w_wg).put(0, 0, 180)
## revised in 2026.06.07 by Qin Yue
# legacy: nd.Pin(name="a1",width=self.w_wg).put(0, 0, 180)
nd.Pin(name="opt_a1",width=self.w_wg,type="optical:").put(0, 0, 180)
level_index = int(self.level_number-1)
for yb_index in range(np.power(2, level_index)):
nd.Pin(
name="b"+str(2*yb_index+1),
width=self.w_wg
).put(cell_dic[str(level_index)+str(yb_index)].pin['b1'])
## revised in 2026.06.07 by Qin Yue
# legacy: name="b"+str(2*yb_index+1),
name="opt_b"+str(2*yb_index+1),
width=self.w_wg,
type="optical:"
## revised in 2026.06.07 by Qin Yue
# legacy: ).put(cell_dic[str(level_index)+str(yb_index)].pin['b1'])
).put(cell_dic[str(level_index)+str(yb_index)].pin['opt_b1'])
nd.Pin(
name="b"+str(2*yb_index+2),
width=self.w_wg
).put(cell_dic[str(level_index)+str(yb_index)].pin['b2'])
## revised in 2026.06.07 by Qin Yue
# legacy: name="b"+str(2*yb_index+2),
name="opt_b"+str(2*yb_index+2),
width=self.w_wg,
type="optical:"
## revised in 2026.06.07 by Qin Yue
# legacy: ).put(cell_dic[str(level_index)+str(yb_index)].pin['b2'])
).put(cell_dic[str(level_index)+str(yb_index)].pin['opt_b2'])
nd.Pin(name="b0").put(
cell_dic[str(level_index)+str(yb_index)].pin['b2'].x,
## revised in 2026.06.07 by Qin Yue
# legacy: cell_dic[str(level_index)+str(yb_index)].pin['b2'].x,
cell_dic[str(level_index)+str(yb_index)].pin['opt_b2'].x,
0,
0
)
@@ -130,7 +154,13 @@ class SplittingTree():
nd.strt(length=0.2, width=self.w_wg, layer=(1001, 2)).put(self.yb_length, -self.yb_width/2, 180)
## Put pins
nd.Pin(name="a0", width=self.w_wg).put(0, 0, 180)
nd.Pin(name="a1", width=self.w_wg).put(0, 0, 180)
nd.Pin(name="b1", width=self.w_wg).put(self.yb_length, self.yb_width/2, 0)
nd.Pin(name="b2", width=self.w_wg).put(self.yb_length, -self.yb_width/2, 0)
## revised in 2026.06.07 by Qin Yue
# legacy: nd.Pin(name="a1", width=self.w_wg).put(0, 0, 180)
nd.Pin(name="opt_a1", width=self.w_wg,type="optical:").put(0, 0, 180)
## revised in 2026.06.07 by Qin Yue
# legacy: nd.Pin(name="b1", width=self.w_wg).put(self.yb_length, self.yb_width/2, 0)
nd.Pin(name="opt_b1", width=self.w_wg,type="optical:").put(self.yb_length, self.yb_width/2, 0)
## revised in 2026.06.07 by Qin Yue
# legacy: nd.Pin(name="b2", width=self.w_wg).put(self.yb_length, -self.yb_width/2, 0)
nd.Pin(name="opt_b2", width=self.w_wg,type="optical:").put(self.yb_length, -self.yb_width/2, 0)
self.yb_cell = C