0/37
6/6

Cross-sections and routing · 6 of 6

Fan-out

The outputs of a device are often much closer together than what has to be connected to them: a fiber array, a row of photodetectors, pads. S-bends spread them out. sbend with length, offset, width runs length along x and shifts offset sideways, ending in the direction it started in:

shape sbend with 80um, 20um, strip as s.start at p   # 20 µm to the left of p

Marker groups are lists, so a loop can visit the ports one by one, bank.marker.output[i], and compute where each one has to go. A shape defined inside a loop is a new shape in every round, and each one can be placed right where it is defined.

Exercise

Fan the four outputs of bank out to pitch apart, symmetric about the x axis, with one strip S-bend of length per output, in a for loop. Output i goes to y = (i − 1.5) · pitch.

loading compiler…

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

Compiling…