Ejemplo n.º 1
0
    def __example1(cls):
        from technologies import silicon_photonics
        from picazzo3.fibcoup.curved import FiberCouplerCurvedGrating
        from picazzo3.routing.place_route import PlaceComponents
        from ipkiss3 import all as i3
        from routing.route_through_control_points import RouteManhattanControlPoints

        # Placing the components of the circuit

        gr = FiberCouplerCurvedGrating()
        circuit = PlaceComponents(child_cells={
            'gr': gr,
            'grb1': gr,
            'grb2': gr
        })

        circuit_layout = circuit.Layout(
            child_transformations={
                'gr': (0, 0),
                'grb1': (-100, 0),
                'grb2': i3.Rotation(rotation=180.0) + i3.Translation((+100, 0))
            })

        # We now use the placed components and make waveguides.

        control_points = [(-40, 20), (50, 0)]

        route = RouteManhattanControlPoints(
            input_port=circuit_layout.instances['grb1'].ports['out'],
            output_port=circuit_layout.instances['grb2'].ports['out'],
            control_points=control_points,
            rounding_algorithm=None)

        wire = i3.RoundedWaveguide()
        wl = wire.Layout(shape=route)

        # We create a new placecomponents with the wire included.

        circuit_child_cells = dict(circuit.child_cells)
        circuit_child_cells['wire'] = wire
        circuit_with_wire = PlaceComponents(child_cells=circuit_child_cells)
        circuit_with_wire_layout = circuit_with_wire.Layout(
            child_transformations=circuit_layout.child_transformations)
        circuit_with_wire_layout.visualize()
from picazzo3.wg.bend import WgBend90
from picazzo3.wg.splitters import WgY90Splitter
from picazzo3.wg.spirals import FixedLengthSpiralRounded
from picazzo3.fibcoup.curved import FiberCouplerCurvedGrating
from picazzo3.wg.connector import RoundedWaveguideConnector

from auto_place_and_connect import AutoPlaceAndConnect
import numpy as np
import pylab as plt

wg50 = i3.Waveguide(name="waveguide50")
wg50.Layout(shape=[(0.0, 0.0), (50.0, 0.0)])
wg100 = i3.Waveguide(name="waveguide100")
wg100.Layout(shape=[(0.0, 0.0), (100.0, 0.0)])

gc = FiberCouplerCurvedGrating(name="gc")

spiral = FixedLengthSpiralRounded(name="spiral1", n_o_loops=2)
spiral.Layout(total_length=800.0)

bend1 = WgBend90(name="bend20")
bend1.Layout(bend_radius=20.0)

bend2 = WgBend90(name="bend10")
bend2.Layout(bend_radius=10.0)

splitter = WgY90Splitter(name="split")

circuit = AutoPlaceAndConnect(name="circuit",
                              child_cells={
                                  "spl1": splitter,
Ejemplo n.º 3
0
          straight_coupling1=0.7**0.5) #The coupling from bus to ring and back


my_ring_cm = my_ring.CircuitModel(coupler_parameters=[cp, cp])

wavelengths = np.linspace(1.50, 1.6, 2001)
S = my_ring_cm.get_smatrix(wavelengths=wavelengths)

plt.plot(wavelengths, np.abs(S['in1', 'out1'])**2, 'b', label="pass")
plt.plot(wavelengths, np.abs(S['in1', 'out2'])**2, 'r', label="drop")
plt.plot(wavelengths, np.abs(S['in1', 'in2'])**2, 'g', label="add")

plt.xlabel("Wavelength ($\mu m$)")
plt.ylabel("Power transmission")
plt.legend()
plt.show()  

# 6. Curved grating
from picazzo3.fibcoup.curved import FiberCouplerCurvedGrating
my_grating = FiberCouplerCurvedGrating()

# 7. Layout
my_grating_layout = my_grating.Layout(n_o_lines=24, period_x=0.65, box_width=15.5)
my_grating_layout.visualize()

# 8. Setting the CircuitModel view from the grating coupler.
my_grating_cm = my_grating.CircuitModel(center_wavelength=1.55, bandwidth_3dB=0.06, peak_transmission=0.60**0.5, reflection=0.05**0.5)
S = my_grating_cm.get_smatrix(wavelengths=wavelengths)
plt.plot(wavelengths, np.abs(S['vertical_in', 'out'])**2, 'b', label="pass")
plt.legend()
plt.show()
Ejemplo n.º 4
0
    def __example_2(cls):
        from technologies import silicon_photonics
        from picazzo3.fibcoup.curved import FiberCouplerCurvedGrating
        from picazzo3.routing.place_route import PlaceComponents
        from ipkiss3 import all as i3
        from routing.route_through_control_points import RouteManhattanControlPoints

        class BondPad(i3.PCell):
            """
            Bondpad to be used here
            """
            class Layout(i3.LayoutView):
                size = i3.Size2Property(default=(50.0, 50.0),
                                        doc="Size of the bondpad")
                metal_layer = i3.LayerProperty(
                    default=i3.TECH.PPLAYER.M1.LINE,
                    doc="Metal used for the bondpad")

                def _generate_elements(self, elems):
                    elems += i3.Rectangle(layer=self.metal_layer,
                                          box_size=self.size)
                    return elems

                def _generate_ports(self, ports):
                    ports += i3.ElectricalPort(
                        name="m1",
                        position=(0.0, 0.0),
                        shape=self.size,
                        process=self.metal_layer.process)
                    return ports

        # Placing the components of the circuit
        bp = BondPad()
        bp_layout = bp.Layout(size=(50, 50))
        gr = FiberCouplerCurvedGrating()
        circuit = PlaceComponents(child_cells={
            'gr': gr,
            'gr2': gr,
            'b1': bp,
            'b2': bp
        })

        circuit_layout = circuit.Layout(child_transformations={
            'gr': (0, 0),
            'gr2': (150, 0),
            'b1': (-200, 0),
            'b2': (+200, 0)
        })

        # We now use the placed components and make wire.

        control_points = [(-40, 20), (50, 0), (100, -50)]

        route = RouteManhattanControlPoints(
            input_port=circuit_layout.instances['b1'].ports['m1'],
            output_port=circuit_layout.instances['b2'].ports['m1'],
            control_points=control_points,
            angle_out=90.0,  # We override the default angle of the route
            rounding_algorithm=None)
        wire_template = i3.ElectricalWireTemplate()
        wire_template.Layout(width=2.0, layer=bp_layout.metal_layer)

        wire = i3.ElectricalWire()
        wl = wire.Layout(shape=route)

        # We create a new placecomponents with the wire included.

        circuit_child_cells = dict(circuit.child_cells)
        circuit_child_cells['wire'] = wire
        circuit_with_wire = PlaceComponents(child_cells=circuit_child_cells)
        circuit_with_wire_layout = circuit_with_wire.Layout(
            child_transformations=circuit_layout.child_transformations)
        circuit_with_wire_layout.visualize()
Ejemplo n.º 5
0
spacing = (100 * 1e9 * (1.55 * 1e-6)**2 / 3e8) * 1e6
print("Spacing: {} nm".format(spacing * 1e3))
res_w = 1.550 + spacing * np.asarray([0, 1, 2, 3, 4, 5, 6, 7])

rings = []
r_layouts = []
for nr, l in enumerate(res_w):
    ring = SimpleRing(resonance_wavelength=l)
    rings.append(ring)
    r_layouts.append(ring.Layout())

# #######################################
# Grating Coupler
# #######################################

grating_coupler = FiberCouplerCurvedGrating()
grating_coupler_layout = grating_coupler.Layout()
grating_cm = grating_coupler.CircuitModel(center_wavelength=1.55,
                                          bandwidth_3dB=0.06,
                                          peak_transmission=0.60**0.5,
                                          reflection=0.01**0.5)

# #######################################
# Splitter
# #######################################

splitter = SimpleMMI()
splitter_layout = splitter.Layout(length=14.1428571429, waveguide_spacing=2.1)
splitter_cm = splitter.CircuitModel(straight_coupling1=0.45**0.5)

# #######################################