Create a new IPKISS design project

This short tutorial will teach you how to set up a project with PyCharm and gives some suggestions on how to organize it. These suggestions aim to make the design team work together effectively by using a consistent folder structure, making it easy to share components, designs and algorithms. In the end you will have a clean environment to work in that can serve as a good starting point for your own projects.

Configuring PyCharm

PyCharm has a built-in project manager that we can use to create IPKISS design projects. The instructions below are for recent (2023.3.4 and newer) PyCharm versions.

If this is the first time opening PyCharm, you will be greeted by this window:

First time opening PyCharm. Choose 'New project'.

This window is shown when opening PyCharm for the first time. Select ‘New project’.

Alternatively, if you are in the main PyCharm window, select File ‣ New Project:

Create a new project using File --> New Project

Create a new project using File ‣ New Project.

In the “New Project window”, choose a new folder for your design and check “Custom environment”, then check “Select existing”, and type “Conda”, finally choose the “ipkiss3” environment:

Create a new project, select an existing Python interpreter.

Creating a new project and selecting an existing Python interpreter.

There are two situations now (also shown in the image above):

  1. If you have already set up an IPKISS Python interpreter before, you may find it in the list of interpreters. In that case, you can proceed to the section below on adding a PDK to a project.

  2. The IPKISS interpreter is not shown in the list of existing interpreters. In that case, click “Reload environments”. Reloading the environments will update all the environments that are registered with conda. If the environment still does not show up, you might need to reinstall the software to have it register itself with conda.

Changing or updating the environment after the project is created is possible via the project settings File ‣ Settings ‣ Project: MyProject ‣ Python interpreter.

New Python interpreter page: select 'Interpreter'.

In the ‘Python interpreter’ page, select the ipkiss3 environment if it is already available or add it through Add Interpreter.

If the interpreter is already present, you can select it and press OK.

New Python interpreter page: select 'Conda Environment' and select the conda executable.

On the ‘add Python Interpreter’ page, select Conda Environment.

To add a new interpreter, click on ‘Add Interpreter’ and go to the ‘Conda Environment’ tab of the window that is opened. Here you should select the conda executable that comes with the IPKISS installation, navigate to C:\luceda\luceda_2024120\Scripts\conda.exe.

When you have selected the correct conda executable, press the ‘Load Environments’ button. Next make sure the ‘use existing environment’ radial is checked and select the ipkiss3 environment from the dropdown box.

Note

You can also use a system-wide install of conda if it is configured correctly. When doing so, verify the version of the ipkiss3 environment by checking the path.

After the main PyCharm window opens, let’s add a PDK to the project.

Note

You can also open an existing folder or project (File ‣ Open…). When a folder is first opened, an .idea folder is created which stores project settings. If you open the same folder at a later moment, the project settings are remembered.

Adding a Design Kit

Depending on your needs and your experience, you might want to install you design kits either globally or for specific projects individually. In Installing Design Kits, we explain both approaches in detail.

Adding a user library

Libraries contain reusable components built on top of a PDK. You can easily import an existing library by following the same steps as adding a PDK: create a libraries folder in your project, paste in the library and include its ipkiss folder in your PYTHONPATH.

If instead you want to create new components and design a library from scratch, have a look at Develop and distribute your component library A convenient way to start is to copy pteam_library_si_fab from Luceda Academy and rename / refactor its contents to fit your needs.

You may also refer to Library Organization in the documentation to find more explanations on the library structure and its content.

Add a library to your project.

Add a library to your project.

Creating a new design

At this point everything is set up and we are ready to create a design that can include both PDK and library components. The final result of the design process (tape-out) is a GDS file that the foundry uses to manufacture a photonic integrated circuit.

We will start by creating a designs folder and choosing a clear name for our tapeout that contains the date and the name of the PDK being used, e.g. 202208_tapeout_si_fab. Every design will be placed in here, each with its own regeneration file to generate a GDS. The tapeout folder then contains a merging script to combine all the designs into one. A basic example of such a file structure is shown below:

Typical folder structure to organize designs.

Typical folder structure to organize designs.

For a more in-depth tutorial on organizing designs, have a look at Several contributions to one tape-out run.