本文主要是介绍luceda ipkiss教程 41:画跑道型微环,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
利用picazzo库中的方向耦合器绘制跑道型微环:
from si_fab import all as pdk
from ipkiss3 import all as i3
from picazzo3.wg.dircoup import StraightDirectionalCouplerclass RingResonator(i3.PCell):trace_template = i3.TraceTemplateProperty(default=pdk.SiWireWaveguideTemplate(),doc="Trace template of the bus waveguide, also used for the default loopback waveguide")coupling_length = i3.PositiveNumberProperty(default=10, doc="The coupling length of the ring resonator")spacing = i3.PositiveNumberProperty(default=0.5, doc="The spacing between the bus and ring waveguides")class Layout(i3.LayoutView):def _generate_instances(self, insts):coupler = StraightDirectionalCoupler(trace_template1=self.trace_template,coupler_length=self.coupling_length)coupler.Layout(coupler_spacing=self.spacing)instances = {'coupler': coupler}specs = [i3.ConnectManhattan('coupler:out2','coupler:in2',control_points=[i3.V(i3.START + i3.TECH.WIREWG.BEND_RADIUS),i3.H(i3.PREV + 2 * i3.TECH.WIREWG.BEND_RADIUS)],min_straight=0)]insts += i3.place_and_route(insts=instances, specs=specs)return instsdef _generate_ports(self, ports):ports += i3.expose_ports(instances=self.instances,port_name_map={'coupler:in1': 'in','coupler:out1': 'out'})return portsclass Netlist(i3.NetlistFromLayout):passclass CircuitModel(i3.CircuitModelView):def _generate_model(self):return i3.HierarchicalModel.from_netlistview(self.netlist_view)if __name__ == "__main__":default_ring = RingResonator(coupling_length=10,)default_ring_lv = default_ring.Layout()default_ring_lv.visualize(annotate=True)
这篇关于luceda ipkiss教程 41:画跑道型微环的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!