GithubHelp home page GithubHelp logo

kanndil / pathview Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 1.0 8.24 MB

Home Page: https://kanndil.github.io/PathView/

License: Apache License 2.0

Python 23.07% HTML 76.93%
opensta static-timing-analysis critical-path eda electronic-design-automation pathview primetime schematic-layout

pathview's Introduction

PathView

code style: black Github Pages License

Header Headerpath

Table of contents

๐Ÿ“– Overview

๐Ÿ“– 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.

pathview's People

Contributors

kanndil avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

icloudx

pathview's Issues

Add internal dependancies installation guidelines

add installation guidelines for

import getopt
import os
import sys
from pyeda.inter import *
import copy
from sympy.logic import simplify_logic as simplifyLogic
from sympy import parse_expr
from sympy import SOPform, bool_map
from liberty.parser import parse_liberty as parseLiberty
import getopt
import os
import re
import copy
import sys
import json
import time
import xml.etree.ElementTree as ET

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.