laylight tour
0/25
1/3

Libraries and projects · 1 of 3

Imports

import makes the layers, constants and cells of another file available:

import "tech.lyl"
import "lib/components.lyl"

The path is relative to the file that imports it. Imports reach through: a file sees everything the files it imports can see, so a component library that imports the layer table brings the layers along. Importing the same file twice is harmless, but defining the same name in two files is an error.

Cells of a library that are not placed stay out of the output; only the cells your layout uses are written.

The tour's components.lyl, open in the tab next to your file, is a small library of three components, each with an input and an output port:

CellParameters
Waveguidelength = 10um, width = 500nm
Bendradius = 10um, width = 500nm, sweep = 90deg
SBendshift = 5um (sideways, positive to the left), radius = 20um, width = 500nm

Exercise

Import the component library and build Detour: a waveguide at the origin, an S-bend shifting 10 µm to the left, a 20 µm waveguide, an S-bend shifting back by −10 µm, and a final waveguide — each attached to the output of the one before.

loading compiler…

Edit the code, watch the layout, then press Submit to check your solution against the exercise.

Compiling…