LogoLogo
contribute.
  • Hacker Fab Documentation
  • Overview
    • ✨Current Fab Capabilities
      • Fab Capabilities November 2023
      • Fab Capabilities May 2023
  • 🟡Guides
    • Required Reading (todo)
    • Build-a-Fab
    • Filling in the Gaps - Background Resources
    • Part Sourcing
  • 📜Processes
    • Self-Aligned NMOS V1
  • Fab Toolkit
    • 🎥Patterning
      • Lithography Stepper V2.1
      • Lithography Stepper V2 Build
      • Lithography Stepper V1 Build
      • Getting started with Klayout
      • Patterning Tasks - Spring 2025
      • Blu-Ray Lithography
        • Work in Progress
          • KEM-497AAA Pin Out Analysis
        • Lithography Spinner V1
          • Documentation
            • Design Datasheets
          • Hardware
            • BU40N Reference Design
          • Software
        • Base Principles
    • 🧱Deposition
      • 💡Thermal Evaporator V1 Build (WIP)
      • Spin Coater V2 Build (work in progress)
      • 💿Spin Coater V1 Build (to do)
      • Electroless Nickel Plating
      • ⚛️DIY ALD
      • ⚡Sputtering Chamber
    • 🕳️Etching
      • Plasma Etcher
      • HF Jig
    • 🛠️Other Processing Machines
      • Tube Furnace
      • Cleaving Jig
    • 🔍Metrology / Characterization
      • Probe Station
      • Semiconductor Parameter Analyzer
        • SMU - Analog Discoveries
        • SMU - Keithley 4200SCS
      • CV Measurements
      • Spectrometer
      • Profilometer
    • ⚗️Chemicals / Materials
      • Photoresists
      • Dielectrics
        • Spin on Glass
      • Conductors
        • Aluminum
      • Etchants
        • Hydrofluoric Acid
        • Aluminum Etchant (Nitric, Acetic, Phosphoric Acids)
      • Dopant Sources
    • 🤖Lab Automation
      • Automated Spin Coater
      • Gantry
      • Gripper
      • Liquid Handling
      • Tube Furnace (automated)
      • Wafer Cleaver
    • 🏘️Submodules
      • Piezo Nanopositioner (Stick Slip)
      • Interferometer
    • 📚Database
      • Machine Integration
      • Steps and Processes
  • 🧑‍🍳Standard Operating Procedures
    • Patterning SOP - Stepper V2
      • Vacuum Spin Coater SOP
      • Hot Plate SOP
      • Photoresist Strip SOP
    • Plasma Etcher SOP
    • Spin on Glass/Diffusant SOP
      • Spin on Glass Storage and Preparation
      • Spin on Glass Defect Inspection
      • Spin on Glass Thickness Measurement
    • Tube Furnace SOP
    • Glass Acid Etch SOP
    • DIY Thermal Evaporator SOP (CMU Version)
    • MTI Evaporator SOP (No longer in use)
    • Aluminum Etch SOP
    • Probe Station SOP
    • Probe Station SOP - V2
    • Wafer Cleaving SOP
    • Dry Oxide Growth SOP
    • Profilometer SOP
  • 🟢WORKING DOCS
    • CMOS Source/Drain Metal Contact Optimization
    • CMOS Doping Process Development
    • Sputtering Gate Oxides + Metal Gate Contacts
    • NAND + Inverter Characterization
    • CMU Updates
      • Example Student
      • Gina Seo
      • Jessica Wen
      • Yang Bai
      • Alex Echols
      • Gongwei Wang
      • Ying Meng
      • Shagun Maheshwari
      • Yuichi Hirose
      • Eric Dubberstein
      • Michael Juan
      • Justin Wang
      • Katie Eisenman
      • Marta Freitas
      • Matthew Choi's Updates
        • Week 2 Updates
        • Week 3 Updates
        • Week 4 Updates
        • Week 5 Update
        • Week 6 Update
        • Week 7 Update
        • Week 8 Update
        • Week 9 Update
        • Week 11 Update
        • Week 12 Update
        • Week 13 Update
      • Sandra You
      • Felicia Liu
      • Melinda Chen
      • Shayaan Gandhi
      • Sky Bailey
      • Haewon Uhm
      • James Lin
      • Ayan Ghosh
      • Advaith Menon
      • Adwoa Asare
      • Qirui (Ridge) Da Updates - Database
  • 🔲Templates (to do)
    • Build Manual Template
    • Bought Equipment Template
    • Standard Operating Procedure Template
    • BOM Template
    • Hardware X Template (for reference)
  • Archive
    • Patterning SOP - Stepper V1
Powered by GitBook
On this page
Export as PDF
  1. Fab Toolkit
  2. Patterning

Getting started with Klayout

Last updated 1 year ago

  1. Download Klayout from their websites and follow the instructions to install the software

  2. After it is successfully installed, open the Klayout editor

  1. To create a new layout File>>New Layout

  1. Set the initial layer(s) that you need. The current hacker fab process would require 5 layers which are substrate, poly, active, contact, and aluminum. This is just for getting started, you can always add new layers later if you need to do so.

The layers will be shown in the upper right corner.

  1. Go to View>>Layer Toolbox to open the layer toolbox so that you can adjust the order of the layers and the texture of the layers based on your preference.

Double-click the layer to hide it. If you are drawing on a hidden layer, the following tip will show up.

  1. To create a new layer, go to Edit>>Layer>>New Layer

  1. Scroll your mouse to adjust the size of the grid

The grid can also be hidden through View>>Show Grid. When you need to export the masks as screenshots, the mask needs to be hidden.

  1. Klayout has the following tools to draw the shapes. Press “shift” to draw straight lines.

  1. Draw the rough shape of an object then adjust it to be the exact size by pressing “Q” to edit its property.

  1. Mask Exporting (method 1):

    1. Go to Display>>Zoom Fit to maximize the size of the mask on the screenshot

  1. Rename and sort the order of the layers according to the order of the fabrication steps. In this case, the easiest way is to sort them by name (0:substrate, 1:poly gate, 2:active layer, 3:contact hole, 4:aluminum)

  1. To make the masks compatible with the lithography stepper, adjust the size of the substrate layer (layer 0 in this case) to be proportional to its resolution (3840x2160). In this set of masks, the size of the substrate layer is set to be 384x216. Under this setting, the actual size of the pattern coming from the stepper is 2.5 times the designed size.

  2. Adjust the color and texture of the mask to be blue/red/black accordingly to make them compatible with the red focusing and UV focusing.

  1. Hide or show certain layers based on the property of the mask and take screenshots via File>>Screenshot and save the mask.

  2. Corp the screenshots since the exported screenshot would normally have white sides.

  1. Mask Exporting (method 2):

    1. Set up steps are the same as Step 10 a. to c. steps.

    2. Go to Macros>>Macro Development to write Maros in Klayout

  1. Select “Python” and change the Macro Template to “Plain Python file”

  1. Paste the following code into the Python file you just created. 1

lv = pya.LayoutView.current()
ly = pya.CellView.active().layout()


# top cell bounding box in micrometer units
bbox = ly.top_cell().dbbox()


# compute an image size having the same aspect ratio than 
# the bounding box
w = 3840
h = int(0.5 + w * bbox.height() / bbox.width())


lv.save_image_with_options('/your_directory/your_picture_name.png', w, h, 0, 0, 0, bbox, True)
  1. Change the path to the folder where you want your images to be saved. Note that if the name of your folder or file starts with a number, it will give you the following error message.

  1. The .png file of your mask will be saved in black and white. Be sure to adjust the color and texture of the mask to be blue/red/black accordingly to make them compatible with the red focusing and UV focusing.

Reference:

Appendix 1. Klayout user guides

Klayout user manual from their websites:

Shorter one for getting started with basic functions:

Appendix 2. Masks for an NMOS enhancement load inverter

See step 11 for an alternative way of exporting the masks using Python scripts

1 GDS to image

🎥
https://www.klayout.de/doc-qt5/programming/python.html
https://www.klayout.de/doc/manual/basic.html
https://mycourses.aalto.fi/pluginfile.php/897248/mod_resource/content/2/KLayout%20Guide.pdf