In this post, we go through an example which uses the recently released contours method to extract the layout of an inversely designed c/o band splitter. This method uses the index data provided by an index monitor located in the simulation environment to extract the pattern. While having a broad range of applications, this method is particularly useful for inverse design where the extraction of the optimized pattern using traditional GDS extraction methods is very challenging.
The pattern to be extracted
First, we need to define the pattern that we need to extract the GDS from. Below is a screenshot of a c/o band splitter using Lumerical’s topology optimization capability offered by lumopt optimization module. The index data provided by the index monitor “global_index” in the simulation file will be used to extract the pattern.
To extract the GDS file, simply open the provided simulation project file and script file and then run the script. The script will first obtain the index data from the monitor and then the contours of the pattern will be extracted using a script command named “getcontour”.
The script will take the index data as well as a threshold value which will be used to determine where exactly a given contour point would fall based on the index values of each vertex of the mesh cell. Once the contours are extracted, the script will generate a GDS file containing the patterns defined by the extracted contours. If multiple index thresholds are provided, the script will generate additional cells for each threshold value within the same GDS file. The extracted pattern for this example is shown below.
As can be seen from the pattern, although the boundaries are extracted accurately using this method, the holes within the structure are filled up with the layer material which is not intended. For structures with inner holes such as the one in this example, the holes have to be trimmed from the pattern manually after extraction. In k-layout, this can be done by selecting the outer contour first (not the other way around), and then the inner contours, and choosing the “subtraction – others from first” from the “edit > selection” menu. The resulting pattern after trimming the holes is shown below. This pattern can be used for possible fabrication or simulation.
To ensure the optimum performance for the extracted pattern, it is always a good idea to import the extracted pattern back into simulation environment and run a simulation to see how close the performance of the extracted pattern is to the original structure. This is especially important for devices that are sensitive to small geometrical changes as a result of interpolations used during pattern extraction. For this purpose, small tweaks to the index threshold value can be used to see which pattern could provide a performance closest to the originally simulated structure.
Below is a comparison between the performance of the original structure obtained using topology optimization and that of a few other devices with patterns extracted using various index threshold values. As is obvious from the results, there is some difference in performance from the original device depending on the threshold value and the insertion loss and separation of each band can get affected. However, the extracted pattern is still a good representation of the originally optimized device.
A few points to consider when using this method for gds extraction:
- Repeated export-import-export process using this method is not recommended as in each export-import cycle, parts of the pattern may not be fully represented and result in performance loss.
- Care must be taken when dealing with geometry sensitive structures that do not have complex patterns (such as waveguides) since their geometry might be slightly different than the intended design after extraction using this method. Such structures better be excluded from the input given to this method and get added to the GDS later using other methods.