Ansys Lumerical CML Compiler™ can generate photonic Verilog-A compact model libraries (CMLs) to enable electro-optical co-simulation on Synopsys OptoCompiler™.
Compared to INTERCONNECT CMLs, generating Verilog-A CMLs for OptoCompiler additionally requires installation of other tools than the Lumerical products. Prior to running co-simulations with OptoCompiler, you must first set up as described in this article.
Requirements
Operating system
The integrated functionalities must run on a supported Linux operating system. These functionalities are not available on Windows.
The following pages provides information on supported operating systems:
License
To create Verilog-A models:
- Lumerical license: A valid Lumerical Business (Standard) license for Ansys Lumerical CML Compiler™ and Ansys Lumerical INTERCONNECT™, or an Enterprise license.
- OptoCompiler license: The F818-0 OptoCompiler Elite license.
- PrimeSim license: The 4660-0 PrimeSim HSPICE Base license or the F952-0 PrimeSim SPICE Base license.
To run Verilog-A models in circuit simulations:
- Lumerical license: A valid Lumerical Business (Standard) license for Ansys Lumerical INTERCONNECT™, or an Enterprise license.
- OptoCompiler license: The F818-0 OptoCompiler Elite license.
- PrimeSim license: The 4660-0 PrimeSim HSPICE Base license or the F952-0 PrimeSim SPICE Base license.
Product version
Ensure that you meet the following product version requirements:
- Ansys Lumerical release 2026 R1 or newer
- Synopsys products 2026.03 or newer:
- Synopsys OptoCompiler
- Synopsys PrimeWave
- Synopsys PrimeSim HSPICE [Required for HSPICE simulations]
- Synopsys PrimeSim [Required for PrimeSim SPICE simulations]
Environment setup – PATH Variable
One method to set up the environment variable is via the PATH environment variable. To do so, use the following definitions and run the bash scripts below. You can also add the following to the PATH variable in your .bashrc or equivalent terminal file to create a permanent environment.
Note: If both the PATH variable as well as the cml-compiler.json files are defined, CML Compiler will use definitions in the PATH variable.
| Variable | Definition |
| <Ansys_Lumerical_installation_directory> | Installation directory of Lumerical tools. |
| <Synopsys HSPICE installation directory> | Installation directory of Synopsys HSPICE. |
| <Synopsys PrimeSim installation directory> | Installation directory of PrimeSim software. |
| <Synopsys_OptoCompiler_installation_directory> | Installation directory of OptoCompiler software. |
| <Synopsys_CustomCompiler_installation_directory> | Installation directory of CustomCompiler software. |
| <Synopsys_PrimeWave_installation_directory> | Installation directory of PrimeWave software. |
| <Ansys_port> | Port used for Ansys licensing server. |
| <Ansys license server> | Address of Ansys licensing server. |
| <Synopsys_port> | Port used for Synopsys licensing server. |
| <Synopsys license server> | Address of Synopsys licensing server. |
Step 1 - Main paths
export PATH
PATH=<Ansys_Lumerical_installation_directory>/bin:$PATH
PATH=<Ansys_Lumerical_installation_directory>/python-3.13.1/bin:$PATH
PATH= <Synopsys HSPICE installation directory>/hspice/bin:$PATH
PATH= <Synopsys PrimeSim installation directory>/primesim/bin/:$PATH
PATH= <Synopsys OptoCompiler installation directory>/optodesigner/bin/:$PATH
PATH=<Synopsys_PrimeWave_installation_directory>/bin:$PATH
Step 2 - Additional Environment variables
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH: <Ansys Lumerical installation directory>/photonic_veriloga
export PVA_NEW_LAP=1
export ANSYSLMD_LICENSE_FILE=<Ansys_port>@<Ansys license server>
export SNPSLMD_LICENSE_FILE=<Synopsys_port>@<Synopsys license server>
Environment setup – CML Compiler JSON
As an alternative to adding to the PATH variable, you can also define these installation directories in the cml-compiler.json file in the Lumerical preference folder. This file is in ~/.config/Lumerical/.
Note: If both the PATH variable as well as the cml-compiler.json files are defined, CML Compiler will use definitions in the PATH variable.
To add the necessary path to the JSON file, define new keys using the table below to add directories for each required software.
| Key | Value |
| primesim_home | <Synopsys PrimeSim installation directory> |
| hspice_home | <Synopsys HSPICE installation directory> |
| optocompiler_home | <Synopsys OptoCompiler installation directory> |
| primewave_home | <Synopsys_PrimeWave_installation_directory> |
The example below illustrates defining the new key for PrimeSim.
"primesim_home": <Synopsys PrimeSim installation directory>See Also
Generating photonic Verilog-A models for OptoCompiler, OptoCompiler interoperability – Photonic Verilog-A