This article explains how to install Ansys Lumerical CML Compiler™, and environment variable set up procedures for using CML Compiler with Cadence Virtuoso, as well as using CML Compiler with the command line interface.
Installing CML Compiler
CML Compiler is a part of the Lumerical products, and installation procedures are the same as other Lumerical products.
For installation with the Ansys Automated Installer, see Installing using the Ansys automated installer.
For installation with the Lumerical standalone installers, see the following Knowledge Base articles for different operating systems:
Setting up environment variables for Cadence Virtuoso interoperability (Optional)
CML Compiler supports interoperability with Cadence virtuoso either through INTERCONNECT CMLs or Verilog-A CMLs. To use this functionality, you must meet additional requirements on operating system and licensing described for each workflow.
In addition, you must set up additional environment variables. The subsections below discuss environment variable set up for each workflow.
To check the status of Cadence integration and override the Virtuoso or Spectre paths, you can use the “Cadence Integration Status” button from the “Help” dropdown menu.
Note: Not all environment variables can be set from the GUI, for the full setup procedure, see the subsections below.
Virtuoso symbol generation for co-simulation
To generate Virtuoso symbols with CML Compiler for electro-optical co-simulation, you must also set up environment variables such that CML Compiler can find Virtuoso tools.
If the path to Virtuoso is already defined in the $PATH environment variable, CML Compiler will automatically look for it in the environment. You can validate this using the following command
which virtuoso
If you do not want to use the path set up in the environment, or if the paths are not defined in the environment, you can define the paths in ~/.config/Lumerical/cml-compiler.json. If this file is not created, create the file.
Entries to the json file are listed in the table below.
| Entry Name | Value | Required/Optional | Note |
| virtuoso_home | Path to ICADVM installation directory | Required | Correct path should include the following binaries:<path to virtuoso home>/bin/virtuoso
|
| virtuoso_graphic_mode | true | Optional | A flag to enable Virtuoso startup in graphical mode. This is required only if CML Compiler can not start Virtuoso in the non-graphic mode due to operation system limitations. |
An example of the cml-compiler.json file is shown below.
{
"virtuoso_home": "/data/cadence/ICADVM20.10.220/",
"virtuoso_graphic_mode": true
}
Verilog-A CML generation
For Verilog-A models, follow CML Compiler system requirements and installation for Verilog-A CMLs to set up environment variables.
Setting up environment variables for command line interface (Optional)
You can use CML Compiler with either the graphical user interface or the command line interface. We recommend using the graphical user interface.
For use with the command line interface, setting up environment variables is convenient for accessing the software without navigating to the installation directory. This section describes these optional environment variable setups. You can always access the CML Compiler command line interface navigating to the directory of the file.
Windows
Windows command prompt
To add the environment variable for CML Compiler into the Windows PATH variable for use with Windows command prompt
- Open "Control Panel" and navigate to "Edit environment variables for your account". Select "PATH" in the System variables and click edit.
- Add CML Compiler to the PATH by pressing "New" and copying the location of the CML Compiler command line file into a new line. The default directories are listed below.
- For Ansys automated installer:
C:\Program Files\Ansys Inc\[[verpath]]\Lumerical\bin
- For Lumerical standalone installer:
C:\Program Files\Lumerical\[[verpath]]\bin
- For Ansys automated installer:
- Test the environment variable by running
cml-compiler --helpin the command prompt. A general help menu should be displayed.
Environment variable is successfully set for Windows, and you can proceed to using the CML Compiler command line interface.
Git Bash
To use CML Compiler with the Git Bash terminal on Windows, follow the instructions above, but use the subdirectory CML_Compiler\bin instead of \bin.
For Ansys automated installer, the default directory as follows after this adjustment:
C:\Program Files\Ansys Inc\[[verpath]]\Lumerical\CML_Compiler\bin
For Lumerical standalone installer, the directory is
C:\Program Files\Lumerical\[[verpath]]\CML_Compiler\bin
Linux
Add the installation directory to your shell configuration file using the instructions below.
Bash terminal
For Bash terminals, use the following instructions
- Open the configuration file, the command below uses GNU Nano text editor, however, you can use any text editors you prefer.
nano ~/.bashrc
- Add the Lumerical installation directory into the path variable. The default installation directories are used below.
- For Ansys automated installer:
export PATH=~/Ansys/ansys_inc/[[verpath]]/Lumerical/bin/:$PATH
- For Lumerical standalone installer:
export PATH=/opt/lumerical/v252/bin/:$PATH
- For Ansys automated installer:
- Update the environment either by restarting the terminal, or run
source ~/.bashrc
- Test the environment variable by running
cml-compiler --helpin the command prompt. A general help menu should be displayed.
Environment variable is successfully set, and you can proceed to using the CML Compiler command line interface.
CSH Terminal
For CSH terminals, use the following instructions
- Open the configuration file, the command below uses GNU Nano text editor, however, you can use any text editors you prefer.
nano ~/.cshrc
- Add the Lumerical installation directory into the path variable. The default installation directories are used below.
- For Ansys automated installer:
setenv PATH $PATH\:~/Ansys/ansys_inc/[[verpath]]/Lumerical/bin/\:
- For Lumerical standalone installer:
setenv PATH $PATH\:/opt/lumerical/[[verpath]]/bin/\:
- For Ansys automated installer:
- Update the environment either by restarting the terminal, or run
source ~/.bashrc
- Test the environment variable by running
cml-compiler --helpin the command prompt. A general help menu should be displayed.
Environment variable is successfully set, and you can proceed to using the CML Compiler command line interface.