Package: path-analysis
Path Length AnalysisTable of contentsPath Length AnalysisTable of contentsIntroductionCurrent-StatusFolder StructurePrerequisitesInstallationUsageExampleAbout MabrainsContact-UsLicenseIntroductionMeasuring and optimizing path lengths in resistive paths for integrated circuits and photonic paths are fundamental aspects of design and layout optimization. It directly influences signal integrity, performance, propagation delay, power efficiency, phase matching, and the overall functionality of electronic and photonic systems.Current-Status:warning: We are currently treating the current content as anexperimental preview!The tool will be tagged with a production version when ready to do.Folder Structure📁 path_length_analysis
 ┣ 📁path_analysis              Includes path_length tool script.
 ┣ 📁images                     Contains images used for illustration.
 ┣ 📁.github                    Includes CI workflows for github actions.
 ┣ 📜Makefile                   To make some tests for path_length_analysis tool.
 ┣ 📜requirements.txt           List of python packages required for tool installation.
 ┣ 📜requirements.test.txt      List of python packages required for testing purpose.
 ┣ 📜path_length.py             Python script to calculate path length for a gds file. 
 ┣ 📜setup.py                   Python script used for package setup. 
 ┣ 📜.flake8                    Includes flake8 configuration setup.
 ┣ 📜.gitignore                 Excludes certain local files from being pushed to Git.
 ┗ 📜README.md                  This file that describes the contents.PrerequisitesAt a minimum:python 3.9+python3-venvTo install a virtual environment for ubuntu 22.04:python3-mpipinstall--uservirtualenv# ORsudoapt-getinstall-ypython3-venvInstallationTo install the path length tool from source, you could run the following commands:gitclonehttps://github.com/mabrains/path_length_analysis.gitcdpath_length_analysis/

python3-mvenv./envsource./env/bin/activate

python3setup.pyinstallUsageThis tool calculates the path length based on the presence of the cutting shape on the path you need to measure it accompanied by a text that refers to the cutting name, you could consider it as a port on the path you have.As shown in the following figure, we could measure the path length between thestart&endports.Fig. 1. Path length sample for illustrationNOTE:The text should be inside the cutting shape, the cutting shape and its text are on the same layer,Before running the python script that measure the path length for layout routes, you have to complete some configurations inconfig.yamlfile, and they all are declared in the table below:ParameterDescriptionSelectiongds_filePath of layout file you need to measure its pathsRequiredcell_nameName of top cell in your layout if you have more one cellOptionalpath_layerTuple of two integers for path layer number and data typeRequiredcutting_layerTuple of two integers for cutting layer number and data typeRequirednodesPorts of interest to be filtered, corresponds to text placed on cutting polygonsOptionalThepath_length.pyscript takes your config file to run path length analysis on it and save run logs and results.You could find the run results at your run directory if you previously specified it through--run_dir=<run_dir_path>, default path of run directory islength_run_<date>_<time>in current directory.python3path_length.py(--help|-h)python3path_length.py(--config=<config_file_path>)[--run_dir=<run_dir_path>]Options--help -hPrint this help message.--config=<config_file_path>Yaml file contains the path length parameters.--run_dir=<run_dir_path>Run directory to save all the results [default: pwd].Examplepython3path_length.py--config=tests/lidar_no_rad.yaml--run_dir=lidar_no_rad_resultsInput-Configgds_file:tests/lidar_no_rad.gdscell_name:lidarpath_layer:layer_no:1layer_dtype:0cutting_layer:layer_no:1layer_dtype:10nodes:-splitter_p1_start-splitter_p1_end-splitter_p2_start-splitter_p2_endInput-TestFig. 2. Path length example for lidar layoutOutput-Resultport1port2length (um)splitter_p1_startsplitter_p1_end526.1392525630397splitter_p3_startsplitter_p3_end501.1340271504263We could notice that both paths are identical except for the vertical distance shown in the previous figure.** diff_vertical_part = 35.5 - 10.5 = 25um
** diff_total_length = 526.1 - 501.1 = 25umAbout MabrainsMabrains was founded to achieve the main purpose to change the world of Chip Design using AI. Empowering the world with a new methodologies and techniques that would disrupt the status quo in the EDA industry.We have contributed in developing many PDKs for Open Source Tools. For more information, please refer toMabrains-Github.Contact-UsRequests for more information about Path Length tool and other open source technologies can besubmitted via this web form.LicenseThe Path Length tool is released under theGNU Lesser General Public License - Version 3The copyright details (which should also be found at the top of every file) are;# SPDX-FileCopyrightText: 2024 Mabrains Company
# Licensed under the GNU Lesser General Public License, Version 3.0 (the "License");
# you may not use this file except in compliance with the License.

#                    GNU Lesser General Public License
#                       Version 3, 29 June 2007

# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this program.  If not, see <https://www.gnu.org/licenses/>.
# SPDX-License-Identifier: LGPL-3.0