Adicionando uma imagem/texto na camada AP (tsmc65)#

É necessário o software klayout para a conversão de *.png para *.gds2. Intalar o klayout (disponível nos principais repositórios como Debian ou Arch Linux).

Instalar dependências usadas para a conversão. talvez não precise delas.

pip install opencv-python opencv-contrib-python scipy numpy  --break-system-packages
  • Script usado no Klayout:
# https://www.klayout.de/forum/discussion/2158/adding-and-editing-an-image

# Prepare a layout
# IMAGE_SRC="/home/junior/Imagens/PROJETISTA_RJR_9.png"
IMAGE_SRC="/home/junior/Imagens/PROJETISTA_RJR_3.png"

TOP_NAME=(IMAGE_SRC.split('/')[-1]).split('.')[0]

ly = pya.Layout()
l1 = ly.layer(1, 0)
top = ly.create_cell("TOP_" + TOP_NAME)

# Load the image and convert to RGB32 for easy decoding
img = pya.QImage(IMAGE_SRC)
img = img.convertToFormat(pya.QImage.Format_RGB32)

p = 1.0  # pixel size in micron

# Scan the image and create a box for each "bright" pixel
for x in range(0, img.width()):
  for y in range(0, img.height()):
    px = p * x
    py = p * (img.height() - 1 - y)
    # green pixel value determines if bit is set or not
    green = (img.pixel(x, y) >> 8) & 0xff
    if green >=128:
      top.shapes(l1).insert(pya.DBox(px, py, px + p, py + p))

# Display the layout    
mw = pya.MainWindow.instance()
vw = mw.view(mw.create_view())
vw.show_layout(ly, True)

Recomendações: Se for somente texto, mantenha o fundo preto e as letras brancas. Assim, as letras não terão fundo após a execução.

Exportar para o GDS.


Virtuoso:#

  • Importe na tecnologia desejada.
  • Abra o Layout.

Você possivelmente deverá remapear o layer, para isso:

  • vá em tools -> find/replace.

  • Em Search for, selecione any shape, assumindo que seja uma figura simples em 2d.

    • Na subseção de condições, selecione por layer != AP drawing (no meu caso).
  • Região:

      • Selecione Match all .*
      • Viewing Area
    • Search Encloserd And Crossed Figure
  • Replace

    • Replace layer e AP drawing.
  • Find

  • Select All

  • Replace All