Home › Forums › Nazca › Questions and Answers › Where can I set straight-to-bend waveguide offset › Reply To: Where can I set straight-to-bend waveguide offset
Dear Alvin,
If you want to use Nazca to implement your own PDK for a specific “fab” (could be your own process), then you need to implement that yourself. Demofab provides a demonstration of how the technology of such a fab could be implemented in Nazca. So you should probably use demofab as a template for implementing your own technology.
However, to answer your question, you can specify your own offset function to calculate and apply the proper offset in your technology, as a function of bend radius and waveguide width, for a specific waveguide cross section. Here is an example of a custom offset function for the “shallow” waveguide cross section implemented in demofab:
import nazca as nd
import nazca.demofab as demo
from math import copysign
# Function needs to implement proper offset for *your* technology.
def my_os_shallow(width, radius):
'''Straight to bend offset as function of waveguide width and radius.'''
offset = 0.5 # just a fixed value here as an example
return copysign(offset, radius)
# Example with demofab default:
demo.shallow.strt(100).put()
demo.shallow.bend(radius=500, angle=45).put()
demo.shallow.strt(100).put()
# Use the new offset function
demo.xsShallow.os = my_os_shallow
# Example with new offset value:
demo.shallow.strt(100).put(0, 20)
demo.shallow.bend(radius=500, angle=45).put()
demo.shallow.strt(100).put()
nd.export_gds()
If all you need is a single-value offset, you can also specify just that value, e.g.:
demo.xsShallow.os = 0.03
Xaveer