Exemplo n.º 1
0
    def cell(length=length, width_sig=width_sig, width_gnd=width_gnd, gap=gap):
        """Create a GSG RF line cell.

        Returns:
           Cell
        """
        with nd.Cell(name=pdk._hash_name, instantiate=False) as C:
            C.groupname = groupname
            pdk.addBBmap(name)

            #bb_width = width_sig + 2*width_gnd + 2*gap
            width = width_sig
            sig = nd.strt(length=length, width=width, xs=xs['a0']).put(0)
            nd.Pin(name='a0', xs=xs['a0'], width=pinwidth['a0'], remark='electrical').put(sig.pin['a0'])
            nd.Pin(name='b0', xs=xs['b0'], width=pinwidth['b0'], remark='electrical').put(sig.pin['b0'])

            pdk.put_stub(['a0', 'b0'])
            #pdk.put_boundingbox('org', length, bb_width)
            #pdk.parameters(pdk._hash_params).put(0)
            #pdk.cellname(C.cell_name, length, align='rc').put(-0.25*length, 'b0')

            width = width_gnd
            #nd.strt(length=length, width=width+2*width_gnd+2*gap+2*wext_bg, layer='bbox').put(0)
            nd.strt(length=length, width=width, xs=xs['a0']).put(0, -gap-0.5*(width_sig+width_gnd))
            nd.strt(length=length, width=width, xs=xs['a0']).put(0, +gap+0.5*(width_sig+width_gnd))

            if xs_bg is not None:
                nd.strt(length=length, width=xs_bg_width, xs=xs_bg).put(0)

            cfg.cp = C.pin['b0']
        return C
    def cell(length=length, pitch=pitch, duty_cycle=duty_cycle):
        """Create a DBR cell.

        Args:
            length (float): length of DBR section in um
            pitch (float): pitch (full period) of dbr in um
            duty_cycle (float): duty cycle of grating (default = 0.5)

        Returns:
            Cell: dbr element
        """
        with nd.Cell(hashme=True) as C:
            C.groupname = groupname
            C.foundry_spt = []
            pdk.addBBmap(name, params=(length, pitch, duty_cycle))
            nd.Pin(name='a0', xs=xs['a0'], width=pinwidth['a0']).put(0, 0, 180)
            nd.Pin(name='b0', xs=xs['b0'], width=pinwidth['b0']).put(length)
            nd.Pin(name='c0', xs=xs['c0'], width=pinwidth['c0']).put(length/2, 5.0, 90)

            pdk.put_stub(['a0', 'b0', 'c0'])
            pdk.put_boundingbox('org', length, width)

            if icon:
                icon(length, width).put(0)

        return C
    def cell(length=length, pads=pads):
        """Create a SOA cell.

        Args:
            length (float): SOA length in um

        Returns:
            Cell; SOA element
        """
        nonlocal width
        with nd.Cell(hashme=True) as C:
            C.groupname = groupname
            pdk.addBBmap(name, params=(length))
            nd.Pin(name='a0', xs=xs['a0'],
                   width=pinwidth['a0']).put(0, dy_io, 180)
            nd.Pin(name='b0', xs=xs['b0'],
                   width=pinwidth['b0']).put(length, dy_io, 0)
            nd.Pin(name='c0', xs=xs['c0'],
                   width=pinwidth['c0']).put(length / 2, dy_io, 90)

            if pads:
                bb_width = padwidth
            else:
                bb_width = width

            pdk.put_stub(['a0', 'b0', 'c0'])
            pdk.put_boundingbox('org', length, bb_width, align='lb')
            if icon:
                icon(length, bb_width).put(0, 0, 180, 'lc')
            cfg.cp = C.pin['b0']
        return C
    def cell(length=length, width=width):
        """Create a DCpad_lw cell.

        Args:
            length (float): length of the pad in um
            width (float): width of the pad in um

        Returns:
            Cell: dcpad element
        """
        with nd.Cell(hashme=True) as C:
            C.groupname = groupname
            C.default_pins('c0','c0')
            buf = 10
            bb_width = width + buf
            bb_length = length + buf
            nd.Pin(name='c0', xs=xs['c0'], width=pinwidth['c0'], remark='electrical').\
                put(0.5*bb_length, 0, 180)
            pdk.put_stub('c0', length=pinwidth['c0'], shape='circle')
            pdk.put_boundingbox('org', bb_length, bb_width)

            for lay, grow, acc in nd.layeriter(xs['c0']):
                pad = nd.geom.rounded_rect(
                    length=length+grow, height=width, position=5)
                nd.Polygon(layer=lay, points=pad).\
                    put(C.pin['c0'])
        return C
    def cell(length=length):
        """Create and return a DCpad cell.

        Args:
            length (float): pad length in um
            width (float): pad width in um

        Returns:
            Cell: pad element
        """
        with nd.Cell(hashme=True) as C:
            C.groupname = groupname
            C.foundry_spt = []
            bb_length = length + 2*buf_length

            pdk.addBBmap(name, params=(length, tab_width, "RoundedRectangle"),
                trans=(0.5*(length-100), 0, 0))
            C.default_pins('c0','c0')
            nd.Pin(name='c0', xs=xs['c0'], width=pinwidth['c0'], remark='electrical').\
                put(0.5*bb_length, 0, 180)

            pdk.put_stub('c0', length=pinwidth['c0'], shape='circle')
            pdk.put_boundingbox('org', bb_length, bb_length)

            if icon:
                icon(bb_length, bb_length).put(0, 'cc')
        return C
    def cell(diameter=diameter):
        """Create a DCpad cell.

        Args:
            diameter (float): diameter of circular debt

        Returns:
            Cell
        """
        with nd.Cell(hashme=True) as C:
            C.groupname = groupname
            pdk.addBBmap(name)
            bb_width = diameter + 2*buf_width
            bb_length = diameter + 2*buf_length

            C.default_pins('c0', 'c0')
            nd.Pin(name='c0', xs=xs['c0'], width=pinwidth['c0'], remark='electrical').\
                put(0.5*bb_length, 0, 180)

            pdk.put_stub('c0', length=pinwidth['c0'], shape='circle')
            pdk.put_boundingbox('org', bb_length, bb_width)

            for lay, grow, acc in nd.layeriter(xs['c0']):
                pad = nd.geom.circle(radius=0.5*diameter, N=100)
                nd.Polygon(layer=lay, points=pad).\
                    put('cc')

        return C
Exemplo n.º 7
0
    def cell(length=length, angle=angle):
        anglerad = radians(angle)
        """Create a trapezoidal IO cell.

        Returns:
            Cell
        """
        with nd.Cell(hashme=True, instantiate=False) as C:
            #When instantiate is True, cell put in (0,0,0)
            nd.Pin(name='a0', xs=xs['a0'], width=pinwidth['a0']).put(0, 0, 180)
            nd.Pin(name='b0', xs=xs['b0'], width=pinwidth['b0']).\
                put(length/cos(anglerad)-0.5*width*tan(abs(anglerad)))

            pdk.put_stub(['b0'])
            pdk.cellname(length=0.5 * length).put(-0.1 * length, 0, 180, 'a0')

            for lay, grow, acc in nd.layeriter(xs['a0']):
                outline = nd.geom.trapezoid(length=length / cos(anglerad) +
                                            grow * tan(abs(anglerad)),
                                            height=width + 2 * grow,
                                            angle1=90 + angle,
                                            angle2=90,
                                            position=2)
                nd.Polygon(layer=lay, points=outline).put(0)
            cfg.cp = C.pin['b0']
            C.groupname = groupname
        return C
Exemplo n.º 8
0
    def cell(length=length, angle=angle):
        anglerad = radians(angle)
        """Create a trapezoidal IO cell.

        Returns:
            Cell
        """
        with nd.Cell(hashme=True, instantiate=False) as C:
            """When instantiate is True, cell put in (0, 0, 0)"""
            nd.Pin(name='a0', xs=xs['a0'], width=pinwidth['a0']).put(0, 0, 180)
            nd.Pin(name='b0', xs=xs['b0'], width=pinwidth['b0']).\
                put(0.5*length*(1.0+1.0/cos(anglerad)))

            pdk.put_stub(['a0', 'b0'])
            pdk.cellname(length=0.5 * length).put(C.pin['a0'].rot(180))

            temp_a = tan(anglerad) + 0.5 * width * tan(anglerad)
            temp_b = length / cos(anglerad) + length
            for lay, grow, acc in nd.layeriter(xs['a0']):
                outline = [(0, 0.5 * width + grow),
                           (0.5 * temp_b - (width + grow) * temp_a,
                            0.5 * width + grow),
                           (0.5 * temp_b + grow * temp_a, -0.5 * width - grow),
                           (0, -0.5 * width - grow)]
                nd.Polygon(layer=lay, points=outline).put(0)
            cfg.cp = C.pin['b0']
        C.groupname = groupname
        return C
    def cell(length=length, pitch=pitch, metal=metal):
        """Create a DBR cell.

        Args:
            length (float):
            pitch (float):

        Returns:
            Cell
        """
        duty_cycle = 0.5
        if metal:
            contact = 1
        else:
            contact = 0
        with nd.Cell(hashme=True) as C:
            C.groupname = groupname
            pdk.addBBmap(name, params=(length, pitch, duty_cycle, contact))
            nd.Pin(name='a0', xs=xs['a0'], width=pinwidth['a0']).put(0, 0, 180)
            nd.Pin(name='b0', xs=xs['b0'], width=pinwidth['b0']).put(length)
            nd.Pin(name='c0', xs=xs['c0'], width=pinwidth['c0']).put(0.5*length, 0, 90)

            pdk.put_stub(['a0', 'b0', 'c0'])
            pdk.put_boundingbox('org', length, width)

            if icon:
                icon(length, width).put(0)
        return C
Exemplo n.º 10
0
    def cell(length=length):
        """Create a photodetector RF cell.

        Returns:
            Cell
        """
        cshift = 0
        with nd.Cell(hashme=True) as C:
            C.default_pins('a0', 'a0')
            C.groupname = groupname
            C.foundry_spt = []
            pdk.addBBmap(name)
            nd.Pin(name='a0', xs=xs['a0'], width=pinwidth['a0'], remark='optical').\
                put(0, 0, 180)
            nd.Pin(name='c0', xs=xs['c0'], width=pinwidth['c0'], remark='gnd').\
                put(length, cshift-spaceGS-pinwidth['c0'])
            nd.Pin(name='c1', xs=xs['c1'], width=pinwidth['c1'], remark='signal').\
                put(length, cshift)
            nd.Pin(name='c2', xs=xs['c2'], width=pinwidth['c2'], remark='gnd').\
                put(length, cshift+spaceGS+pinwidth['c2'])

            pdk.put_stub(['a0'])
            pdk.put_boundingbox('org', length, width)
            if icon:
                icon(length, width).put(0)
            pdk.put_stub(['c0', 'c1', 'c2'])
        return C
Exemplo n.º 11
0
    def cell(length=length, contacts=contacts):
        """Create an electro-optical phase modulator (EOPM) cell.

        Their can be from 0 up to <contacts> contac points.
        They will be equidistantly spaced along the modulator.

        Args:
            length (float): length of the EOPM.
            contacts (int): number of contact
            pads (bool): draw pads

        Returns:
            Cell: eopm
        """
        with nd.Cell(hashme=True) as C:
            C.groupname = groupname
            pdk.addBBmap(name, params=(length))

            # modulator section:
            nd.Pin(name='a0',
                   xs=xs['a0'],
                   width=pinwidth['a0'],
                   remark='optical').put(0, 0, 180)
            nd.Pin(name='b0',
                   xs=xs['b0'],
                   width=pinwidth['b0'],
                   remark='optical').put(length)

            # x-positions of pads:
            L = 0.5 * (length - pinwidth['c0'])
            xpos = []
            if contacts > 1:
                for n in range(contacts):
                    xpos.append(0.5 * pinwidth['c0'] + L * 2 * n /
                                (contacts - 1))
            elif contacts == 1:
                xpos = [0.5 * length]
            elif contacts == 0:
                pass

            for n, x in enumerate(xpos):
                pinname = 'c' + str(n)
                p1 = nd.Pin(name=pinname, xs=xs['c0'], width=pinwidth['c0']).\
                    put(x, 0, 90)
                nd.put_stub(pinname)

            pdk.put_stub(['a0', 'b0'])
            pdk.put_boundingbox('org', length, width)

            if icon:
                icon(length, width).put(0)

            cfg.cp = C.pin['b0']
        return C
Exemplo n.º 12
0
    def cell(length=length):
        """Create an Isolation cell.

        Returns:
            Cell
        """
        with nd.Cell(hashme=True) as C:
            pdk.addBBmap(name, params=(length))
            nd.Pin(name='a0', xs=xs['a0'], width=pinwidth['a0']).put(0, 0, 180)
            nd.Pin(name='b0', xs=xs['b0'], width=pinwidth['b0']).put(length)

            pdk.put_stub(['a0', 'b0'])
            pdk.put_boundingbox('org', length, width)
            C.groupname = groupname
        return C
Exemplo n.º 13
0
    def cell():
        """Create a BB1x1 cell.

        Returns:
            Cell
        """
        with nd.Cell(hashme=True) as C:
            C.foundry_spt = []
            #pdk.addBBmap(name)
            nd.Pin(name='a0', xs=xs['a0'], width=pinwidth['a0']).put(0, 0, 180)
            nd.Pin(name='b0', xs=xs['b0'],
                   width=pinwidth['b0']).put(length, bshift)

            pdk.put_stub(['a0', 'b0'])
            pdk.put_boundingbox('org', length, width)

            cfg.cp = C.pin['b0']
            C.groupname = groupname
        return C
Exemplo n.º 14
0
    def cell():
        """
        Create a XS-transition cell.

        Returns:
            Cell
        """
        with nd.Cell(hashme=True) as C:
            pdk.addBBmap(name)
            nd.Pin(name='a0', xs=xs['a0'], width=pinwidth['a0']).put(0, 0, 180)
            nd.Pin(name='b0', xs=xs['b0'], width=pinwidth['b0']).put(length)

            pdk.put_stub(['a0', 'b0'])
            pdk.put_boundingbox('org', length, width)
            if icon:
                icon(length, width).put(0)

            C.groupname = groupname
        return C
Exemplo n.º 15
0
    def cell(radius=radius, angle=angle, width_sig=width_sig,
            width_gnd=width_gnd, gap=gap):
        """Create a GSG RF bend cell.

        Returns:
            Cell
        """
        with nd.Cell(name=pdk._hash_name, instantiate=False) as C:
            C.groupname = groupname
            pdk.addBBmap(name)

            width = width_sig
            Sig = nd.bend(radius=radius, angle=angle, width=width, xs=xs['a0']).put(0)
            nd.Pin(name='a0', xs=xs['a0'], width=pinwidth['a0'], remark='electrical').put(Sig.pin['a0'])
            nd.Pin(name='b0', xs=xs['b0'], width=pinwidth['b0'], remark='electrical').put(Sig.pin['b0'])

            #pdk.put_boundingbox('org', length, width)
            pdk.put_stub(['a0', 'b0'])
            #pdk.parameters(pdk._hash_params).put(-0.25*radius, 'b0')
            #pdk.cellname(C.cell_name, radius, align='rc').put(-0.25*radius, 'b0')

            #w = width+2*width_gnd+2*gap+2*wext_bg
            #nd.bend(radius=radius, angle=angle, width=w, layer='bbox').put(0)

            width = width_gnd
            if (angle > 0 and radius > 0) or (angle < 0 and radius < 0):
                Rin = radius-gap-0.5*width_gnd-0.5*width_sig
                Rout = radius+gap+0.5*width_gnd+0.5*width_sig
            else:
                Rout = radius-gap-0.5*width_gnd-0.5*width_sig
                Rin = radius+gap+0.5*width_gnd+0.5*width_sig

            nd.bend(radius=Rin, angle=angle, width=width, xs=xs['a0']).\
                put(0, gap+0.5*width_gnd+0.5*width_sig)
            nd.bend(radius=Rout, angle=angle, width=width, xs=xs['a0']).\
                put(0, -gap-0.5*width_gnd-0.5*width_sig)

            if xs_bg is not None:
                nd.bend(radius=radius, angle=angle, width=xs_bg_width, xs=xs_bg).put(0)

            cfg.cp = C.pin['b0']

        return C
Exemplo n.º 16
0
    def cell(length=length, width=width):
        """Create a RFpad cell.

        Returns:
            Cell
        """
        with nd.Cell(name=pdk._hash_name) as C:
            C.default_pins('c0','c0')
            C.groupname = groupname

            nd.Pin(name='c0', xs=xs['c0'], width=pinwidth['c0'], remark='electrical').put(0, 0, 180)

            pdk.put_stub('c0')
            pdk.put_boundingbox('org', length, width)
            pdk.addBBmap(name)

            if icon:
                icon(length, width).put(0)

        return C
Exemplo n.º 17
0
    def cell():
        """Create a Modefilter cell.

        Returns:
            Cell
        """
        with nd.Cell(hashme=True) as C:
            C.groupname = groupname
            C.version = version
            C.store_pins = store_pins
            pdk.addBBmap(name) # no OD_toStd
            nd.Pin(name='a0', xs=xs['a0'], width=pinwidth['a0'], remark='optical').put(0, 0, 180)
            nd.Pin(name='b0', xs=xs['b0'], width=pinwidth['b0'], remark='optical').put(length)

            pdk.put_stub(['a0', 'b0'])
            pdk.put_boundingbox('org', length, width)

            if icon:
                icon(length, width).put(0)

        return C
Exemplo n.º 18
0
    def cell():
        """Create and return a MIR_1p cell.

        Returns:
            Cell
        """
        with nd.Cell(hashme=True) as C:
            C.default_pins('a0', 'a0')
            C.version = version
            C.store_pins = store_pins
            C.groupname = groupname
            pdk.addBBmap(name, params=(OD_toStd))
            nd.Pin(name='a0', xs=xs['a0'], width=pinwidth['a0'], remark='optical').put(0, 0, 180)
            #nd.Pin(name='b0', xs=xs['b0'], width=pinwidth['b0']).put(0, 0, 180)

            pdk.put_stub(['a0'])
            pdk.put_boundingbox('org', length, width)

            if icon:
                icon(length, width).put(0)

        return C
Exemplo n.º 19
0
    def cell():
        """
        Create a MMI2x2 cell.

        Returns:
            Cell
        """
        with nd.Cell(hashme=True) as C:
            C.groupname = groupname
            C.version = version
            C.store_pins = store_pins
            pdk.addBBmap(name, params=(OD_toStd))
            nd.Pin(name='a0', xs=xs['a0'], width=pinwidth['a0'], remark='optical').put(0, offset[0], 180)
            nd.Pin(name='a1', xs=xs['a1'], width=pinwidth['a1'], remark='optical').put(0, offset[1], 180)
            nd.Pin(name='b0', xs=xs['b0'], width=pinwidth['b0'], remark='optical').put(length, offset[2])
            nd.Pin(name='b1', xs=xs['b1'], width=pinwidth['b1'], remark='optical').put(length, offset[3])

            pdk.put_stub(['a0', 'a1', 'b0', 'b1'])
            pdk.put_boundingbox('org', length, width)

            if icon:
                icon(length, width).put(0)

        return C
Exemplo n.º 20
0
    def cell(length=length):
        """Create a EAM cell.

        Args:
            length (float): length of the eam

        Returns:
            Cell: eam element
        """
        with nd.Cell(hashme=True) as C:
            C.groupname = groupname
            pdk.addBBmap(name)
            nd.Pin(name='a0', xs=xs['a0'], width=pinwidth['a0']).put(0, 0, 180)
            nd.Pin(name='b0', xs=xs['b0'], width=pinwidth['b0']).put(length, 0)
            nd.Pin(name='c0', xs=xs['c0'],
                   width=pinwidth['c0']).put(0.5 * length, 0, 90)

            pdk.put_stub()
            pdk.put_boundingbox('org', length, width)

            if icon:
                icon(length, width).put(0)

        return C
Exemplo n.º 21
0
    def cell(length=length, angle=angle):
        """Create a trapezoidal IO cell.

        Returns:
            Cell
        """
        a = radians(angle)
        with nd.Cell(hashme=True, instantiate=False) as C:
            l = 0.5 * length / cos(a)  # half the length of the hypotenuse.
            """When instantiate is True, cell put in (0,0,0)"""
            nd.Pin(name='a0', xs=xs['a0'], width=pinwidth['a0']).put(0, 0, 180)
            nd.Pin(name='b0', xs=xs['b0'], width=pinwidth['b0']).put(l)

            pdk.put_stub(['b0'])
            pdk.cellname(C.cell_name, -0.5 * l).put(0, 'a0')

            for lay, grow, acc in nd.layeriter(xs['a0']):
                w = (width + 2 * grow) / 2
                x = w * tan(a)
                outline = [(l, w), (-l + x, w), (-l - x, -w), (l, -w)]
                nd.Polygon(layer=lay, points=outline).put(0)
            cfg.cp = C.pin['b0']
        C.groupname = groupname
        return C
Exemplo n.º 22
0
    def cell(length=length):
        """Create a PhotoDetector cell.

        Args:
            length (float): length of the diode in um
            pad (bool): flag to add a bond pad

        Returns:
            Cell: photo diode element
        """
        with nd.Cell(hashme=True) as C:
            C.groupname = groupname
            C.default_pins('a0', 'a0')
            C.foundry_spt = []
            bb_length = length+buf
            pdk.addBBmap(name, params=(length))
            nd.Pin(name='a0', xs=xs['a0'], width=pinwidth['a0'], remark='optical').put(0, 0, 180)
            nd.Pin(name='c0', xs=xs['c0'], width=pinwidth['c0'], remark='electrical').put(bb_length)

            pdk.put_stub(['a0', 'c0'])
            pdk.put_boundingbox('org', bb_length, width)
            if icon:
                icon(bb_length, width).put(0)
        return C
Exemplo n.º 23
0
    def cell(width_sig=width_sig, width_gnd1=width_gnd1,
             width_gnd2=width_gnd2,
             gap1=gap1, height_tap=height_tap, gap2=gap2,
             length_pad=length_pad, width_pad_sig=width_pad_sig,
             width_pad_gnd=width_pad_gnd):
        """Create and return a GSG RF cell.

        Args:
            ??

        Returns:
            Cell
        """
        with nd.Cell(name=pdk._hash_name) as C:
            C.groupname = groupname
            C.default_pins('a0', 'a0')
            pdk.addBBmap(name)

            nd.Pin(name='a0', xs=xs['a0'], width=pinwidth['a0'], remark='electrical').put(0, 0, 180)
            #nd.Pin(name='b0', xs=xs['b0'], width=pinwidth['b0']).put(0, 0, 180)

            bb_length = length_pad+height_tap
            pdk.put_stub([])
            pdk.cellname(C.cell_name, bb_length).put(-0.25*bb_length, 0, 180, 'a0')
            pdk.parameters(pdk._hash_params).put(-0.25*bb_length, 0, 180, 'a0')

            boundary = 10
            nd.Pin(name='rc', xs=None, width=None).\
                put(length_pad+height_tap+boundary, 0, 0)
            heightRectangle = length_pad+boundary
            widthRectangle  = 2*width_pad_gnd+width_sig+2*gap2+2*boundary
            widthTaper      = width_gnd1+width_gnd2+width_sig+2*gap1+2*boundary

            if width_gnd2 == None:
                width_gnd2 = width_pad_gnd

            # outline of the BB
            angle = -degrees(atan(height_tap/(0.5*(widthRectangle-widthTaper))))
            outline = geom.trapezoid(length=widthTaper, height=height_tap,
                angle1=angle, angle2=angle, position=4)
            nd.Polygon(layer='bbox', points=outline).put(0, 0, -90)

            outline = geom.box(length=heightRectangle, width=widthRectangle)
            nd.Polygon(layer='bbox', points=outline).put(height_tap, 0, 0)

            # Ground Taper
            outline = geom.tetragon(length=width_gnd1, height=height_tap,
                dx=gap2-gap1, x=width_pad_gnd, position=4)
            nd.Polygon(layer=layer, points=outline).\
                put(0, gap1+0.5*(width_sig+width_gnd1), -90)
            # Ground Pad
            outline = geom.rectangle(length=width_pad_gnd,
                    height=length_pad, position=7)
            nd.Polygon(layer=layer, points=outline).\
                put(height_tap, gap2+0.5*width_sig, -90)

            # Signal Line
            outline = geom.box(length=height_tap, width=width_sig)
            nd.Polygon(layer=layer, points=outline).put(0, 0, 0)
            # Signal Pad
            outline = geom.rectangle(length=width_pad_sig,
                    height=length_pad, position=4)
            nd.Polygon(layer=layer, points=outline).put(height_tap, 0, -90)

            # Ground Taper
            outline = geom.tetragon(length=width_gnd2, height=height_tap,
                dx=-gap2-width_pad_gnd+gap1+width_gnd2, x=width_pad_gnd,
                position=4)
            nd.Polygon(layer=layer, points=outline).\
                put(0, -gap1-0.5*(width_sig+width_gnd2), -90)
            # Ground Pad
            outline = geom.rectangle(length=width_pad_gnd, height=length_pad, position=1)
            nd.Polygon(layer=layer, points=outline).\
                put(height_tap, -gap2-0.5*width_sig, -90)
        return C
Exemplo n.º 24
0
    def cell(length=length, pads=pads):
        """Create a EOPM_RF cell.

        Args:
            length (float): modulator length in um
            pads (bool): draw RF pads
            padangle1 (float): angle of left RF pad in degrees w.r.t. modulator
            padangle2 (float): angle of right RF pad in degrees w.r.t. modulator

        Returns:
            Cell: eopm
        """
        with nd.Cell(hashme=True) as C:
            C.groupname = groupname
            pdk.addBBmap(name, params=(length))

            wmet = pinwidth['c0']
            nd.Pin(name='a0',
                   xs=xs['a0'],
                   width=pinwidth['a0'],
                   remark='optical').put(0, 0, 180)
            nd.Pin(name='b0',
                   xs=xs['b0'],
                   width=pinwidth['b0'],
                   remark='optical').put(length, 0)
            nd.Pin(name='c0', xs=xs['c0'], width=pinwidth['c0'],
                   remark='gnd').put(dx_metal, dy_metal + rfpitch + wmet, 180)
            nd.Pin(name='c1',
                   xs=xs['c1'],
                   width=pinwidth['c1'],
                   remark='signal').put(dx_metal, dy_metal, 180)
            nd.Pin(name='c2', xs=xs['c2'], width=pinwidth['c2'],
                   remark='gnd').put(dx_metal, dy_metal - rfpitch - wmet, 180)
            nd.Pin(name='d0', xs=xs['d0'], width=pinwidth['d0'],
                   remark='gnd').put(length - dx_metal,
                                     dy_metal + rfpitch + wmet)
            nd.Pin(name='d1',
                   xs=xs['d1'],
                   width=pinwidth['d1'],
                   remark='signal').put(length - dx_metal, dy_metal)
            nd.Pin(name='d2', xs=xs['d2'], width=pinwidth['d2'],
                   remark='gnd').put(length - dx_metal,
                                     dy_metal - rfpitch - wmet)

            pdk.put_stub(['a0', 'b0'])
            pdk.put_boundingbox('org', length, width)

            if icon:
                icon(length, width).put(0)

            if pads:
                bend_gsg_function(angle=padangle1,
                                  **bend_gsg_params).put(C.pin['c1'])
                RFpadType.put()
                bend_gsg_function(angle=padangle2,
                                  **bend_gsg_params).put(C.pin['d1'])
                RFpadType.put()
            else:
                pdk.put_stub(['c0', 'c1', 'c2', 'd0', 'd1', 'd2'])

            cfg.cp = C.pin['b0']

        return C