Bidirectional Interface Between OptSim Circuit and OptoDesigner

Since its 2018.12 release, OptoDesigner has provided native support for compound components created in OptSim Circuit, which are saved as ‘.moml’ files. A schematic design can be captured in OptSim Circuit and simulated. The same file can then be opened in OptoDesigner, where the familiar OptoDesigner script interface is used to modify the layout. Any modifications are then saved and loaded back into OptSim Circuit.

Non-phase-sensitive waveguide connections between components are stored and accounted for in the simulations as a form of parasitics. The picture below shows a top-down hierarchy where the waveguide connections (with their parasitics) are represented in building blocks at the circuit level (OptSim Circuit), while the image on the bottom shows the schematic representation of those types of waveguide connections between components at the layout level in OptoDesigner.


A component is an entity that has both a schematic and a layout representation, ports, an icon and an actual mask layout. Ports are the connections where information (optical or electrical signals) can enter or exit the component, thereby serving as the physical connection points for waveguides or electrical nets in the layout. Components need to exist on both OptSim Circuit and OptoDesigner sides of the layout. This can either be done natively (by having a separate PDK on both sides) or through the PDAFlow interface, in which case the PDK only needs to be defined on the OptoDesigner side. With the PDAFlow interface OptSim Circuit components will not have advanced models, only the compiled S-matrix models will be available if they are compiled into the PDAFlow PDK.

The first time you load a .moml into OptoDesigner, the autorouter settings will be taken from the PDK, and will not be visible. However, saving and loading the file once from OptoDesigner will make the settings visible and editable.

For more information on autorouter settings, see Autorouting Parameters on our Customer Support Portal (account registration required).

Creating a Compatible .moml in OptSim Circuit

The following steps outline a process for creating a .moml file that works both for OptSim Circuit and OptoDesigner:

  1. Create a compound component in OptSim Circuit. While creating the compound component, use only elements that are supported by the PDK in OptoDesigner. To check which elements are supported, see the corresponding documentation of the PDK. The compound component should contain components from a single foundry, check to ensure all ports are included. The PDK elements in OptSim can be found under the PDK Models tab from the All Models pallet which is found at the left side of your design window.

In the new compound component, add PDK elements and make connections between the desired ports. Be sure to include the input and output ports as shown below:

2. Right-click in the design area and select Properties ‣ foundryName to set the global properties of the circuit. Set the parameter foundryName to the name of your PDK and choose the pdkName with the correct version. Refer to the corresponding documentation of the PDK for the exact spelling of the name foundry name.

3. Save the .moml file.

Loading a .moml File Into OptoDesigner

  1. In OptoDesigner, open the .moml file. OptoDesigner translates the .moml file into a .spt script in the Editor.
  2. Click Update to view the circuit in the Viewer Window. Saving the file after some changes will also trigger the software to run the script.

If you update the above generated file in OptoDesigner, your OptoDesigner viewer will show a layout similar to the following:

In the viewer, you will see that the output MMIis placed very close to the input MMI, but the autorouter finds a way to create the required connections. If you prefer to change the original placement of the output MMI, you can change the value of the x-coordinate on line 31 from 360 to 800.0, for example. Then click Update to view the changes in the Viewer Window. You will get the following:

To be able to open this .moml file and use it back in OptSim Circuit, you would need to save your changes as in its original format (.moml). But it is recommended to save a separate .spt file to preserve any changes in your script. If you save the changes that you made in OptoDesigner into a .spt file and then save it as .moml, the original positions of your elements in OptSim will not be preserved. This means that, if you save your changes first as a .spt file and then as a .moml file, and you open the .moml file in OptSim circuit, OptSim does not know the original positions of the elements and puts all elements on the same position. The connections however, will be preserved. After modifying the layout in OptoDesigner, you can verify it by opening the .moml file in OptSim Circuit. In OptSim Circuit, you can see the routed elements’ content from the schematic. Right click on the thick red line connecting elements and select the View Route option. A new window will open, showing you series of connections including crossings.

Restrictions on the PDK Components

Only simple expressions are allowed as parameters on both the PDK component definitions and on the element usage inside OptSim Circuit. OptSim Circuit and OptoDesigner both have to be able to evaluate the expressions, thus expressions such as mcsGetWidth() are not supported as they only work in OptoDesigner.



If you have any questions please contact us at

The following steps can be taken to help solve common problems in porting designs between OptSim Circuit and OptoDesigner.


1. OptoDesigner does not load the .moml from OptSim Circuit

Problem: You get an error message when you open a moml file in OptoDesigner.

Possible causes:

  • The foundryName property in OptSim circuit is not set. To solve this, open the .moml file in OptSim circuit. Right-click in the design area and select: Properties to set the global Properties of the circuit. Set the parameter foundryName to the name of your PDK. See the complementary documentation of the PDK for the exact spelling of the foundry name.
  • The PDK is not loaded in OptoDesigner. To load the PDK, go to the PDAconfig.ini file, and add the PDK as described in Chapter 1.2 Configuration file.
  • The .moml file contains one or more elements that are not in the PDK in OptoDesigner. Check the PDK complementary documentation to see which PDK elements are supported.


2. Errors opening a .moml from OptoDesigner into OptSim Circuit

Problem: You get error messages when you open a .moml that has been exported from OptoDesigner in OptSim Circuit. Possible causes:

  • The .moml file contains one or more elements that are not in the PDK in OptSim Circuit. Check the PDK complementary documentation to see which PDK elements are supported.
  • In OptoDesigner, elements have been connected to global input or output ports. As a result, ports are duplicately defined in OptSim circuit. To solve this, go back to OptoDesigner to make sure that no elements are connected to global ports.


3. When re-opening a .moml in OptSim Circuit, all elements are on top of each other

Problem: You open a moml file that has been exported from OptoDesigner in OptSim circuit. All elements are shown on top of each other, but the connections are preserved. The original locations of the elements are lost. Possible causes:

  • If the circuit was saved as a .spt file and then exported as a .moml file, .spt files do not contain information about the positions of elements in OptSim circuit, so this information got lost when the design was saved as .spt.
  • To prevent information loss in OptoDesigner, it is recommended to first save your design as moml and then as spt.