Esempio n. 1
0
def align_wafer(
    width=10,
    spacing=10,
    cross_length=80,
    layer=pp.LAYER.WG,
    with_tile_excl=True,
    square_corner="bottom_left",
):
    """ returns cross inside a frame to align wafer

    .. plot::
      :include-source:

      import pp

      c = pp.c.fidutial()
      pp.plotgds(c)

    """
    c = pp.Component()
    cross = pp.c.cross(length=cross_length, width=width, layer=layer)
    c.add_ref(cross)

    b = cross_length / 2 + spacing + width / 2
    w = width

    c.add

    rh = rectangle_centered(w=2 * b + w, h=w, layer=layer)
    rtop = c.add_ref(rh)
    rbot = c.add_ref(rh)
    rtop.movey(+b)
    rbot.movey(-b)

    rv = rectangle_centered(w=w, h=2 * b, layer=layer)
    rl = c.add_ref(rv)
    rr = c.add_ref(rv)
    rl.movex(-b)
    rr.movex(+b)

    wsq = (cross_length + 2 * spacing) / 4
    square_mark = c << rectangle_centered(w=wsq, h=wsq, layer=layer)
    a = width / 2 + wsq / 2 + spacing

    corner_to_position = {
        "bottom_left": (-a, -a),
        "bottom_right": (a, -a),
        "top_right": (a, a),
        "top_left": (-a, a),
    }

    square_mark.move(corner_to_position[square_corner])

    if with_tile_excl:
        rc_tile_excl = rectangle_centered(w=2 * (b + spacing),
                                          h=2 * (b + spacing),
                                          layer=pp.layer("no_tile_si"))
        c.add_ref(rc_tile_excl)

    return c
Esempio n. 2
0
def add_frame(component, width=10, spacing=10, layer=pp.LAYER.WG):
    """ returns component with a frame around it
    """
    c = pp.Component()
    cref = c.add_ref(component)
    cref.move(-c.size_info.center)
    b = component.size_info.height / 2 + spacing + width / 2
    w = width

    rh = rectangle_centered(w=2 * b + w, h=w, layer=layer)
    rtop = c.add_ref(rh)
    rbot = c.add_ref(rh)
    rtop.movey(+b)
    rbot.movey(-b)

    rv = rectangle_centered(w=w, h=2 * b, layer=layer)
    rl = c.add_ref(rv)
    rr = c.add_ref(rv)
    rl.movex(-b)
    rr.movex(+b)
    c.absorb(cref)

    rc = rectangle_centered(w=2 * (b + spacing),
                            h=2 * (b + spacing),
                            layer=pp.LAYER.NO_TILE_SI)
    c.add_ref(rc)
    return c
Esempio n. 3
0
def pads_shorted(width=100, n_pads=8, pad_spacing=150, layer=LAYER.M1):
    c = Component(name="shorted_pads")
    pad = rectangle_centered(x=width, y=width, layer=layer)
    for i in range(n_pads):
        pad_ref = c.add_ref(pad)
        pad_ref.movex(i * pad_spacing - n_pads / 2 * pad_spacing +
                      pad_spacing / 2)

    short = rectangle_centered(x=pad_spacing * (n_pads - 1), y=10, layer=layer)
    c.add_ref(short)
    return c