Esempio n. 1
0
    def draw(self, cell):
        cell = self.draw_gds_cell(cell)
        _, ex, ey = self.origin_ex_ey()

        opt1_position = -7.4 * ex + 0 * ey
        opt2_position = 7.4 * ex + 2.75 * ey
        opt3_position = 7.4 * ex + -2.75 * ey

        ports = [
            Port("opt1", opt1_position, -ex, 0.5),
            Port("opt2", opt2_position, ex, 0.5),
            Port("opt3", opt3_position, ex, 0.5),
        ]

        return cell, {port.name: port for port in ports}
Esempio n. 2
0
    def draw(self, cell):
        layout = cell.layout()

        cp = self.get_cell_params()
        lay = self.get_layers(layout)
        origin, ex, ey = self.origin_ex_ey()

        w_mh = cp.mh_width
        length = cp.mh_length
        w_contacts = cp.w_contacts

        input_port_position = origin - length / 2 * ex
        output_port_postion = origin + length / 2 * ex
        x_off = length / 2 - w_contacts / 2
        y_off = w_mh / 2 + w_contacts / 2

        input_contact_position = origin - x_off * ex + y_off * ey
        output_contact_position = origin + x_off * ex + y_off * ey

        # draw metal heater
        layout_waveguide(cell, lay.M_Heater,
                         [input_port_position, output_port_postion], w_mh)

        # draw metal contacts

        # Left contacts
        contact_points = [
            origin - x_off * ex + (y_off - w_contacts / 2) * ey,
            origin - x_off * ex + (y_off + w_contacts / 2) * ey,
        ]

        layout_waveguide(cell, lay.M_Heater, contact_points, w_contacts)
        layout_waveguide(cell, lay.ML, contact_points, w_contacts)

        # Right contacts
        contact_points = [
            origin + x_off * ex + (y_off - w_contacts / 2) * ey,
            origin + x_off * ex + (y_off + w_contacts / 2) * ey,
        ]
        layout_waveguide(cell, lay.M_Heater, contact_points, w_contacts)
        layout_waveguide(cell, lay.ML, contact_points, w_contacts)

        ports = [
            Port("el_contact_1", input_contact_position, ey, w_contacts),
            Port("el_contact_2", output_contact_position, ey, w_contacts),
        ]

        return cell, {port.name: port for port in ports}
Esempio n. 3
0
    def draw(self, cell):
        layout = cell.layout()

        origin, ex, ey = self.origin_ex_ey()
        cp = self.params

        def make_shape_from_dpolygon(dpoly, resize_dx, dbu, layer):
            dpoly.resize(resize_dx, dbu)
            # if resize_dx > dbu:
            #     dpoly.round_corners(resize_dx, 100)
            insert_shape(cell, layer, dpoly)
            return dpoly

        def make_pad(origin, pad_width, pad_height, ex, ey):
            pad_square = rectangle(origin, pad_width, pad_height, ex, ey)
            make_shape_from_dpolygon(pad_square, 0, layout.dbu, cp.layer_metal)
            make_shape_from_dpolygon(pad_square, -2.5, layout.dbu,
                                     cp.layer_opening)

        make_pad(origin + cp.pad_height * ey / 2, cp.pad_width, cp.pad_height,
                 ex, ey)

        port = Port("el0", origin + cp.port_width * ey / 2, -ey, cp.port_width,
                    "el_dc")

        return cell, {"el0": port}