This "My first INTERCONNECT CML" section provides a step-by-step guide for running quality assurance (QA) tests. Here we assume that you have completed:
- My first INTERCONNECT CML overview
- Getting started with Lumfoundry Template
- Creating a Custom CML with CML Compiler
Step 1 - Manually run QA test for wg_straight_fixed
Click on ‘Launch INTC’ button in CMLC GUI and open the script file editor in INTERCONNECT as shown in the images below. Navigate to the folder for the "wg_straight_fixed" element. Notice that CML Compiler generated "wg_straight_fixed_INTC_test.lsf" and a folder named "QA". This is the QA for the "waveguide_simple" photonic model that we used for this element.
Open "wg_straight_fixed_INTC_test.lsf" in INTERCONNECT and run. We will see a series of simulations running and the script prompt displays the following messages below.
[[Note:]] once running this script, you can also run the subscripts individually in INTERCONNECT by highlighting where the script is called and using the "F9" hotkey. |
wg_straight_fixed_INTC_test;
This QA performs the following tests:
1. loss, group delay(s)
2. neff, ng
Conditions:
* Frequency and time domain simulations
* All supported modes
Testing mode 1: TE
* loss
Loss is 300 dB/m. Expected value is 300 dB/m.
* group delay
Testing mode 2: TM
* loss
Loss is 200 dB/m. Expected value is 200 dB/m.
* group delay
WARNING: wg_length is a fixed property. It's only changed for testing purposes.
Testing mode 1: TE
* effective index
neff is 2.44379. Expected value is 2.44379.
* group index
FSR std= 2.66667 GHz
ONA resolution = 1 GHz
ng is 4.04794. Expected value is 4.04966.
Testing mode 2: TM
* effective index
neff is 1.7744. Expected value is 1.7744.
* group index
FSR std= 25.6195 GHz
ONA resolution = 1 GHz
ng is 3.69503. Expected value is 3.66669.
All tests passed.
In part 1. the QA test sets up a circuit simulation and extracts loss at the center wavelength. It then compares the simulation result to the value provided in the input data. If the relative error between the values is below the "loss" value in the QA.relative_tolerances section in "wg_straight_fixed.json" file, then the test is considered a "pass".
It also extracts the group delay at the center wavelength from both frequency and time domain simulations. These use different simulators in INTERCONNECT which process the model data differently, so here we check that there is agreement between the values over a bandwidth. A pass occurs when the values agree within the relative error given by "delay_time" value in the QA.relative_tolerances section in "wg_straight_fixed.json".
Here we see that the frequency and time domain simulation group delay agrees at the center wavelength and then deviates away from this. This is because we have chosen number_of_taps_estimation : "disabled" in wg_straight_fixed.json. By choosing number_of_taps_estimation : "group delay", we can better capture the frequency dependence of the group delay, but at the cost of the accuracy of neff and ng at the center wavelength. Please see the "Optional" section below on making this update.
In part 2. of the QA testing, a QA test sets up a new circuit to extract neff and ng and again compares to input values. The results are printed in the Script Prompt.
Optional:
Open wg_straight_fixed.json and update number_of_taps_estimation : "group delay". Run CML Compiler (You might need to close the existing session to avoid file conflicts):
cml-compiler all
Open a new session of INTERCONNECT and run wg_straight_fixed_INTC_test.lsf. You will see the updated plot below:
Step 2 - Manually run QA test for gc_strip_te_c
We can also run the QA for the grating coupler in this library, gc_strip_te_c. This element uses the photonic model "spar_fixed", and as such, it is designed to test the S-parameters.
Open and run "gc_strip_te_c_INTC_test.lsf" in INTERCONNECT, located in the "gc_strip_te_c" folder. You will see the following in the Script Prompt:
gc_strip_te_c_INTC_test;
Testing:
1. S parameter (amplitude and phase)
2. Group delay (s)
3. Reciprocity, passivity
Conditions:
1. Frequency and time domain simulations
2. All supported polarizations
3. Against reference data
Testing reciprocity
Pass
Testing passivity
Pass
Testing S parameter against reference data
Pass
Testing model in time domain
Pass
The following circuits are generated to test the element's performance in both frequency domain.
Reciprocity test: Here we check that transmission from opt_2 to opt_1 is the same as opt_1 to opt_2, and within the tolerance defined in "reciprocity" value in the QA.absolute_tolerances section in "gc_strip_te_c.json".
Passivity test: Here we check that power is conserved in this element and that for any arbitrary set of input signals, it won't produce gain. This is done by checking that the norm(S) isn't above 1 by more than the tolerance defined in "passivity" value in the QA.absolute_tolerances section in "gc_strip_te_c.json".
Regression test: Here we extract the simulation data and compare it against data that was previously saved (gc_strip_te_c_ref_data.mat). This checks check that there are no accidental changes to the simulation result at the tools continue to evolve. Here we check that the results agree to within the "power_dB" (transmission gain) and "S_data" (complex transmission) in the QA.absolute_tolerances section in "gc_strip_te_c.json".
Time domain test: In the next step, the simulations are repeated in the time domain using the "impulse response" setting of the ONA and the results are compared to those in the frequency domain. Here we check that the results agree to within the "S_time" in the QA.absolute_tolerances section in "gc_strip_te_c.json".
Step 3 - Automatically run all QA tests from CML Compiler graphical user interface (GUI)
To automatically run all tests and receive a report, open the CML Compiler GUI and check the library path and library master file to point to Foundry_X and Foundry_X.json respectively. Select the element (wg_straight_fixed) from the list to execute the INTERCONNECT QA tests and click on ‘Run Tests’ button as shown below.
This will execute the QA tests for INTERCONNECT models and report back to the output window the QA test results. If QA tests passed, the status icon under “Test” will turn green. This is a convenient way to check that all tests for this element are passing.
[[Note:]] If you run the QA for gc_strip_te_c element using this method, the custom QA for this element might fail since the element contains a custom .icp test file that contains element from default lumfoundry library. If you'd like that custom QA to run properly, you'd need to edit the .icp file and replace the grating coupler element with the one from your own library. |