Usage ===== .. note:: You have the option to execute the SG13G2-LVS through either a Python script via the command-line interface (CLI). or by the Klayout graphical user interface (GUI)., as detailed in the subsequent usage sections. .. _CLI Usage: CLI --- The `run_lvs.py` script takes your gds and netlist files to run LVS rule decks with switches to select subsets of all checks. .. code-block:: bash run_lvs.py (--help| -h) run_lvs.py (--layout=) (--netlist=) [--run_dir=] [--topcell=] [--run_mode=] [--no_net_names] [--spice_comments] [--net_only] [--no_simplify] [--no_series_res] [--no_parallel_res] [--combine_devices] [--top_lvl_pins] [--purge] [--purge_nets] [--verbose] **Options:** .. code-block:: rst `--help -h` Displays this help message. `--layout=` Specifies the file path of the input GDS file. `--netlist=` Specifies the file path of the input netlist file. `--run_dir=` Run directory to save all the generated results [default: pwd] `--topcell=` Specifies the name of the top cell to be used. `--run_mode=` Selects the allowed KLayout mode. (flat, deep). [default: flat] `--no_net_names` Omits net names in the extracted netlist. `--spice_comments` Includes netlist comments in the extracted netlist. `--net_only` Generates netlist objects only in the extracted netlist. `--no_simplify` Disables simplification for both layout and schematic netlists. `--no_series_res` Prevents simplification of series resistors for both layout and schematic. `--no_parallel_res` Prevents simplification of parallel resistors for both layout and schematic. `--combine_devices` Enables device combination for both layout and schematic netlists. `--top_lvl_pins` Creates pins for top-level circuits in both layout and schematic netlists. `--purge` Removes unused nets from both layout and schematic netlists. `--purge_nets` Purges floating nets from both layout and schematic netlists. `--verbose` Enables detailed rule execution logs for debugging purposes. .. note:: * By utilizing the `no_simplify` option, you can prevent layout simplification for both layout and schematic netlists. Simplification is enabled by default, incorporating steps such as `make_top_level_pins`, `purge`, `combine_devices`, and `purge_nets`. * When you use the `no_simplify` option to disable simplification, you can then use the `make_top_level_pins`, `purge`, `combine_devices`, and `purge_nets` options individually to fine-tune the behavior according to your needs. * Series resistors with identical parameters (except length) will combine into one resistor with the total length. * Parallel resistors will merge into a single resistor with the parameter `m` representing the number of parallel resistors, provided they share identical parameters. * The options `no_series_res` and `no_parallel_res` are specifically designed to disable layout simplification for resistors exclusively. When specified, they take priority over `combine_devices` option. **Example:** .. code-block:: bash python3 run_lvs.py --layout=testing/testcases/unit/mos_devices/layout/sg13_lv_nmos.gds --netlist=testing/testcases/unit/mos_devices/netlist/sg13_lv_nmos.cdl --run_dir=test_nmos **LVS Outputs** You could find the run results at your run directory if you previously specified it through `--run_dir=`. Default path of run directory is `lvs_run__