Python library for designing chips' layout.
Project description
GDSLayout 0.1.3
GDSLayout is a Python library for designing chips’ layout. Built upon the GDSFactory package, GDSLayout introduces a range of novel structures within its device directory. These additions include components such as high-Q resonators, photonic crystals, and mechanical structures.
A key feature of GDSLayout is its modular and configurable approach to design. Each structural unit is defined by a dedicated YAML configuration file. This allows for a streamlined workflow where users can generate complex layouts by retrieving the corresponding structural units. The library supports various layout methodologies, including the generation of single-device, dual-device, and multi-device layouts to produce the final chip design.
Quick Start
Here’s a example to get you started.
Create YourProject\config\1.yaml under your project directory.
device:
type: spiral
straight_length: 650
left_length: 400
right_length: 10
width: 1.5
num_turns: 2
spiral_gap: 20
inner_gap: 220
p: 0.8
translation: 0.025
resolution: 1
coupler:
type: out_point
length: 150
width: 1.0
height: 20
coupling_length: 0
Rc: 261
Rc0: 261
extend_length: 210
ring_down: null
resolution: 1
gap: 0.6
layer:
- 2
- 0
Next, you can create the YourProject\config_edge_coupler.yaml configuring the coupler type. (Note: To find out the bending coupler parameters below, you can test the values under \example\bending_coupler.ipynb)
in:
file: false
type: bending
bending_height: 10
angle: 22.5
length: 50.2900715898245
width: 0.8
out:
file: false
type: straight
width: 0.8
Then write the YourProject\gds.py script to draw the layout.
import gdsfactory as gf
from gdslayout.components import Cluster
import kfactory as kf
opts = kf.save_layout_options()
opts.dbu = 1e-4
Chip=gf.Component("Chip")
l_chip=2500
w_chip=2500
rect = gf.components.rectangle(size = (l_chip, w_chip), centered=True, layer=(100,2))
dicing_bot = Chip <<rect
w_side = 100
l_side = 100
width_tot = w_chip - 2 * w_side
length_tot = l_chip - 2 * l_side
chip_layout = gf.components.rectangle(size=(width_tot, length_tot), centered=True, layer=(100, 0))
chip_layout_ref = Chip << chip_layout
dicing_bot.move((l_chip/2-w_side, -w_chip/2+l_side))
chip_layout_ref.move((width_tot/2, -length_tot/2))
tot_drift=[0, 0]
y_drift = l_side
cluster = Cluster('cluster', './config')
distance = 55
y_border_dist = distance/2
text_status = True
x_auto = False
y_auto = False
#=================================== PART I =====================================
cluster.load([1])
Chip, y_len = cluster.build_layout(Chip, x_border=[100,100], y_border=[0, y_border_dist], length_tot=width_tot, y_drift=y_drift, edge_coupler_distance=distance, tot_drift=tot_drift, text=text_status, auto=(x_auto, y_auto))
y_drift += y_len
Chip_ref = gf.Component()
Chip_ref << Chip
Chip_ref.move((60, 60))
file_name = 'test'
Chip_ref.write_gds(file_name + '.gds', save_options=opts)
the YourProject\test.gds displays the single-device layout.
With the modification of the line
cluster.load([1, 2])
The dual-device layout looks like
And the multi-device layout looks like
We provide multiple convenience in your design process.
Layout: You can generate multiple clusters by repeating following process.
# Example:
#=================================== PART I =====================================
cluster.load([1, 2, 3, 4, 5, 6])
Chip, y_len = cluster.build_layout(Chip, x_border=[600,600], y_border=[0, y_border_dist], length_tot=width_tot, y_drift=y_drift, edge_coupler_distance=distance, tot_drift=tot_drift, text=text_status, auto=(x_auto, y_auto))
cluster._curvature()
y_drift += y_len
#=================================== PART II =====================================
cluster.load([7, 8])
Chip, y_len = cluster.build_layout(Chip, x_border=[600,600], y_border=[y_border_dist, y_border_dist], length_tot=width_tot, y_drift=y_drift, edge_coupler_distance=distance, tot_drift=tot_drift, text=text_status, auto=(x_auto, y_auto))
cluster._curvature()
y_drift += y_len
cluster.load([9, 10])
Chip, y_len = cluster.build_layout(Chip, x_border=[600,600], y_border=[y_border_dist, y_border_dist], length_tot=width_tot, y_drift=y_drift, edge_coupler_distance=distance, tot_drift=tot_drift, text=text_status, auto=(x_auto, y_auto))
cluster._curvature()
y_drift += y_len
cluster.load([11, 12])
Chip, y_len = cluster.build_layout(Chip, x_border=[600,600], y_border=[y_border_dist, y_border_dist], length_tot=width_tot, y_drift=y_drift, edge_coupler_distance=distance, tot_drift=tot_drift, text=text_status, auto=(x_auto, y_auto))
cluster._curvature()
y_drift += y_len
# ...
# You can continue on the process to put all devices in the layout.
Coupler: We provide mutiple configurations for your coupler choice.
- No coupler at all.
file: false
type: straight
width: 0.8
- Bending coupler to minimize the port reflection.
- Commercial coupler region provided by the fabrication factory. (Using LiGenTech’s coupler as an example)
file: ./AN800_LIGENTEC_BlackBoxes_v8.5.1.gds
offset: 10
length: 400
width: 0.8
cellname: "ligentecInvertedTaper_w0.8BB"
port_len: 5
Device: We provide several new devices, including the high-Q resonators, photonic crystals, and mechanical structures. These devices are open to further development and customization. For example:
# Example: Futher customized Archimedean curve, trigonometric dependence of width variation of center connection waveguide part. You can check the code at /example/device_modification.ipynb
from gdslayout.device import register_device
from gdslayout.device.archimedean import SpiralArchimedean1
import numpy as np
def trigonometric_transition_function(t, y1, y2, N):
A = (y2 - y1) / 2
b = (y2 + y1) / 2
return -A * np.cos(2*np.pi*t*N)+b
@register_device("spiral_archimedean1_varwidth")
class SpiralArchimedean1VarWidth(SpiralArchimedean1):
def _compute_width_profile(self, base_width):
N = self.points_orig.shape[0]
w = np.full(N, float(base_width), dtype=float)
start_id = len(self.points2)
end_id = start_id + len(self.point_mid)
w[start_id:end_id] = trigonometric_transition_function(
np.linspace(0, 1, end_id - start_id), base_width, 4*base_width, 2
)
return w
Simulation: Our library allows for easy integration of simulation workflows. We have developed several projects, backend by ANSYS Lumerical FDTD (lumapi) and other simulation engines, with more details to be announced shortly.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gdslayout-0.1.3.tar.gz.
File metadata
- Download URL: gdslayout-0.1.3.tar.gz
- Upload date:
- Size: 16.5 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5e221bc43e16e49f4d053bc2f8acf9433b8b5f66dd8640303b9a49abca4a9a61
|
|
| MD5 |
63b421cb33986728373115cc1eb57905
|
|
| BLAKE2b-256 |
eca436087f7bfd1c199dd0cd72dd867e78a7b6b6c2e48485f5aa56f3c711e6cc
|
File details
Details for the file gdslayout-0.1.3-py3-none-any.whl.
File metadata
- Download URL: gdslayout-0.1.3-py3-none-any.whl
- Upload date:
- Size: 47.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
01430ddd70841b15c97d87c78aae94e527d63ccefb432663c6471be12183abbb
|
|
| MD5 |
58ad129091e7a553a0aefc47d2a79577
|
|
| BLAKE2b-256 |
0ac5db6b0a84dac551c0473fa2f64d1a3dadf564c79df3ac3e431045a897f91d
|