# Design concepts¶

This tutorial introduces the major concepts you need to know to start designing. They are also explained in the glossary (design automation).

Let’s use the small test circuit from Quickstart: First simple circuit design.

Conceptually, the circuit that we want to make is composed of a ring resonator and 4 (identical) grating couplers, connected using waveguides.

## PCell and Views¶

The FiberCouplerCurvedGrating and RingRect180DropFilter are examples of parametric cells or PCell in short. Each PCell can have multiple Views that represent the information necessary for a specific aspect of the design:

my_grating = FiberCouplerCurvedGrating()
my_grating_layout = my_grating.Layout(n_o_lines=24, period_x=0.65, box_width=15.5)
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)


## Atomic Cell¶

FiberCouplerCurvedGrating is an example of an Atomic PCell.

It consists of

• Layout elements that describe the actual layout drawings.
• Ports in the layout and corresponding Terms in the netlist (out and vertical_in in the example).
• A Circuit Model that describes the behaviour of the component.

## Circuit (aka hierarchical cell)¶

As opposed to an atomic cell, a circuit is composed from atomic cells and/or other circuits in a hierarchical fashion.

The concepts required to design a circuit are:

Within IPKISS, there is no conceptual difference between atomic cells and hierarchical cells: both can perfectly be defined using the same i3.PCell class. You can only see it in how they are composed.

### Child and parent cells¶

A circuit or hierarchical cell is composed from other cells, describes as a parent (the circuit) - child (the cells of which the circuit is composed) relationship. Child and Parent are just a predicates in the context of hierarchical design: IPKISS has no specific concept of a child or parent cell. They are just i3.PCell objects like any other.

In the example circuit, there are 3 child cells objects:

• FiberCouplerCurvedGrating
• RingRect180DropFilter
• Waveguide

### Instances¶

A Cell (i3.PCell object) which represents a circuit, consists of Instances of other Cells. These child cells can be atomic or circuits themselves. Such a reference to another cell is called an Instance. In other words, one cell can be instantiated into another to make a hierarchical circuit.

As is the case in the example, one (child) cell can have multiple instances within the circuit:

• There are 4 instances of the child cell FiberCouplerCurvedGrating: in_grating, pass_grating, add_grating and drop_grating.
• There is 1 instance of the child cell RingRect180DropFilter: ring.
• There are 4 instances of the child cell Waveguide, they are automatically created using a Connector so their name is left out.

### Exposed ports¶

Just like an atomic cell, each circuit needs some Ports in order to interface with the outside world. This is done by exposing some of the (open) ports of the Instances (aka InstancePort). We also give the exposed ports which are created this way a useful name: in_grating:vertical_in is exposed as in, drop_grating:vertical_in is exposed as drop and so forth.

### Placement & routings specifications¶

In order to make placement of the instances and routing of waveguides easier, the circuit can be created on the basis of Placement and Routing specifications.

To facilitate the routing of waveguides, IPKISS provides Connector classes (see Connector Reference) that package the logic to calculate the Route and draw the waveguide. This can also be used for RF or electrical routing.

Using i3.Circuit or i3.place_and_route inside a i3.PCell, you can implement a circuit by specifying

The final layout will then contain also the Waveguide instances.