教程 27介绍了两段波导等长布线的例子,下面同样是通过控制偏移量实现三段波导的等长布线:
luceda ipkiss教程 62:等长波导布线(二)-LMLPHP
所有代码如下:

from si_fab import all as pdk
from ipkiss3 import all as i3


class demo(i3.Circuit):
    mmi = i3.ChildCellProperty(doc="mmi in circuit")

    def _default_mmi(self):
        return pdk.MMI1x2Optimized1550()

    def _default_insts(self):
        insts = {
            "mmi1": self.mmi,
            "mmi2": self.mmi,
            "mmi3": self.mmi,
        }
        return insts

    def _default_specs(self):
        specs = [
            i3.Place("mmi1:out1", (0, 0)),
            i3.Place("mmi2:in1", (60, 40)),
            i3.Place("mmi3:in1", (80, -20)),
            i3.FlipH("mmi2"),
            i3.FlipH("mmi3"),
            i3.ConnectManhattan(
                "mmi1:out2",
                "mmi2:out2",
                bend_radius=5,
                control_points=[
                    i3.H(i3.END + 15 + 0.004),
                ],
            ),
            i3.ConnectManhattan(
                "mmi2:out1",
                "mmi3:out2",
                bend_radius=5,
                control_points=[
                    i3.V(i3.START - 13.5 + 0.007),
                    i3.H(i3.END + 20),
                ],
            ),
            i3.ConnectManhattan(
                "mmi1:out1",
                "mmi3:out1",
                bend_radius=5,
                control_points=[
                    i3.H(i3.END - 14),
                ],
            ),
        ]
        return specs


if __name__ == "__main__":
    my_circuit = demo().Layout()
    l1 = demo().Layout().layout[3].reference.trace_length()
    l2 = demo().Layout().layout[4].reference.trace_length()
    l3 = demo().Layout().layout[5].reference.trace_length()
    print("the length of l1 is %f" % l1)
    print("the length of l2 is %f" % l2)
    print("the length of l2 is %f" % l3)
    my_circuit.visualize(annotate=True)

代码运行结果:
luceda ipkiss教程 62:等长波导布线(二)-LMLPHP

03-19 02:41