Example of creating matched CML component and Klayout PCell

Hello Lumerical Community,
So, you have created an interconnect element for your own compenent and published it as a CML [called for example, ebeam_user] . That’s great. For more details on how to do so, you can have a look on this post

Now, how about taking automation to another level? Well, imagine you just draw the layout on KLayout by instantiation of ready-made PCells then you determine the parameters of the design (height, width, radius, etc.). Next, Klayout would look for the CML models associated with the PCell. INTERCONNECT would build the netlist. According to your CML element, INTERCONNECT might need to call FDTD or MODE to generate the missing S-parameters for the design parameters you set for the PCell.

First things first, how can you create a custom component in both KLayout and INTERCONNECT, so that you can perform verification and circuit simulations?

This is a step-by-step tutorial showing how to do this for Y-junction. This is based on a fixed GDS layout. The design has fixed dimensions, and isn’t parameterized. This is the simplest case.So, you have a simple CML element too with one S-parameters file.

However, in many cases, the CML element has variable properties. Take the tape example, we had w1, w2 and L as parameters. In this case, we need to build a parameterized layout on Klayout too. The parameters would be passed from Klayout to interconnect corresponding element.

Fortunately, for the taper, there’s already a PCell class in the Ebeam_PDK. However, it points to a taper compact model that supports only some discrete values.

We can easily create a copy of this P-Cell which points to the parameterized compact model of the taper we have created.

  1. Go to Macros -> Macro development -> SiEPIC_EBeam_PCells
  2. Look for the taper class. Select it all and copy it.
  3. Change its name to [ebeam_taper_te1550_flex], “flex stands for a more flexible model :)”

class ebeam_taper_te1550_flex(pya.PCellDeclarationHelper):

return “ebeam_taper_te1550(” + (’%.3f-%.3f-%.3f’ %(self.wg_width1,self.wg_width2,self.wg_length) ) + “)”

  1. Change the name of the compact model library and the name of the component as shown below.

  2. Finally, add the class declaration at the end of the script

Now, you are done! Save the script and go back to the layout.

Click “i”,you should find the new PCell called ebeam_taper_te1550_flex in the library.

Let’s try to use this now in a circuit. This is a short video how things look like.