4. Deploying Luceda libraries and PDKs in L-Edit

The goal of this tutorial is to teach you simple practices that will allow you to have a well-maintained internal Luceda library. This tutorial builds on top of the Develop and distribute your component library tutorial and shows you how to use Luceda IPKISS and Luceda libraries in an EDA tool through OpenAccess (OA) libraries (Requires Luceda Link for Siemens EDA module).

4.1. Introduction

In this tutorial you will learn how to:

  • Export an existing Luceda library to an OpenAccess library

  • Use that OpenAccess library in L-Edit using the Luceda Link for Siemens EDA

4.2. Building the OpenAccess library

To be able to use the pteam_library_si_fab in L-Edit, it must first be exported to OpenAccess using the Luceda Link for Siemens EDA. This can be done with the build_library function of oatools.library.build. oatools is a submodule of the Link for Siemens EDA that contains OpenAccess related tools. In the pteam_library_si_fab folder structure, next to the ipkiss folder, there is a building folder containing the build_pteam_library_si_fab.py script. This script contains the following code:

luceda-academy/libraries/pteam_library_si_fab/building/build_pteam_library_si_fab.py
"""Export the ipkiss components in pteam_library_si_fab to OpenAccess."""

from oatools.library import build
import os
import argparse


def build_pteam_library_si_fab(output_dir=None, exported_si_fab=None):
    curdir = os.path.dirname(os.path.abspath(__file__))
    academy_dir = os.path.abspath(os.path.join(curdir, 3 * (os.path.pardir + os.path.sep)))  # 5 directory levels up

    pteam_library_src_path = os.path.join(curdir, os.pardir, "ipkiss", "pteam_library_si_fab")
    if output_dir is None:
        output_dir = os.path.join(curdir, os.pardir, "builds", "pteam_library_si_fab")
    if exported_si_fab is None:
        exported_si_fab = os.path.join(academy_dir, "pdks", "si_fab", "openaccess")

    build.build_library(
        src_path=pteam_library_src_path,
        output_folder=output_dir,
        tech_references=["si_fab"],
        libdefs_path=os.path.join(exported_si_fab, "lib.defs"),
        force=True,
    )

    print(f"Done, exported library to {os.path.abspath(output_dir)}")


parser = argparse.ArgumentParser(description="build_pteam_library_si_fab")
parser.add_argument("-o", "--output-dir", dest="output_dir")
parser.add_argument("-r", "--reference", dest="exported_si_fab")
args = parser.parse_args()
build_pteam_library_si_fab(args.output_dir, args.exported_si_fab)

This script/function only requires the following information:

  • the path of the original pteam_library_si_fab folder,

  • the destination path of the built pteam_library_si_fab, and

  • the path of the OpenAccess library of the SiFab PDK.

The destination path is in this case chosen to be pteam_library_si_fab/builds, right next to the ipkiss and building folder. The OpenAccess library is built by running this build script.

4.3. Creating a new design in L-Edit

Now that the OpenAccess library exists, how can it be used to create new designs?

Dennis is one of the members of the P-Team, he has a tape-out in November 2020. He wants to create a new design in L-Edit based on SiFab and on the pteam_library_si_fab using the Link for Siemens EDA. Just like in the previous tutorial (Several contributions to one tape-out run), he makes a folder with his name in the tapeout_202011_si_fab folder. First, he must create a new design in L-Edit.

Creating a new design

Creating a new design.

He gives the design the name filters_ledit and chooses the path to be the folder filter under tapeout_202011_si_fab/dennis. He makes sure the technology reference is set to ‘OpenAccess referenced libraries’ and clicks ‘OK’.

In the following window he selects the libraries he wants to base his new design on. He clicks on ‘Add’ and browses to the OpenAccess folder of the library and selects it. In this case he wants to use the pteam_library_si_fab library.

Adding pteam_library_si_fab

Adding pteam_library_si_fab.

Once selected, a window should pop up that says Unknown technology library “si_fab”. Please browse to it. As pteam_library_si_fab is built on top of the SiFab PDK and uses its technology, the OpenAccess library of SiFab must be added as well.

Unknown technology

Unknown technology.

Now both the P-Team library and the PDK are included:

included reference libs

Referenced libraries.

The new design should now have been made and should be located in the filter folder This folder (tapeout_202011_si_fab/dennis/filter) should contain an OpenAccess library called filters_ledit and a lib.defs file.

Created design

The created design and the content of the lib.defs file.

As you can see, the lib.defs file refers to the SiFab PDK, the built library pteam_library_si_fab and the new design library filters_ledit.

Dennis now restarts L-Edit and loads this lib.defs file by either dragging it to L-Edit or just by double clicking it. The libraries will be loaded automatically and he can continue working with them in L-Edit.

L-Edit - IPKISS integration.

L-Edit - IPKISS integration.

You will also notice the message in the command line in L-Edit that states that the IPKISS - L-Edit integration has been loaded. If you don’t see this message, that means that the PDK has not been loaded properly. The autoload.tanner file within the PDK enables the integration between IPKISS and L-Edit and it should therefore be executed successfully for the integration to work.

In L-Edit, Dennis unlocks all the layers in the Layer Palette and creates a new cell in his filters_ledit library. He can now drag and drop any cell from the SiFab PDK and the pteam_library_si_fab into that new cell. He can now also draw all the routing that he needs to.

Design created with L-Edit using the Luceda Link for Siemens EDA

Design created with L-Edit using the Luceda Link for Siemens EDA

Now it’s your turn to experiment with your custom library and create amazing designs using the Luceda Link for Siemens EDA!

4.4. Test your knowledge

Imagine you’re a member of the P-Team and your colleague has sent you a cluttered file of a heated ring resonator (heated_ring_resonator.py). It is now up to you to organize that file and add a proper component module that could be added to the to pteam_library_si_fab/components. Be mindful of the following:

  • Keep PCell, simulation recipes and examples in separate folders

  • Add your component to all.py

  • Rebuild the pteam_library_si_fab PDK to update the OA library

  • Try to import the newly added component in another design.

  • Create a new project in L-Edit and start a new design using the ring (Requires Luceda Link for Siemens EDA).

The component in question is a heated ring resonator:

../../../_images/heated_ring.png

This is the simulation result at 0 V and 1 V:

../../../_images/heated_ring_voltage.png

Solution

You can find the solution to this exercise in exercise/solution. Copy-paste the exercise/solution/ring folder into the components folder of pteam_library_si_fab. Make sure you adjust the all.py file to include the HeatedRing. See video on the develop and distribute page, starting at 10:00.