コード例 #1
0
        chip_box = pya.Box(Point(0, 0), Point(CHIP.dx, CHIP.dy))
        cell.shapes(layer_photo).insert(chip_box)

        xmon_cross1 = Xmon_cross(CHIP.center + DPoint(-xmon_distance / 2, 0),
                                 cross_width, cross_len, cross_gnd_gap)
        xmon_cross1.place(cell, layer_photo)

        xmon_cross2 = Xmon_cross(CHIP.center + DPoint(xmon_distance / 2, 0),
                                 cross_width, cross_len, cross_gnd_gap)
        xmon_cross2.place(cell, layer_photo)

        ## DRAWING SECTION END ##
        # lv.zoom_fit()

        ### MATLAB COMMANDER SECTION START ###
        ml_terminal = SonnetLab()
        print("starting connection...")
        from sonnetSim.cMD import CMD

        ml_terminal._send(CMD.SAY_HELLO)
        ml_terminal.clear()
        simBox = SimulationBox(CHIP.dx, CHIP.dy, 600, 600)
        ml_terminal.set_boxProps(simBox)
        print("sending cell and layer")
        from sonnetSim.pORT_TYPES import PORT_TYPES

        ports = [
            SonnetPort(xmon_cross1.cpw_l.end, PORT_TYPES.AUTOGROUNDED),
            SonnetPort(xmon_cross2.cpw_r.end, PORT_TYPES.AUTOGROUNDED)
        ]
        ml_terminal.set_ports(ports)
コード例 #2
0
feedline_cp1.place(canvas)

rec = EmptyRectangle(feedline_cp1.end, 4e3, 15e3)
rec.place(canvas)

cell.shapes(layer_photo).insert(canvas)
cell.shapes(layer_el).insert(ebeam)

lv.zoom_fit()

ports = [
    SonnetPort(feedline_cp1.start, PORT_TYPES.BOX_WALL),
    SonnetPort(DPoint(CHIP.dx, CHIP.dy / 2), PORT_TYPES.BOX_WALL)
]

ml_terminal = SonnetLab()
print("starting connection...")
ml_terminal._send(CMD.SAY_HELLO)
ml_terminal.clear()
ml_terminal.set_boxProps(SimulationBox(CHIP.dx, CHIP.dy, 300, 300))
print("sending cell and layer")

ml_terminal.set_ports(ports)

ml_terminal.send_polygons(cell, layer_ph)
ml_terminal.set_ABS_sweep(6, 6)
print("simulating...")
ml_terminal.start_simulation(wait=True)
print("visualizing...")
ml_terminal.visualize_sever()
print("closing terminal")
コード例 #3
0
        Z0.place(cell, layer_photo)

        # delete Xmon cross
        shapes = cell.shapes(layer_photo)
        for shape in shapes.each_overlapping(pya.Box(xmon_center,
                                                     xmon_center)):
            # if shape is polygon and contains xmon_center inside
            # then delete this polygon
            if shape.is_polygon and shape.polygon.inside(xmon_center):
                shape.delete()

        ## DRAWING SECTION END ##
        lv.zoom_fit()

        ### MATLAB COMMANDER SECTION START ###
        ml_terminal = SonnetLab()
        print("starting connection...")
        from sonnetSim.cMD import CMD
        ml_terminal._send(CMD.SAY_HELLO)
        ml_terminal.clear()
        simBox = SimulationBox(CHIP.dx, CHIP.dy, CHIP.nX, CHIP.nY)
        ml_terminal.set_boxProps(simBox)
        print("sending cell and layer")
        from sonnetSim.pORT_TYPES import PORT_TYPES
        ports = [
            SonnetPort(point, PORT_TYPES.BOX_WALL)
            for point in [Z0.start, Z0.end]
        ]
        ml_terminal.set_ports(ports)

        ml_terminal.send_polygons(cell, layer_photo)
コード例 #4
0
        translation_trans = DCplxTrans(-DVector(chip_p1))
        worm.make_trans(translation_trans)
        worm.place(cell, layer_photo)

        empty_cpw_tail_start.place(cell, layer_photo)
        empty_cpw_tail_start.make_trans(translation_trans)
        empty_cpw_tail_start.place(cell, layer_photo)

        xmonCross.make_trans(translation_trans)
        xmonCross.place(cell, layer_photo)

        ## DRAWING SECTION END ##
        lv.zoom_fit()

        ### MATLAB COMMANDER SECTION START ###
        ml_terminal = SonnetLab()
        print("starting connection...")
        from sonnetSim.cMD import CMD

        ml_terminal._send(CMD.SAY_HELLO)
        ml_terminal.clear()
        simBox = SimulationBox(CHIP.dx, CHIP.dy, 200, 300)
        ml_terminal.set_boxProps(simBox)
        print("sending cell and layer")
        from sonnetSim.pORT_TYPES import PORT_TYPES

        ports = [
            SonnetPort(worm.cop_tail.start, PORT_TYPES.AUTOGROUNDED),
            SonnetPort(xmonCross.cpw_b.end, PORT_TYPES.AUTOGROUNDED)
        ]
        ml_terminal.set_ports(ports)