Skip to content

An open-source tool for visualizing and analyzing timing paths extracted from Static Timing Analysis (STA) reports.

License

Notifications You must be signed in to change notification settings

kanndil/PathView

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

PathView

An open-source tool for visualizing and analyzing timing paths extracted from Static Timing Analysis (STA) reports.

code style: black Github Pages License

Header Headerpath

Table of contents

๐Ÿ“– Overview

Welcome to the open-source project PathView! PathView is a powerful tool that supports multiple Static Timing Analysis (STA) tools, including OpenSTA and PrimeTime. It aims to facilitate the visualization and analysis of timing paths extracted from STA reports.

With PathView, you can extract paths generated by OpenSTA reports and transform them into Path View using the [netlistsvg](https://github.com/nturley/netlistsvg) tool. These interactive schematics provide an intuitive and visually appealing representation of the timing details of each cell in a timing path, utilizing any standard cell library.

By default, PathView supports both of the Sky130_fd_sc_hd and gf180mcu_fd_sc_mcu7t5v0__tt_025C_5v00_ standard cell libraries. However, we understand that different projects may employ various standard cell libraries. Therefore, PathView also allows you to easily add support for the standard cell library you are using. Detailed instructions can be found in the "Support the standard cell library you are using" section of our project documentation, available here.

We hope that PathView will significantly enhance your STA workflow by providing clear and interactive visualizations of timing paths. Feel free to explore our repository, contribute to the project, and share your feedback. Happy timing path exploration with PathView!



File structure

.
โ”œโ”€โ”€ LICENSE
โ”œโ”€โ”€ README.md
โ”œโ”€โ”€ demo_html
โ”œโ”€โ”€ images
โ”œโ”€โ”€ index.html
โ”œโ”€โ”€ liberty
โ”‚   โ”œโ”€โ”€ gf180mcu_fd_sc_mcu7t5v0__tt_025C_5v00.lib
โ”‚   โ””โ”€โ”€ sky130_fd_sc_hd.lib
โ”œโ”€โ”€ opensta_reports
โ”œโ”€โ”€ primetime_reports
โ”œโ”€โ”€ representations
โ”œโ”€โ”€ skinFiles
โ”‚   โ”œโ”€โ”€ gf180mcu_fd_sc_mcu7t5v0__tt_025C_5v00_representations
โ”‚   โ”‚   โ””โ”€โ”€ default.svg
โ”‚   โ””โ”€โ”€ sky130_fd_sc_hd_representations
โ”‚       โ””โ”€โ”€ default.svg
โ””โ”€โ”€ src
    โ”œโ”€โ”€ generateSkinFile.py
    โ””โ”€โ”€ interactiveReport.py



๐Ÿงฑ Dependencies

For macos

Install python3.6+

  • Get homebrew

      /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
    
  • Install python using homebrew

      export PATH="/usr/local/opt/python/libexec/bin:$PATH"
      brew install python3
    

Install pip dependancies

    pip3 install pyeda
    pip3 install sympy
    pip3 install liberty-parser

Install OpenSTA

  • Install OpenSTA

You can find the installation steps in OpenSTA installation.

Install netlistsvg

To install the latest version from source:

git clone https://github.com/nturley/netlistsvg
cd netlistsvg
npm install # install dependencies
sudo npm install -g . # install netlistsvg to system

sudo npm uninstall -g netlistsvg # uninstall from system
For Linux

Install Conda for package installation

bash Miniconda3-latest-Linux-x86_64.sh

Use Conda to install all dependencies

conda install -y -c litex-hub -c conda-forge python

Install pip dependancies

    pip3 install pyeda
    pip3 install sympy
    pip3 install liberty-parser

Install OpenSTA

  • Install OpenSTA

      conda install -y -c litex-hub -c conda-forge openroad
    

    or

    You can find the installation steps in OpenSTA installation.

Install netlistsvg

To install the latest version from source:

git clone https://github.com/nturley/netlistsvg
cd netlistsvg
npm install # install dependencies
sudo npm install -g . # install netlistsvg to system

sudo npm uninstall -g netlistsvg # uninstall from system
For Windows-10

Install python3.6+

Install using the executable installer here

Install pip dependancies

    pip3 install pyeda
    pip3 install sympy
    pip3 install liberty-parser

Install OpenSTA

  • Install OpenSTA

You can find the installation steps in OpenSTA installation.

Install netlistsvg

To install the latest version from source:

git clone https://github.com/nturley/netlistsvg
cd netlistsvg
npm install # install dependencies
sudo npm install -g . # install netlistsvg to system

sudo npm uninstall -g netlistsvg # uninstall from system


๐Ÿ” How to use

First: Generate the timing report

Using OpenSTA

It is necessary to include the following feilds in the report_checks command:

-fields {slew cap input_pins nets fanout}

For example:

report_checks -path_delay min_max -format full_clock_expanded -fields {slew cap input_pins nets fanout}  -endpoint_count 10 -unique_paths_to_endpoint > ./sta_report.rpt

Here is a part of an example STA report: (Your report must have a similar format!)

Fanout     Cap    Slew   Delay    Time   Description
-----------------------------------------------------------------------------
                        12.50   12.50   clock clk' (rise edge)
                        0.00   12.50   clock source latency
                2.00    0.00   12.50 v clock (in)
    1    1.05                           clock (net)
                2.00    0.00   12.50 v padframe/clock_pad/PAD (sky130_ef_io__gpiov2_pad_wrapped)
    0    1.05                           clock (net)
                0.06    1.38   13.88 v padframe/clock_pad/IN (sky130_ef_io__gpiov2_pad_wrapped)
    1    0.00                           clock_core (net)
                0.06    0.00   13.88 v flash_clkrst_buffers/BUF[2]/A (sky130_fd_sc_hd__clkbuf_8)
                0.08    0.12   14.00 v flash_clkrst_buffers/BUF[2]/X (sky130_fd_sc_hd__clkbuf_8)
    4    0.17                           clock_core_buf (net)

Using PrimeTime

It is necessary to generate the report using the following options.

-path_type full_clock_expanded      // necessary
-delay_type min                     // can change
-input_pins                         // necessary
-nets                               // necessary
-slack_lesser_than 10.0000          // can change
-max_paths 1000                     // can change
-unique_pins                        // necessary
-group hkspi_clk                    // can change
-transition_time                    // necessary
-capacitance                        // necessary
-crosstalk_delta                    // necessary
-derate                             // necessary
-sort_by slack                      // can change
-include_hierarchical_pins          // necessary

Here is a part of an example STA report: (Your report must have a similar format!)

Point                                                                              Fanout   Cap    DTrans   Trans    Derate   Delta     Incr       Path
----------------------------------------------------------------------------------------------------------------------------------------------------------
clock hkspi_clk (fall edge)                                                                                                          50.0000    50.0000
clock source latency                                                                                                                  0.0000    50.0000
mprj_io[4] (inout)                                                                                         0.0000                     0.0000    50.0000 f
mprj_io[4] (net)                                                                     1   5.1172 
padframe/mprj_io[4] (chip_io)                                                                              0.0000   0.9625            0.0000    50.0000 f
padframe/mprj_io[4] (net) 
padframe/mprj_pads.area1_io_pad[4]/PAD (sky130_ef_io__gpiov2_pad_wrapped)                         0.0000   0.0000   0.9625   0.0000   0.0000    50.0000 f
padframe/mprj_pads.area1_io_pad[4]/IN (sky130_ef_io__gpiov2_pad_wrapped)                                   0.0936   0.9625            1.2027    51.2027 f
padframe/mprj_io_in[4] (net)                                                         1   0.0160 
padframe/mprj_io_in[4] (chip_io)                                                                           0.0000   0.9625            0.0000    51.2027 f
mprj_io_in[4] (net) 
chip_core/mprj_io_in[4] (caravel_core)                                                                     0.0000   0.9625            0.0000    51.2027 f
chip_core/mprj_io_in[4] (net) 
chip_core/input79/A (sky130_fd_sc_hd__clkbuf_4)                                                   0.0000   0.0936   0.9625   0.0000   0.0013    51.2040 f
chip_core/input79/X (sky130_fd_sc_hd__clkbuf_4)                                                            0.0504   0.9625            0.1709 &  51.3749 f



Second: Support the standard cell library you are using

First: Clone the repo

git clone https://github.com/kanndil/PathView.git

Second: Generate Skin-File

Check these pre-generated skin-files


To generate a new skin file for your standard cell library run the following command. The skin file will be located in this directory.

Run:

cd src/
python3 generateSkinFile.py -i <libertyFilePath>



Third: Generate the HTML interactive schematics

Go to source directory

cd src/

Run Generate Report

Syntax:

python3 interactiveReport.py -i <STA_Report_File_Path> -s <Skin_File_Path> -t <STA_tool>

Options:

--tool=<primetime/opensta> or -t <"primetime" or "opensta">
                    This option is used to specify the STA tool used to generate. 
                    Use "primetime" for PrimeTime and "opensta" for OpenSTA.

--npaths=<numberOfPaths> or -n <numberOfPaths>
                    This option is used to specify the number of paths to be
                    generated. If this option is not specified, all paths are
                    generated.
                    
--sort=<"asc" or "desc">   
                    This option is used to sort the paths in ascending 
                    or descending order based on slack. 
                    "asc" for ascending and "desc" for descending order.



Examples

For interactive examples check this Demo

website preview



Authors

โš–๏ธ Copyright and Licensing

Copyright 2023 AUC Open Source Hardware Lab

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at:

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.