GithubHelp home page GithubHelp logo

opentimer / opentimer Goto Github PK

View Code? Open in Web Editor NEW
513.0 46.0 143.0 336.45 MB

A High-performance Timing Analysis Tool for VLSI Systems

License: Other

Verilog 84.63% CMake 0.05% Python 0.01% C++ 10.35% Shell 0.02% Tcl 4.71% C 0.20% Yacc 0.04%
static-timing-analysis sta vlsi vlsi-circuits vlsi-physical-design cpp17 parallel-computing circuit-simulator verilog electronic-design-automation

opentimer's Introduction

OpenTimer

Build Status Standard Download Version AskMe Wiki License: MIT

A High-Performance Timing Analysis Tool for VLSI Systems

Why OpenTimer?

OpenTimer is a new static timing analysis (STA) tool to help IC designers quickly verify the circuit timing. It is developed completely from the ground up using C++17 to efficiently support parallel and incremental timing. Key features are:

  • Industry standard format (.lib, .v, .spef, .sdc) support
  • Graph- and path-based timing analysis
  • Parallel incremental timing for fast timing closure
  • Award-winning tools and golden timers in CAD Contests

Get Started with OpenTimer

The easiest way to start using OpenTimer is to use OpenTimer shell. OpenTimer shell is a powerful tool for interactive analysis and the simplest way to learn core functionalities. Compile OpenTimer and launch the shell program ot-shell under the bin directory.

~$ ./bin/ot-shell
  ____              _______              
 / __ \___  ___ ___/_  __(_)_ _  ___ ____
/ /_/ / _ \/ -_) _ \/ / / /  ' \/ -_) __/
\____/ .__/\__/_//_/_/ /_/_/_/_/\__/_/       v2
    /_/                                     
MIT License: type "license" to see more details.
For help, type "help".
For bug reports, issues, and manual, please see:
<https://github.com/OpenTimer/OpenTimer>.
ot> 

We have provided a simple design which consists of five gates (one NAND, one NOR, two INV, one FF) and one clock. Move to the folder and read this simple design.

ot> cd example/simple
ot> read_celllib osu018_stdcells.lib
ot> read_verilog simple.v   
ot> read_sdc simple.sdc

Report the timing to show the most critical path.

ot> report_timing      # report the most critical path
Startpoint    : inp1
Endpoint      : f1:D
Analysis type : min
------------------------------------------------------
       Type       Delay        Time   Dir  Description
------------------------------------------------------
       port       0.000       0.000  fall  inp1
        pin       0.000       0.000  fall  u1:A (NAND2X1)
        pin       2.786       2.786  rise  u1:Y (NAND2X1)
        pin       0.000       2.786  rise  u4:A (NOR2X1)
        pin       0.181       2.967  fall  u4:Y (NOR2X1)
        pin       0.000       2.967  fall  f1:D (DFFNEGX1)
    arrival                   2.967        data arrival time

related pin      25.000      25.000  fall  f1:CLK (DFFNEGX1)
 constraint       1.518      26.518        library hold_falling
   required                  26.518        data required time
------------------------------------------------------
      slack                 -23.551        VIOLATED

The critical path originates from the primary input inp1 and feed into the data pin f1:D of the flip-flop DFFNEGX1.

Compile OpenTimer

System Requirements

OpenTimer is very self-contained and has very few dependencies. To compile OpenTimer, you need a C++17 compiler. We currently support:

  • GNU C++ Compiler v7.3 with -std=c++1z
  • Clang C++ Compiler v6.0 with -std=c++17

In addition, you need a tcl shell interpreter:

  • tclsh (most Unix/Linux/OSX distributions already include tclsh)

OpenTimer has been tested to run well on Linux distributions and MAC OSX.

Build through CMake

We use CMake to manage the source and tests. We recommend using out-of-source build.

~$ git clone https://github.com/OpenTimer/OpenTimer.git
~$ cd OpenTimer
~$ mkdir build
~$ cd build
~$ cmake ../
~$ make 

After successful build, you can find binaries and libraries in the folders bin and lib, respectively.

Run Tests

OpenTimer uses Doctest for unit tests and TAU15 benchmarks for integration/regression tests. These benchmarks are generated by an industry standard timer and are being used by many EDA researchers.

~$ make test

Design Philosophy

OpenTimer has a unique software architecture to efficiently enable parallel incremental timing. We draw two levers on performance and useability by grouping each timing operation to one of the three categories, builder, action, and accessor.

Type Description Example Time Complexity
Builder create lazy tasks to build an analysis framework read_celllib, insert_gate, set_slew O(1)
Action carry out builder operations to update the timing update_timing, report_timing, report_slack Algorithm-dependent
Accessors inspect the timer without changing any internal data structures dump_timer, dump_slack, dump_net_load Operation-dependent

Builder: OpenTimer Lineage

OpenTimer maintains a lineage graph of builder operations to create a task execution plan (TEP). A TEP starts with no dependency and keeps adding tasks to the lineage graph every time you call a builder operation. It records what transformations need to be executed when an action has been called.

The above figure shows an example lineage graph of a sequence of builder operations. The cyan path is the main lineage line with additional tasks attached to enable parallel execution. OpenTimer use Cpp-Taskflow to create dependency graphs.

Action: Update Timing

A TEP is materialized and executed when the timer is requested to perform an action operation. Each action operation triggers timing update from the earliest task to the one that produces the result of the action call. Internally, OpenTimer creates task dependency graph to update timing in parallel, including forward (slew, arrival time) and backward (required arrival time) propagations.

The figure above shows the dependency graph (forward in white, backward in cyan) to update the timing of the simple design. When an action call finishes, it cleans out the lineage graph with all timing up-to-date.

Accessor: Inspect OpenTimer

The accessor operations let you inspect the timer status and dump timing information. All accessor operations are declared as const methods in the timer class. Calling them promises not to alter any internal members. For example, you can dump the timing graph into a DOT format and use tools like GraphViz for visualization.

ot> dump_graph  
digraph TimingGraph {
  "inp1";
  ...  # skip for short
  "f1:CLK" -> "f1:Q";
  "u1:B" -> "u1:Y";
  "u1:A" -> "u1:Y";
}

OpenTimer Shell

OpenTimer shell is a powerful command line tool to perform interactive analysis. It is also the easiest way to get your first timing report off the ground. The program ot-shell can be found in the folder bin/ after you Compile OpenTimer.

Commands

The table below shows a list of commonly used commands.

Command type Arguments Description Example
read_celllib builder [-min | -max] file read the cell library for early and late splits read_celllib mylib.lib
read_verilog builder file read the verilog netlist read_verilog mynetlist.v
read_spef builder file read parasitics in SPEF read_spef myparasitics.spef
read_sdc builder file read a Synopsys Design Constraint file read_sdc myrule.sdc
update_timing action none update the timing update_timing
report_timing action [-num_paths k] report the critical paths report_timing -num_paths 10
report_tns action none report the total negative slack report_tns
report_wns action none report the worst negative slack report_wns
dump_graph accessor [-o file] dump the timing graph to a DOT format dump_graph
dump_timer accessor [-o file] dump the design statistics dump_timer

To see the full command list, visit OpenTimer Wiki.

Integrate OpenTimer to your Project

There are a number of ways to develop your project on top of OpenTimer.

Option 1: Add OpenTimer Subproject

The easiest way to build an OpenTimer application is to include it as a subproject using CMake add_subdirectory. Copy OpenTimer to your project root directory and configure your CMakeLists as follows:

cmake_minimum_required (VERSION 3.9)                  # CMake minimum version
project(app)                                          # your OpenTimer application
add_subdirectory(OpenTimer)                           # add OpenTimer project
include_directories(${PROJECT_SOURCE_DIR}/OpenTimer)  # add OpenTimer include

set(CMAKE_CXX_STANDARD 17)                            # enable c++17
set(CMAKE_CXX_STANDARD_REQUIRED ON)

find_package(Threads REQUIRED)                        # thread library (pthread)

add_executable(app app.cpp)                           # link to your app.cpp
target_link_libraries(app OpenTimer Threads::Threads stdc++fs)

Option 2: Install OpenTimer

Our project CMakeLists.txt has defined the required files to install when you hit make install. The installation paths are <prefix>/include, <prefix>/lib, and <prefix>/bin for the hpp files, library, and executable where <prefix> can be configured through the cmake variable CMAKE_INSTALL_PREFIX. The following example installs OpenTimer to /tmp.

~$ cd build/
~$ cmake ../ -DCMAKE_INSTALL_PREFIX=/tmp
~$ make 
~$ make install
~$ cd /tmp            # install OpenTimer to /tmp
~$ ls
bin/  include/  lib/  # OpenTimer headers, libraries, and binaries

To build your application on top of the OpenTimer headers and library, you need -std=c++1z and -lstdc++fs flags to enable C++17 standard and filesystem libraries.

~$ g++ app.cpp -std=c++1z -O2 -I include -L lib -lOpenTimer -lpthread -o app.out "-lstdc++fs "
~$ ./app.out

OpenTimer C++ API

The class Timer is the main entry you need to call OpenTimer in your project. The table below summarizes a list of commonly used methods.

Method Type Argument Return Description
read_celllib builder path, split self read the cell library for early and late splits
read_verilog builder path self read a verilog netlist
read_spef builder path self read parasitics in SPEF
read_sdc builder path self read a Synopsys Design Constraint file
update_timing action void void update the timing; all timing values are up-to-date upon return
tns action void optional of float update the timing and return the total negative slack if exists
wns action void optional of float update the timing and return the worst negative slack if exists
dump_graph accessor ostream void dump the timing graph in DOT format to an output stream
dump_timer accessor ostream void dump the design statistics to an output stream

All public methods are thread-safe as a result of OpenTimer lineage. The example below shows an OpenTimer application and the use of builder, action, and accessor API.

#include <ot/timer/timer.hpp>                     // top-level header to include

int main(int argc, char *argv[]) {
  
  ot::Timer timer;                                // create a timer instance (thread-safe)
  
  timer.read_celllib("simple.lib", std::nullopt)  // read the library (O(1) builder)
       .read_verilog("simple.v")                  // read the verilog netlist (O(1) builder)
       .read_spef("simple.spef")                  // read the parasitics (O(1) builder)
       .read_sdc("simple.sdc")                    // read the design constraints (O(1) builder)
       .update_timing();                          // update timing (O(1) builder)

  if(auto tns = timer.report_tns(); tns) std::cout << "TNS: " << *tns << '\n';  // (O(N) action)
  if(auto wns = timer.report_wns(); wns) std::cout << "WNS: " << *wns << '\n';  // (O(N) action)
  
  timer.dump_timer(std::cout);                    // dump the timer details (O(1) accessor)
  
  return 0;
}

To see the full API list, visit OpenTimer Wiki.

Examples

The folder example contains several examples and is a great place to learn how to use OpenTimer.

Example Description Library
simple A timing report example on a sequential circuit design. OSU Free PDK 45nm
incremental An incremental timing example to create a sequential design from the ground up using OpenTimer's C++ API OSU Free PDK 45nm
unit A dimensional analysis example with different time unit conversions. OSU Free PDK 45nm
sizer A gate-sizing example on a design with six NAND2 cells. NanGate 45nm Open Cell Library
optimizer A timing-driven optimization example plus incremental timing update. TAU15 contest library

The folder benchmark contains more designs and they are mainly used for internal regression and integration tests.

Who is Using OpenTimer?

OpenTimer is an award-winning tools. It won ACM TAU Timing Analysis Contests multiple times (1st Place in 2014, 2nd Place in 2015, and 1st Place in 2016), the Special Price in the 2016 LibreCores Design Contest, and the Best Tool Winner in the 2018 WOSET at ICCAD. Many industry and academic people are using OpenTimer in their projects:

  • Golden Timer, 2019 ACM TAU Timing Analysis Contest on Timing-driven Optimization
  • Golden Timer, 2018 ACM TAU Timing Analysis Contest on Timing Reports from an STA Graph
  • Golden Timer, 2017 ACM TAU Timing Analysis Contest on Micro Modeling
  • Golden Timer, 2016 ACM TAU Timing Analysis Contest on Micro Modeling
  • Golden Timer, 2015 ACM/IEEE ICCAD Incremental Timing-driven Placement Contest
  • VSD: VLSI System Design Corporation
  • OpenDesign Flow Database: the infrastructure for VLSI design and design automation research
  • CloudV: a cloud-based platform to design and test chips for free
  • LGraph: live graph infrastructure for synthesis and simulation
  • Qflow: a digital synthesis flow using open-source EDA tools
  • Ophidian: an open-source library for physical design research and teaching

Please don't hesitate to let me know if I forgot your project!

Get Involved

Contributors & Acknowledgment

OpenTimer is being actively developed and contributed by the following people:

  • Tsung-Wei Huang created the OpenTimer project is now the chief architect.
  • Martin Wong supported the OpenTimer project through NSF and DARPA funding.
  • Andreas Olofsson supported the OpenTimer project through the DARPA IDEA project.
  • Chun-Xun Lin implemented the prompt interface of OpenTimer shell.
  • Kunal Ghosh provided a list of practical features to include in OpenTimer.
  • Pei-Yu Lee provided useful incremental timing discussion and helped fix bugs.
  • Tin-Yin Lai discussed micro modeling algorithms and helped fix bugs.
  • Jin Hu helped define the timing API and produced the golden benchmarks for integration tests.
  • Myung-Chul Kim helped test OpenTimer through ICCAD CAD contest.
  • George Chen helped defined path report formats and test OpenTimer through TAU contest.
  • Jignesh Shah contributed to the area and power report commands.
  • Pao-I Chen helped design the logo of OpenTimer.
  • Leslie Hwang reviewed the documentation and README.
  • Song Chen shared his opinion about command designs to avoid naming conflicts and litigation.

Meanwhile, we appreciate the support from many organizations for our development of OpenTimer. Please don't hesitate to let me know if I forgot you!

License

OpenTimer is licensed under the MIT License:

Copyright ยฉ 2018 Dr. Tsung-Wei Huang and Dr. Martin Wong

The University of Illinois at Urbana-Champaign, IL, USA

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the โ€œSoftwareโ€), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED โ€œAS ISโ€, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


The core of OpenTimer is under MIT license. However, it is built, tested, and documented using several third-party tools and services. Thanks a lot!

  • units: a compile-time header-only dimensional analysis and unit conversion
  • Parser-SPEF: a fast C++ header-only parser for standard parasitic exchange format (SPEF)
  • PEGTL: parsing expression grammar template library
  • Cpp-Taskflow: fast C++ parallel programming with task dependencies
  • NanGate 45nm Library: open-source standard-cell library for testing and exploring EDA flows
  • OSU PDK: Oklahoma State University system on chip (SoC) design flows
  • Synopsys TAP-in: Synopsys technology access program for liberty user guide and open-source SDC parser.

You can find a copy of these licenses under the folder licenses.


opentimer's People

Contributors

clin99 avatar gatecat avatar renau avatar shaikthouheed avatar tsung-wei-huang avatar twhuang-utah avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

opentimer's Issues

Number of Threads

How do we control the number of threads, such as setting it to run on a single thread.Thanks!

Issue compiling on mac

Hi, I am trying to compile on mac (macOS Catalina 10.15.6). Having trouble building with both clang and gcc.

Clang

First issue was I had to change L18 of CMakeLists.txt to be "AppleClang" instead of "Clang" to get cmake to work. When I run make I get:

/usr/local/Cellar/cmake/3.14.0/bin/cmake -S/home/OpenTimer -B/home/OpenTimer/build --check-build-system CMakeFiles/Makefile.cmake 0
/usr/local/Cellar/cmake/3.14.0/bin/cmake -E cmake_progress_start /home/OpenTimer/build/CMakeFiles /home/OpenTimer/build/CMakeFiles/progress.marks
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f CMakeFiles/Makefile2 all
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f CMakeFiles/OpenTimer.dir/build.make CMakeFiles/OpenTimer.dir/depend
cd /home/OpenTimer/build && /usr/local/Cellar/cmake/3.14.0/bin/cmake -E cmake_depends "Unix Makefiles" /home/OpenTimer /home/OpenTimer /home/OpenTimer/build /home/OpenTimer/build /home/OpenTimer/build/CMakeFiles/OpenTimer.dir/DependInfo.cmake --color=
Scanning dependencies of target OpenTimer
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f CMakeFiles/OpenTimer.dir/build.make CMakeFiles/OpenTimer.dir/build
[  1%] Building CXX object CMakeFiles/OpenTimer.dir/ot/unit/unit.cpp.o
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++   -I/home/OpenTimer  -Wall -O2 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk   -std=c++1z -o CMakeFiles/OpenTimer.dir/ot/unit/unit.cpp.o -c /home/OpenTimer/ot/unit/unit.cpp
In file included from /home/OpenTimer/ot/unit/unit.cpp:1:
In file included from /home/OpenTimer/ot/unit/unit.hpp:4:
In file included from /home/OpenTimer/ot/headerdef.hpp:52:
/home/OpenTimer/ot/patch/clang_variant.hpp:38:10: fatal error: 'bits/enable_special_members.h' file not found
#include <bits/enable_special_members.h>
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
make[2]: *** [CMakeFiles/OpenTimer.dir/ot/unit/unit.cpp.o] Error 1
make[1]: *** [CMakeFiles/OpenTimer.dir/all] Error 2
make: *** [all] Error 2

Clang version is

Apple clang version 12.0.0 (clang-1200.0.32.2)
Target: x86_64-apple-darwin19.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

GCC

If instead use g++ (/usr/local/bin/g++-10) cmake is successful, but make gives

/usr/local/Cellar/cmake/3.14.0/bin/cmake -S/home/OpenTimer -B/home/OpenTimer/build --check-build-system CMakeFiles/Makefile.cmake 0
/usr/local/Cellar/cmake/3.14.0/bin/cmake -E cmake_progress_start /home/OpenTimer/build/CMakeFiles /home/OpenTimer/build/CMakeFiles/progress.marks
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f CMakeFiles/Makefile2 all
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f CMakeFiles/OpenTimer.dir/build.make CMakeFiles/OpenTimer.dir/depend
cd /home/OpenTimer/build && /usr/local/Cellar/cmake/3.14.0/bin/cmake -E cmake_depends "Unix Makefiles" /home/OpenTimer /home/OpenTimer /home/OpenTimer/build /home/OpenTimer/build /home/OpenTimer/build/CMakeFiles/OpenTimer.dir/DependInfo.cmake --color=
Scanning dependencies of target OpenTimer
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f CMakeFiles/OpenTimer.dir/build.make CMakeFiles/OpenTimer.dir/build
[  1%] Building CXX object CMakeFiles/OpenTimer.dir/ot/unit/unit.cpp.o
/usr/local/bin/g++-10   -I/home/OpenTimer  -Wall -O2 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk   -std=c++17 -o CMakeFiles/OpenTimer.dir/ot/unit/unit.cpp.o -c /home/OpenTimer/ot/unit/unit.cpp
In file included from /home/OpenTimer/ot/unit/unit.hpp:4,
                 from /home/OpenTimer/ot/unit/unit.cpp:1:
/home/OpenTimer/ot/headerdef.hpp:67:50: error: 'namespace std::filesystem = std::experimental::std::experimental::filesystem;' conflicts with a previous declaration
   67 |   namespace filesystem = experimental::filesystem;
      |                                                  ^
In file included from /usr/local/Cellar/gcc/10.2.0/include/c++/10.2.0/thread:43,
                 from /home/OpenTimer/ot/headerdef.hpp:7,
                 from /home/OpenTimer/ot/unit/unit.hpp:4,
                 from /home/OpenTimer/ot/unit/unit.cpp:1:
/usr/local/Cellar/gcc/10.2.0/include/c++/10.2.0/chrono:54:13: note: previous declaration 'namespace std::filesystem { }'
   54 |   namespace filesystem { struct __file_clock; };
      |             ^~~~~~~~~~
make[2]: *** [CMakeFiles/OpenTimer.dir/ot/unit/unit.cpp.o] Error 1
make[1]: *** [CMakeFiles/OpenTimer.dir/all] Error 2
make: *** [all] Error 2

GCC version is

g++-10 (Homebrew GCC 10.2.0) 10.2.0

[API request] top-k worst paths

Generate the top-k worst paths
To support the API worst_paths and shell command report_worst_paths for generating the top-k critical paths.

C++ API:

timer.worst_paths(size_t K, Split, Tran)

Shell command:

report_paths -num_paths K 

the time unit difference between lib and spef

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Failed to compile.

I was attempting to follow the udemy free tools install course "vsd a complete guide to install open source eda tools" chapter 5 about OpenTimer. I was unable to compile OpenTimer-1.0.5 I haven't written any C++ since perhaps 1995 but was able to resolve the issue. In the file: demangle.cc I changed two lines:
line 170
if (*str == '\0') {
// if (str == '\0') { // maybe fixed GFA 11/7/17 with above line added *

and this around line 226:

if (*state->mangled_cur == '\0') {
// if (state->mangled_cur == '\0') { //original replaced by above GFA 11/07/17

After doing that and figuring out after compile, I need to run a command "sudo ldconfig" this now compiles and runs under Ubuntu 17.10. Perhaps this or what ever was intended could be included in the source code for this project.

Thanks,
Gordon Aplin

Not able to compile the cpp files provided in example directory. Please see the following,

Describe the bug
Not able to compile the cpp files provided in example directory. Please see the following,

((base) sukanta@sukanta:~/github/OpenTimer/example/simple$ g++ simple.cpp -std=c++1z -O2 -I include -L lib -lOpenTimer -lpthread -o simple.out "-lstdc++fs "
simple.cpp:8:10: fatal error: ot/timer/timer.hpp: No such file or directory
    8 | #include <ot/timer/timer.hpp>
      |          ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
(base) sukanta@sukanta:~/github/OpenTimer/example/simple$ 

tcl based opentimer runs

Hi Tsung-Wei
I noticed another issue while running with tcl based Opentimer
To reproduce the issue, use the below steps:

Download testcase.tar.gz.

  1. tar -xvzf testcase.tar.gz
  2. tclsh test.tcl
  3. ot-shell -i test.conf

Output of step 2 is redirected in my_report file and output of step 3 is on shell
Both outputs should be identical, but they are not.
Step 2 drops some constraints while step 3 is accurate. Can you please have a look?

[Compilation Issue] Problem with compiling OpenTimer on Mac

Iโ€™m getting the following error during compilation on my Mac. Any ideas what might be wrong?

Scanning dependencies of target OpenTimer
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f CMakeFiles/OpenTimer.dir/build.make CMakeFiles/OpenTimer.dir/build
[  1%] Building CXX object CMakeFiles/OpenTimer.dir/ot/unit/unit.cpp.o
/opt/local/bin/g++-mp-7   -I/Users/gjchen/src/OpenTimer-v2.181125/OpenTimer-master  -Wall -O2   -std=c++1z -o CMakeFiles/OpenTimer.dir/ot/unit/unit.cpp.o -c /Users/gjchen/src/OpenTimer-v2.181125/OpenTimer-master/ot/unit/unit.cpp
In file included from /opt/local/include/gcc7/c++/x86_64-apple-darwin17/bits/c++allocator.h:33:0,
                 from /opt/local/include/gcc7/c++/bits/allocator.h:46,
                 from /opt/local/include/gcc7/c++/string:41,
                 from /opt/local/include/gcc7/c++/bits/locale_classes.h:40,
                 from /opt/local/include/gcc7/c++/bits/ios_base.h:41,
                 from /opt/local/include/gcc7/c++/ios:42,
                 from /opt/local/include/gcc7/c++/ostream:38,
                 from /opt/local/include/gcc7/c++/iostream:39,
                 from /Users/gjchen/src/OpenTimer-v2.181125/OpenTimer-master/ot/headerdef.hpp:4,
                 from /Users/gjchen/src/OpenTimer-v2.181125/OpenTimer-master/ot/unit/unit.hpp:4,
                 from /Users/gjchen/src/OpenTimer-v2.181125/OpenTimer-master/ot/unit/unit.cpp:1:
/opt/local/include/gcc7/c++/ext/new_allocator.h: In instantiation of 'void __gnu_cxx::new_allocator<_Tp>::construct(_Up*, _Args&& ...) [with _Up = tf::Node; _Args = {const tf::Node&}; _Tp = tf::Node]':
/opt/local/include/gcc7/c++/bits/alloc_traits.h:475:4:   required from 'static void std::allocator_traits<std::allocator<_CharT> >::construct(std::allocator_traits<std::allocator<_CharT> >::allocator_type&, _Up*, _Args&& ...) [with _Up = tf::Node; _Args = {const tf::Node&}; _Tp = tf::Node; std::allocator_traits<std::allocator<_CharT> >::allocator_type = std::allocator<tf::Node>]'
/opt/local/include/gcc7/c++/bits/forward_list.h:351:32:   required from 'std::_Fwd_list_base<_Tp, _Alloc>::_Node* std::_Fwd_list_base<_Tp, _Alloc>::_M_create_node(_Args&& ...) [with _Args = {const tf::Node&}; _Tp = tf::Node; _Alloc = std::allocator<tf::Node>; std::_Fwd_list_base<_Tp, _Alloc>::_Node = std::_Fwd_list_node<tf::Node>]'
/opt/local/include/gcc7/c++/bits/forward_list.tcc:109:27:   required from 'void std::forward_list<_Tp, _Alloc>::_M_range_initialize(_InputIterator, _InputIterator) [with _InputIterator = std::_Fwd_list_const_iterator<tf::Node>; _Tp = tf::Node; _Alloc = std::allocator<tf::Node>]'
/opt/local/include/gcc7/c++/bits/forward_list.h:531:28:   required from 'std::forward_list<_Tp, _Alloc>::forward_list(const std::forward_list<_Tp, _Alloc>&) [with _Tp = tf::Node; _Alloc = std::allocator<tf::Node>]'
/opt/local/include/gcc7/c++/type_traits:1406:12:   required from 'struct std::is_trivially_copy_constructible<std::forward_list<tf::Node> >'
/opt/local/include/gcc7/c++/optional:105:8:   required from 'class std::_Optional_base<std::forward_list<tf::Node> >'
/opt/local/include/gcc7/c++/optional:453:11:   required from 'class std::optional<std::forward_list<tf::Node> >'
/Users/gjchen/src/OpenTimer-v2.181125/OpenTimer-master/ot/taskflow/taskflow.hpp:267:26:   required from here
/opt/local/include/gcc7/c++/ext/new_allocator.h:136:4: error: use of deleted function 'tf::Node::Node(const tf::Node&)'
  { ::new((void *)__p) _Up(std::forward<_Args>(__args)...); }
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /Users/gjchen/src/OpenTimer-v2.181125/OpenTimer-master/ot/headerdef.hpp:58:0,
                 from /Users/gjchen/src/OpenTimer-v2.181125/OpenTimer-master/ot/unit/unit.hpp:4,
                 from /Users/gjchen/src/OpenTimer-v2.181125/OpenTimer-master/ot/unit/unit.cpp:1:
/Users/gjchen/src/OpenTimer-v2.181125/OpenTimer-master/ot/taskflow/taskflow.hpp:232:7: note: 'tf::Node::Node(const tf::Node&)' is implicitly deleted because the default definition would be ill-formed:
 class Node {
       ^~~~
/Users/gjchen/src/OpenTimer-v2.181125/OpenTimer-master/ot/taskflow/taskflow.hpp:232:7: error: use of deleted function 'std::atomic<int>::atomic(const std::atomic<int>&)'
In file included from /opt/local/include/gcc7/c++/future:42:0,
                 from /Users/gjchen/src/OpenTimer-v2.181125/OpenTimer-master/ot/headerdef.hpp:21,
                 from /Users/gjchen/src/OpenTimer-v2.181125/OpenTimer-master/ot/unit/unit.hpp:4,
                 from /Users/gjchen/src/OpenTimer-v2.181125/OpenTimer-master/ot/unit/unit.cpp:1:
/opt/local/include/gcc7/c++/atomic:668:7: note: declared here
       atomic(const atomic&) = delete;
       ^~~~~~
make[2]: *** [CMakeFiles/OpenTimer.dir/ot/unit/unit.cpp.o] Error 1
make[1]: *** [CMakeFiles/OpenTimer.dir/all] Error 2
make: *** [all] Error 2

condition delay support

it seems condition delay is not supported. for example an AOI cell. input pin to output pin delay will be effected by other pins logic state.

report timing for a design with only clock in the SDC file

When running the simple example provided in the Wiki, once the celllib and verilog are read if I only have create_clock -period 50 -name tau2015_clk [get_ports tau2015_clk] in the SDC file, OpenTimer does not report timing:

____              _______
/ __ \___  ___ ___/  ___(_)_ _  ___ ____
/ /_/ /_ \/ -_)_ \/ / / /  ' \/ -_) __/
\____/ .__/\__/_//_/_/ /_/_/_/_/\__/_/       v2.0.0 (alpha)
   /_/
MIT License: type โ€œlicenseโ€ to see more details.
For help, type โ€œhelpโ€.
For bug reports, issues, and manual, please see:
<https://github.com/OpenTimer/OpenTimer>.
ot> read_celllib osu018_stdcells.lib
ot> read_verilog simple.v
ot> read_sdc simple.sdc
ot> report_timing -num_paths 5
I 63232 19-04-30 13:35:43 celllib.cpp:40] loading celllib โ€œosu018_stdcells.libโ€
I  5888 19-04-30 13:35:43 sdc.cpp:35] loading sdc โ€œsimple.sdcโ€ ...
I  1792 19-04-30 13:35:43 verilog.cpp:18] loading netlist โ€œsimple.vโ€
I 63232 19-04-30 13:35:43 unit.cpp:256] use celllib time unit 1e-09 s
I 63232 19-04-30 13:35:43 unit.cpp:270] use celllib capacitance unit 1e-12 F
I 63232 19-04-30 13:35:43 unit.cpp:284] use celllib current unit 1e-06 A
I 63232 19-04-30 13:35:43 unit.cpp:298] use celllib voltage unit 1 V
I 63232 19-04-30 13:35:43 unit.cpp:312] use celllib resistance unit 1000 Ohm
I 63232 19-04-30 13:35:43 unit.cpp:326] use celllib power unit 1e-09 W
I 63232 19-04-30 13:35:43 celllib.cpp:73] added min celllib โ€œosu018_stdcellsโ€ [cells:32]
I 63232 19-04-30 13:35:43 celllib.cpp:73] added max celllib โ€œosu018_stdcellsโ€ [cells:32]
I 63232 19-04-30 13:35:43 verilog.cpp:25] added verilog module โ€œsimpleโ€ [gates:5]
I  5888 19-04-30 13:35:44 sdc.cpp:25] added 1 sdc commands
no critical path found

whereas OpenSTA does:

$../sta/sta 
OpenSTA Copyright (c) 2018, Parallax Software, Inc.
License GPLv3: GNU GPL version 3 <http://gnu.org/licenses/gpl.html>

This is free software, and you are free to change and redistribute it
under certain conditions; type `show_copying' for details. 
This program comes with ABSOLUTELY NO WARRANTY; for details type `show_warranty'.
% read_verilog simple.v
Error: history.tcl, 330 invoked "return" outside of a proc.
1
% read_liberty osu018_stdcells.lib
1
% link_design simple
1
% create_clock -name tau2015_clk -period 1 {tau2015_clk}
% report_checks
Startpoint: f1 (falling edge-triggered flip-flop clocked by tau2015_clk)
Endpoint: f1 (falling edge-triggered flip-flop clocked by tau2015_clk)
Path Group: tau2015_clk
Path Type: max

  Delay    Time   Description
---------------------------------------------------------
   0.50    0.50   clock tau2015_clk (fall edge)
   0.00    0.50   clock network delay (ideal)
   0.00    0.50 v f1/CLK (DFFNEGX1)
   0.14    0.64 ^ f1/Q (DFFNEGX1)
   0.05    0.69 v u4/Y (NOR2X1)
   0.00    0.69 v f1/D (DFFNEGX1)
           0.69   data arrival time

   1.50    1.50   clock tau2015_clk (fall edge)
   0.00    1.50   clock network delay (ideal)
   0.00    1.50   clock reconvergence pessimism
           1.50 v f1/CLK (DFFNEGX1)
  -0.19    1.31   library setup time
           1.31   data required time
---------------------------------------------------------
           1.31   data required time
          -0.69   data arrival time
---------------------------------------------------------
           0.63   slack (MET)

[API request] Request API or information on how to access CellView

I am able to access the map that contains the gates (instances) in the design. However, the only public method in the gate object API is the name, and it is the name of the gate itself, i.e. the instance name. Can you provide an API to access the celltype/CellView? That will allow me to upsize/downsize the gate.

Thanks.

George

Unable to install OpenTimer

IMG_20220214_183633
IMG_20220214_181233
Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the bug.

Compile error with clang++

I get this compile errors/warnings with the latest clang++
clang version 8.0.0 (tags/RELEASE_800/final)

external/opentimer/ot/timer/timer.cpp:1109:77: error: 'el' in capture list does not name a variable
_insert_action(to_string("update_endpoints ", el, ' ', rf)).work([this, el, rf] () {

external/opentimer/ot/timer/timer.cpp:1109:81: error: 'rf' in capture list does not name a variable
_insert_action(to_string("update_endpoints ", el, ' ', rf)).work([this, el, rf] () {
^
external/opentimer/ot/timer/timer.cpp:1113:28: error: reference to local binding 'el' declared in enclosing function 'ot::Timer::_update_endpoints'
if(po.second.slack(el, rf).has_value()) {
^
external/opentimer/ot/timer/timer.cpp:1105:18: note: 'el' declared here
FOR_EACH_EL_RF(el, rf) {
^
external/opentimer/ot/timer/timer.cpp:1113:32: error: reference to local binding 'rf' declared in enclosing function 'ot::Timer::_update_endpoints'
if(po.second.slack(el, rf).has_value()) {
^
external/opentimer/ot/timer/timer.cpp:1105:22: note: 'rf' declared here
FOR_EACH_EL_RF(el, rf) {
^
external/opentimer/ot/timer/timer.cpp:1114:22: error: reference to local binding 'el' declared in enclosing function 'ot::Timer::_update_endpoints'
_endpoints[el][rf].emplace_back(el, rf, po.second);
^
external/opentimer/ot/timer/timer.cpp:1105:18: note: 'el' declared here
FOR_EACH_EL_RF(el, rf) {
^
external/opentimer/ot/timer/timer.cpp:1114:26: error: reference to local binding 'rf' declared in enclosing function 'ot::Timer::_update_endpoints'
_endpoints[el][rf].emplace_back(el, rf, po.second);
^
external/opentimer/ot/timer/timer.cpp:1105:22: note: 'rf' declared here
FOR_EACH_EL_RF(el, rf) {
^
external/opentimer/ot/timer/timer.cpp:1114:43: error: reference to local binding 'el' declared in enclosing function 'ot::Timer::_update_endpoints'
_endpoints[el][rf].emplace_back(el, rf, po.second);
^
external/opentimer/ot/timer/timer.cpp:1105:18: note: 'el' declared here
FOR_EACH_EL_RF(el, rf) {
^
external/opentimer/ot/timer/timer.cpp:1114:47: error: reference to local binding 'rf' declared in enclosing function 'ot::Timer::_update_endpoints'
_endpoints[el][rf].emplace_back(el, rf, po.second);
^
external/opentimer/ot/timer/timer.cpp:1105:22: note: 'rf' declared here
FOR_EACH_EL_RF(el, rf) {
^
external/opentimer/ot/timer/timer.cpp:1120:23: error: reference to local binding 'el' declared in enclosing function 'ot::Timer::_update_endpoints'
if(test.slack(el, rf).has_value()) {
^
external/opentimer/ot/timer/timer.cpp:1105:18: note: 'el' declared here
FOR_EACH_EL_RF(el, rf) {
^
external/opentimer/ot/timer/timer.cpp:1120:27: error: reference to local binding 'rf' declared in enclosing function 'ot::Timer::_update_endpoints'
if(test.slack(el, rf).has_value()) {
^
external/opentimer/ot/timer/timer.cpp:1105:22: note: 'rf' declared here
FOR_EACH_EL_RF(el, rf) {
^
external/opentimer/ot/timer/timer.cpp:1121:22: error: reference to local binding 'el' declared in enclosing function 'ot::Timer::_update_endpoints'
_endpoints[el][rf].emplace_back(el, rf, test);
^
external/opentimer/ot/timer/timer.cpp:1105:18: note: 'el' declared here
FOR_EACH_EL_RF(el, rf) {
^
external/opentimer/ot/timer/timer.cpp:1121:26: error: reference to local binding 'rf' declared in enclosing function 'ot::Timer::_update_endpoints'
_endpoints[el][rf].emplace_back(el, rf, test);
^
external/opentimer/ot/timer/timer.cpp:1105:22: note: 'rf' declared here
FOR_EACH_EL_RF(el, rf) {
^
external/opentimer/ot/timer/timer.cpp:1121:43: error: reference to local binding 'el' declared in enclosing function 'ot::Timer::_update_endpoints'
_endpoints[el][rf].emplace_back(el, rf, test);
^
external/opentimer/ot/timer/timer.cpp:1105:18: note: 'el' declared here
FOR_EACH_EL_RF(el, rf) {
^
external/opentimer/ot/timer/timer.cpp:1121:47: error: reference to local binding 'rf' declared in enclosing function 'ot::Timer::_update_endpoints'
_endpoints[el][rf].emplace_back(el, rf, test);
^
external/opentimer/ot/timer/timer.cpp:1105:22: note: 'rf' declared here
FOR_EACH_EL_RF(el, rf) {
^
external/opentimer/ot/timer/timer.cpp:1126:28: error: reference to local binding 'el' declared in enclosing function 'ot::Timer::_update_endpoints'
std::sort(_endpoints[el][rf].begin(), _endpoints[el][rf].end());
^
external/opentimer/ot/timer/timer.cpp:1105:18: note: 'el' declared here
FOR_EACH_EL_RF(el, rf) {
^
external/opentimer/ot/timer/timer.cpp:1126:32: error: reference to local binding 'rf' declared in enclosing function 'ot::Timer::_update_endpoints'
std::sort(_endpoints[el][rf].begin(), _endpoints[el][rf].end());
^
external/opentimer/ot/timer/timer.cpp:1105:22: note: 'rf' declared here
FOR_EACH_EL_RF(el, rf) {
^
external/opentimer/ot/timer/timer.cpp:1126:56: error: reference to local binding 'el' declared in enclosing function 'ot::Timer::_update_endpoints'
std::sort(_endpoints[el][rf].begin(), _endpoints[el][rf].end());
^
external/opentimer/ot/timer/timer.cpp:1105:18: note: 'el' declared here
FOR_EACH_EL_RF(el, rf) {
^
external/opentimer/ot/timer/timer.cpp:1126:60: error: reference to local binding 'rf' declared in enclosing function 'ot::Timer::_update_endpoints'
std::sort(_endpoints[el][rf].begin(), _endpoints[el][rf].end());
^
external/opentimer/ot/timer/timer.cpp:1105:22: note: 'rf' declared here
FOR_EACH_EL_RF(el, rf) {
^
external/opentimer/ot/timer/timer.cpp:1129:22: error: reference to local binding 'el' declared in enclosing function 'ot::Timer::_update_endpoints'
if(!_endpoints[el][rf].empty()) {
^
external/opentimer/ot/timer/timer.cpp:1105:18: note: 'el' declared here
FOR_EACH_EL_RF(el, rf) {
^

sfxt.hpp:34:12: error๏ผšexpected unqualified-id before numeric constant

Describe the bug
build error on cygwin platform

To Reproduce
Steps to reproduce the behavior:
build on cygwin, gcc version is 9.3

Expected behavior
build success

Screenshots
If applicable, add screenshots to help explain your problem.
image

Desktop (please complete the following information):

  • OS: win 10 cygwin
  • Browser [e.g. chrome, safari]
  • Version gcc-9.3

Mac OS clang string is AppleClang so I change cmake compiler check from "Clang" to "AppleClang"

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

error: 'S_IRUSR' was not declared in this scope

Describe the bug

/usr/local/bin/g++10  -I/disk-samsung/freebsd-ports/cad/opentimer/work/OpenTimer-18d28ff -O2 -pipe -fno-omit-frame-pointer  -fstack-protector-strong -Wl,-rpath=/usr/local/lib/gcc10 -fno-omit-frame-pointer  -Wl,-rpath=/usr/local/lib/gcc10 -O2 -pipe -fno-omit-frame-pointer  -fstack-protector-strong -Wl,-rpath=/usr/local/lib/gcc10 -fno-omit-frame-pointer  -Wl,-rpath=/usr/local/lib/gcc10 -pthread -std=c++17 -MD -MT CMakeFiles/utility.dir/unittest/utility.cpp.o -MF CMakeFiles/utility.dir/unittest/utility.cpp.o.d -o CMakeFiles/utility.dir/unittest/utility.cpp.o -c /disk-samsung/freebsd-ports/cad/opentimer/work/OpenTimer-18d28ff/unittest/utility.cpp
In file included from /disk-samsung/freebsd-ports/cad/opentimer/work/OpenTimer-18d28ff/ot/utility/utility.hpp:5,
                 from /disk-samsung/freebsd-ports/cad/opentimer/work/OpenTimer-18d28ff/unittest/utility.cpp:4:
/disk-samsung/freebsd-ports/cad/opentimer/work/OpenTimer-18d28ff/ot/utility/logger.hpp: In member function 'void ot::Logger::redir(const string&)':
/disk-samsung/freebsd-ports/cad/opentimer/work/OpenTimer-18d28ff/ot/utility/logger.hpp:157:64: error: 'S_IRUSR' was not declared in this scope
  157 |   int fd = ::open(fpath.c_str(), O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR);
      |                                                                ^~~~~~~

Reason: #include <sys/stat.h> is missing.

OS: FreeBSD 13

malloc(): memory corruption error using vendor library

Using my small lfs.v test design (see internal paths not reported closed issue), I moved implementing with the example library to using a vendor library, the .35um D_CELLS library from XFab, slow 3.0 volt version. The following bad thing happens :

  ____              _______              
 / __ \___  ___ ___/_  __(_)_ _  ___ ____
/ /_/ / _ \/ -_) _ \/ / / /  ' \/ -_) __/
\____/ .__/\__/_//_/_/ /_/_/_/_/\__/_/       v2.0.0 (alpha)
    /_/                                     
MIT License: type "license" to see more details.
For help, type "help".
For bug reports, issues, and manual, please see:
<https://github.com/OpenTimer/OpenTimer>.
ot> read_celllib slow.lib
ot> read_verilog lfs_slow.v
ot> read_sdc test.sdc
ot> report_timing
I  9984 18-09-23 22:20:55 verilog.cpp:74] loading netlist "lfs_slow.v" ...
I  1792 18-09-23 22:20:55 celllib.cpp:600] loading celllib "slow.lib" ...
I 14080 18-09-23 22:20:55 sdc.cpp:35] loading sdc "test.sdc" ...
malloc(): memory corruption
Aborted (core dumped)

Unfortunately I believe the library is provided under NDA so I cannot provide it for debug, but it does work with several other tools including Yosys and ABC. If there is a debug directive or compiler flag that I can turn on to narrow down where this crash happened, let me know how it is used and I'll try to do it.
I did do the "git pull" right before this run as you had suggested. Also, the the only difference between this and what was working before is the cell library used for synthesis and timing.
I am running Ubuntu 18.04.1 LTS.

Fails to build with clang-11: fatal error: 'bits/enable_special_members.h' file not found

Describe the bug

In file included from /disk-samsung/freebsd-ports/cad/opentimer/work/OpenTimer-18d28ff/ot/shell/shell.hpp:4:
In file included from /disk-samsung/freebsd-ports/cad/opentimer/work/OpenTimer-18d28ff/ot/timer/timer.hpp:4:
In file included from /disk-samsung/freebsd-ports/cad/opentimer/work/OpenTimer-18d28ff/ot/timer/gate.hpp:4:
In file included from /disk-samsung/freebsd-ports/cad/opentimer/work/OpenTimer-18d28ff/ot/liberty/celllib.hpp:4:
In file included from /disk-samsung/freebsd-ports/cad/opentimer/work/OpenTimer-18d28ff/ot/liberty/cell.hpp:4:
In file included from /disk-samsung/freebsd-ports/cad/opentimer/work/OpenTimer-18d28ff/ot/liberty/cellpin.hpp:4:
In file included from /disk-samsung/freebsd-ports/cad/opentimer/work/OpenTimer-18d28ff/ot/liberty/timing.hpp:4:
In file included from /disk-samsung/freebsd-ports/cad/opentimer/work/OpenTimer-18d28ff/ot/liberty/lut.hpp:4:
In file included from /disk-samsung/freebsd-ports/cad/opentimer/work/OpenTimer-18d28ff/ot/headerdef.hpp:52:
/disk-samsung/freebsd-ports/cad/opentimer/work/OpenTimer-18d28ff/ot/patch/clang_variant.hpp:38:10: fatal error: 'bits/enable_special_members.h' file not found
#include <bits/enable_special_members.h>
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.

clang-11
OS: FreeBSD 13

Macro Characterization?

Is there a way for OpenTimer to generate characterized .lib files based on the information it generates?

compilation error of latest version on Mac (using GCC-MP-8)

Describe the bug
I'm seeing the following error when compiling the latest git copy of OpenTimer:

[ 47%] Building CXX object CMakeFiles/OpenTimer.dir/ot/liberty/lut.cpp.o
/opt/local/bin/g++-mp-8 -I/Users/gjchen/projects/DARPA/src/OpenTimer/repo/OpenTimer-main -Wall -O2 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -std=c++17 -o CMakeFiles/OpenTimer.dir/ot/liberty/lut.cpp.o -c /Users/gjchen/projects/DARPA/src/OpenTimer/repo/OpenTimer-main/ot/liberty/lut.cpp
dyld: Library not loaded: /opt/local/lib/libintl.8.dylib
Referenced from: /opt/local/lib/libidn2.0.dylib
Reason: image not found
make[2]: *** [CMakeFiles/OpenTimer.dir/ot/liberty/timing.cpp.o] Abort trap: 6
make[1]: *** [CMakeFiles/OpenTimer.dir/all] Error 2
make: *** [all] Error 2

To Reproduce

setenv CC /opt/local/bin/gcc-mp-8
setenv CXX /opt/local/bin/g++-mp-8
git clone https://github.com/OpenTimer/OpenTimer.git OpenTimer-main
cd OpenTimer-main
mkdir build
cd build
cmake ../
make

Expected behavior
I expect the code to compile cleanly.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):
Mac OS X 10.14.3 with MacPorts

Additional context
Add any other context about the problem here.

[c++ API] set_load for net loading

I work on writing a layout aware synthesis tool and want to use OpenTimer to get some rough timing to drive my optimization efforts.

For a given net, I have a lumped capacitance estimate I want to annotate on the net to make timing more accurate. Basically what is done in the DNET section of a spef file, but I want to do this using the c++ API. Synopsys dc supports this using the set_load command if a net is supplied as object.

I tried to implement this myself using the parse_spef flow as guidance, but I lack experience in how to do this the proper way.

Kind regards
Christian

[API request] report path format enhancement

Requested format for OpenTimer path reporting:

Endpoint:        inst_71644/D  
Startpoint:      inst_74393/CK 
Required Time:    -27.20
Arrival Time:     218.70
Slack:           -245.90
----------------------------------------
Arrival      Delay   Dir  Node
----------------------------------------
    0.00               r  inst_74393/CK
  124.40   124.400     f  inst_74393/QN  
  124.40      0.00     f  inst_50794/A2  
  136.80     12.40     r  inst_50794/ZN
  136.80      0.00     r  inst_57327/A  
  143.40      6.60     f  inst_57327/ZN  
  143.40      0.00     f  inst_57311/A
  148.70      5.30     r  inst_57311/ZN  
  148.70      0.00     r  inst_87961/A2  
  187.00     38.30     r  inst_87961/ZN
  187.00      0.00     r  inst_57266/A  
  194.30      7.30     f  inst_57266/ZN  
  194.30      0.00     f  inst_8570/B1  
  218.70     24.40     r  inst_8570/ZN  
  218.70  12345.00     r  inst_71644/D

Features:

  • Header produces summary of endpoint, startpoint, and shows the
    basic computations to produce the slack.
  • Columns can be lined up cleanly because the variable length field
    (node name) is at the end.
  • All numeric values are hard-coded to 0.01ps resolution. Numeric
    field can support 5 digits before the decimal point (covering up to
    99ns).
  • Rising and falling are denoted by "r" and "f".
  • Note the extra space after the Delay column -- reserved for
    additional symbols indicating types of delay for that arc,
    e.g. annotated from SDF or computed. Leave blank for now.
  • It'd be good if OpenTimer can produce TWO such path reports per
    endpoint: first one is the data path delay. The second one would be
    the clock path delay.

Requested by George Chen at Intel.

[Verilog Issue] array subscript not handled correctly

Describe the bug
I get the error below when I use an input array in my Verilog file.
E 14080 18-08-02 13:23:10 timer.cpp:125] cell 0 not found in celllib

To Reproduce
Using the provided example simple.v for convenience.
Steps to reproduce the behavior:

  1. Modify simple.v to use an input or output array:
module simple (
inp1,
inp2,
tau2015_clk,
out
);

// Start PIs
input [1:0] inp1;
input inp2;
input tau2015_clk;

// Start POs
output out;

// Start wires
wire n1;
wire n2;
wire n3;
wire n4;
wire inp1;
wire inp2;
wire tau2015_clk;
wire out;

// Start cells
NAND2X1 u1 ( .A(inp1[0]), .B(inp2), .Y(n1) );
DFFNEGX1 f1 ( .D(n2), .CLK(tau2015_clk), .Q(n3) );
INVX1 u2 ( .A(n3), .Y(n4) );
INVX2 u3 ( .A(n4), .Y(out) );
NOR2X1 u4 ( .A(n1), .B(n3), .Y(n2) );

endmodule
  1. Run ot-shell
read_celllib osu018_stdcells.lib
read_verilog simple.v
report_timing
  1. See error
E 59136 18-08-02 13:34:58 timer.cpp:125] cell 0 not found in celllib
I 59136 18-08-02 13:34:58 verilog.cpp:21] added verilog module "simple" [inputs:1|outputs:0|gates:5]

Expected behavior
Expected OpenTimer to parse array correctly as synthesized Verilog is allowed to have 1D arrays I/Os.

Desktop:

  • OS: RedHat 7

Additional context
If you add the array to inp2 instead of inp1 in the simple.v file, you will see that you get inputs:2
I 59136 18-08-02 13:34:58 verilog.cpp:21] added Verilog module "simple" [inputs:2|outputs:0|gates:5]
And that is why I believe it is a parsing error.

Internal synchronous paths not reported

Internal synchronous (register to register) paths don't seem to get found or reported.

To reproduce, for example, I have a 1-bit scrambler based on linear feedback shift reg,

`module lfs (clk, rst, in1, out1) ;

input clk ;
input rst ;
input in1 ;
output out1 ;

reg out1 ;
reg [11:0] shift ;

always @(posedge clk or posedge rst) begin
if (rst) begin
shift <= 1 ;
out1 <= 0 ;
end else begin
shift <= { shift[10:0], (shift[11]^shift[10])} ;
out1 <= shift[5] ^ in1 ;
end
end

endmodule
`
I can synthesize it with the library from the "simple" example and constrain the timing in a similar fashion as that example, and I've inspected the synth output to verify there are many internal paths between bits in the "shift" vector as expected, but those paths don't get reported. I can report a good number of paths with a fully constrained SDC, but all reported paths involve I/O pins.

If I then strip out all non-clock constraints so that only the clock signal is constrained, the timing report simply says "no paths found" even though I think the internal register to register delays should be reported with only the clocks defined.

I am using a compile based on a git clone from about Aug. 30 if I recall correctly.

required libstdc++ files not found

Hello Tsung-Wei

I installed OpenTimer without any issues. But I do have a problem once I run it:

 $ ./ot-shell
./ot-shell: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by ./ot-shell)
./ot-shell: /lib64/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by ./ot-shell)
./ot-shell: /lib64/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by ./ot-shell)
./ot-shell: /lib64/libstdc++.so.6: version `CXXABI_1.3.11' not found (required by ./ot-shell)
./ot-shell: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by ./ot-shell)
./ot-shell: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.22' not found (required by ./ot-shell)

I also tried
make test
All test failed.

I'm not sure what could have gone wrong since OpenTimer installed without any error.

The system is: Linux - 3.10.0-693.11.6.el7.x86_64 - x86_64
Compiling the C compiler identification source file "CMakeCCompilerId.c" succeeded.
Compiler: /bin/cc 
Build flags: 
Id flags:  

The output was:
0


Compilation of the C compiler identification source "CMakeCCompilerId.c" produced "a.out"

The C compiler identification is GNU, found in "/home/tetrivis/Documents/Qflow/OpenTimer/OpenTimer/build/CMakeFiles/3.12.0/CompilerIdC/a.out"

Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" succeeded.
Compiler: /usr/local/gcc/7.3.0/bin/g++ 
Build flags: 
Id flags:  

The output was:
0

Even though the install had no errors I do not think it worked because the lib folder is empty. What should I do?

[Liberty parser] unexpected lut template variable

I got the warning message when I try to read the lib files
W 63232 18-11-30 13:16:12 celllib.cpp:224] unexpected lut template variable normalized_voltage

This variable is supported by Liberty format but may be unused in OpenTimer.
This warning is minor since OpenTimer can still run, but the word "unexpected" make it seem like there's something wrong with the lib file. Is it possible to have a list of all the variables supported in the wiki page?

[API request] report power capability

A new command report_aggregate_design_leakage_power to write total leakage power of a design. This feature can be implemented by reading leakage_power_unit attribute from liberty model of design and by adding value of cell_leakage_power attribute of each cell of a design.

A new command report_aggregate_design_area to write total area of a design.
This feature can be implemented by adding value of area attribute of each cell of a design.

Such enhancement will be very useful to other user community members of OpenTimer.

The API is requested by Jignesh Shah, from Intel.

[Compile Error] cmake issue with compiling OpenTimer 2.0

Hello Tsung-Wei

I tried to compile the 2.0 code but hitting the issues:
If you have a chance, please take a look. I am not an experienced C developer, just compile when I need to. So if it rings any bell, please let me know. I am trying to compile it for my PC using Cygwin environment.

Thanks in advance!

Igor

$ cmake ../
-- CMAKE_ROOT: /usr/share/cmake-3.6.2
-- The C compiler identification is GNU 7.3.0
-- The CXX compiler identification is GNU 7.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++.exe
-- Check for working CXX compiler: /usr/bin/c++.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Build type:
-- CMAKE_SYSTEM_NAME: CYGWIN
-- CMAKE_CXX_COMPILER: g++
-- CMAKE_CXX_FLAGS:  -Wall -O2
-- CMAKE_INSTALL_PREFIX: /usr/local
-- OT_VERSION: 2.0.0 (alpha)
-- OT_HOME: /cygdrive/c/Users/IGOR/Theseus/CAD/OpenTimer/OpenTimer-master
-- OT_BENCHMARK_DIR: /cygdrive/c/Users/IGOR/Theseus/CAD/OpenTimer/OpenTimer-master/benchmark
-- OT_UNITTEST_DIR: /cygdrive/c/Users/IGOR/Theseus/CAD/OpenTimer/OpenTimer-master/unittest
-- OT_LICENSE: /cygdrive/c/Users/IGOR/Theseus/CAD/OpenTimer/OpenTimer-master/LICENSE
-- CMAKE_ARCHIVE_OUTPUT_DIRECTORY: /cygdrive/c/Users/IGOR/Theseus/CAD/OpenTimer/OpenTimer-master/lib
-- OT_CPP: ot/unit/unit.cpp;ot/shell/misc.cpp;ot/shell/obselete.cpp;ot/shell/builder.cpp;ot/shell/action.cpp;ot/shell/shell.cpp;ot/shell/dump.cpp;ot/timer/arc.cpp;ot/timer/celllib.cpp;ot/timer/test.cpp;ot/timer/timer.cpp;ot/timer/clock.cpp;ot/timer/sdc.cpp;ot/timer/endpoint.cpp;ot/timer/net.cpp;ot/timer/sfxt.cpp;ot/timer/unit.cpp;ot/timer/path.cpp;ot/timer/spef.cpp;ot/timer/cppr.cpp;ot/timer/verilog.cpp;ot/timer/gate.cpp;ot/timer/dump.cpp;ot/timer/pin.cpp;ot/liberty/celllib.cpp;ot/liberty/cell.cpp;ot/liberty/cellpin.cpp;ot/liberty/lut.cpp;ot/liberty/timing.cpp;ot/verilog/verilog.cpp;ot/sdc/tokenize.cpp;ot/sdc/object.cpp;ot/sdc/sdc.cpp;ot/tau/tau15.cpp;ot/utility/os.cpp;ot/utility/tokenizer.cpp;ot/spef/spef.cpp
-- OT_HPP: ot/unit/unit.hpp;ot/policy.hpp;ot/shell/shell.hpp;ot/shell/prompt.hpp;ot/traits.hpp;ot/timer/cppr.hpp;ot/timer/gate.hpp;ot/timer/pin.hpp;ot/timer/sfxt.hpp;ot/timer/path.hpp;ot/timer/timer.hpp;ot/timer/test.hpp;ot/timer/clock.hpp;ot/timer/endpoint.hpp;ot/timer/net.hpp;ot/timer/arc.hpp;ot/config.hpp;ot/headerdef.hpp;ot/liberty/lut.hpp;ot/liberty/timing.hpp;ot/liberty/cellpin.hpp;ot/liberty/cell.hpp;ot/liberty/celllib.hpp;ot/verilog/verilog.hpp;ot/static/logger.hpp;ot/static/thread.hpp;ot/sdc/object.hpp;ot/sdc/sdc.hpp;ot/sdc/mask.hpp;ot/sdc/tokenize.hpp;ot/taskflow/taskflow.hpp;ot/tau/tau15.hpp;ot/exception.hpp;ot/utility/logger.hpp;ot/utility/scope_guard.hpp;ot/utility/utility.hpp;ot/utility/index.hpp;ot/utility/lambda.hpp;ot/utility/tokenizer.hpp;ot/utility/CLI11.hpp;ot/utility/singleton.hpp;ot/utility/os.hpp;ot/utility/iterator.hpp;ot/spef/spef.hpp
-- PYTHON_EXECUTABLE: /usr/bin/python
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - found
-- Found Threads: TRUE
-- Building executables ...
-- OT_EXE_LINKER_FLAGS: OpenTimer;Threads::Threads;stdc++fs
-- TAU15 executable: /cygdrive/c/Users/IGOR/Theseus/CAD/OpenTimer/OpenTimer-master/bin/ot-tau15
-- Utility executable: /cygdrive/c/Users/IGOR/Theseus/CAD/OpenTimer/OpenTimer-master/bin/ot-utility
-- OpenTimer shell: /cygdrive/c/Users/IGOR/Theseus/CAD/OpenTimer/OpenTimer-master/bin/ot-shell
-- Building unit tests ...
-- Building Shell integration tests ...
-- Building TAU15 integration tests ...
-- Configuring done
CMake Error in CMakeLists.txt:
  Target "sdc" requires the language dialect "CXX17" , but CMake does not
  know the compile flags to use to enable it.


CMake Error in CMakeLists.txt:
  Target "unit" requires the language dialect "CXX17" , but CMake does not
  know the compile flags to use to enable it.


CMake Error in CMakeLists.txt:
  Target "ot-tau15" requires the language dialect "CXX17" , but CMake does
  not know the compile flags to use to enable it.


CMake Error in CMakeLists.txt:
  Target "OpenTimer" requires the language dialect "CXX17" , but CMake does
  not know the compile flags to use to enable it.


CMake Error in CMakeLists.txt:
  Target "ot-utility" requires the language dialect "CXX17" , but CMake does
  not know the compile flags to use to enable it.


CMake Error in CMakeLists.txt:
  Target "ot-shell" requires the language dialect "CXX17" , but CMake does
  not know the compile flags to use to enable it.


CMake Error in CMakeLists.txt:
  Target "s27" requires the language dialect "CXX17" , but CMake does not
  know the compile flags to use to enable it.


CMake Error in CMakeLists.txt:
  Target "utility" requires the language dialect "CXX17" , but CMake does not
  know the compile flags to use to enable it.


-- Generating done
-- Build files have been written to: /cygdrive/c/Users/IGOR/Theseus/CAD/OpenTimer/OpenTimer-master/build

spef errors in Opentimer

i Tsung-Wei
I am seeing errors while reading SPEF file (generated from qflow) in opentimer. So wanted to check, is there any reference IEEE synthax that you are using for generating SPEF file ?

The way you can reproduce the error is below

  1. Download testcase.tar.gz
  2. Untar attached testcase in Opentimer directory
  3. Use the below command from Opentimer directory

report_slack returns "nan" on certain pins

I'd want to use OpenTimer to calculate slacks on certain pin(Ex: Flip Flop's D pin and Q pin), but some pins are returning "nan" values, which could also be reproduced in example testcases:

When running example "map9v3", after executing "report_timing", executing "report_slack -pin 334:D", "report_slack -pin 334:Q" and "report_slack -pin 341:D" returns "nan" while "report_slack -pin 304:A" and "report_slack -pin 341:Q" returns a floating point.

This issue is not represented in example "simple", which I'm guessing "report_slack" is only able to be executed after that netlist is traversed by OpenTimer using "report_timing".

How could I get the calculate the slack values on these "nan" pins? Thanks!!

lyeuiechang@ubuntu:~/OpenTimer$ ./bin/ot-shell
  ____              _______              
 / __ \___  ___ ___/_  __(_)_ _  ___ ____
/ /_/ / _ \/ -_) _ \/ / / /  ' \/ -_) __/
\____/ .__/\__/_//_/_/ /_/_/_/_/\__/_/       v2.0.0 (alpha)
    /_/                                     
MIT License: type "license" to see more details.
For help, type "help".
For bug reports, issues, and manual, please see:
<https://github.com/OpenTimer/OpenTimer>.
ot> cd example/simple/
ot> read_celllib osu018_stdcells.lib
ot> read_verilog simple.v
ot> read_sdc simple.sdc
ot> report_timing
I  1792 21-07-13 16:09:24 celllib.cpp:34] loading celllib "osu018_stdcells.lib"
I  5888 21-07-13 16:09:24 verilog.cpp:14] loading netlist "simple.v"
I  5888 21-07-13 16:09:24 sdc.cpp:35] loading sdc "simple.sdc" ...
I  1792 21-07-13 16:09:24 unit.cpp:244] use celllib time unit 1e-09 s
I  1792 21-07-13 16:09:24 unit.cpp:258] use celllib capacitance unit 1e-12 F
I  1792 21-07-13 16:09:24 unit.cpp:272] use celllib current unit 1e-06 A
I  1792 21-07-13 16:09:24 unit.cpp:286] use celllib voltage unit 1 V
I  1792 21-07-13 16:09:24 unit.cpp:300] use celllib resistance unit 1000 Ohm
I  1792 21-07-13 16:09:24 unit.cpp:314] use celllib power unit 1e-09 W
I  1792 21-07-13 16:09:24 celllib.cpp:66] added min celllib "osu018_stdcells" [cells:32]
I  1792 21-07-13 16:09:24 celllib.cpp:66] added max celllib "osu018_stdcells" [cells:32]
I  1792 21-07-13 16:09:24 verilog.cpp:21] added verilog module "simple" [gates:5]
I  5888 21-07-13 16:09:24 sdc.cpp:21] added 30 sdc commands
Startpoint    : inp1
Endpoint      : f1:D
Analysis type : min
------------------------------------------------------
       Type       Delay        Time   Dir  Description
------------------------------------------------------
       port       0.000       0.000  fall  inp1
        pin       0.000       0.000  fall  u1:A (NAND2X1)
        pin       2.786       2.786  rise  u1:Y (NAND2X1)
        pin       0.000       2.786  rise  u4:A (NOR2X1)
        pin       0.181       2.967  fall  u4:Y (NOR2X1)
        pin       0.000       2.967  fall  f1:D (DFFNEGX1)
    arrival                   2.967        data arrival time

related pin      25.000      25.000  fall  f1:CLK (DFFNEGX1)
 constraint       1.518      26.518        library hold_falling
   required                  26.518        data required time
------------------------------------------------------
      slack                 -23.551        VIOLATED
ot> report_slack -pin u1:A
-22.2
ot> report_slack -pin u1:B
-22.6
ot> report_slack -pin u1:Y
-23.6
ot> report_slack -pin f1:D
-22.6
ot> report_slack -pin f1:CLK
nan
ot> report_slack -pin f1:Q
0.00318
ot> report_slack -pin u2:A
20
ot> report_slack -pin u2:Y
20.7
ot> report_slack -pin u3:A
20.7
ot> report_slack -pin u3:Y
20
ot> report_slack -pin u4:A
-23.6
ot> report_slack -pin u4:B
0.00318
ot> report_slack -pin u4:Y
-22.6
ot> exit
lyeuiechang@ubuntu:~/OpenTimer$ ./bin/ot-shell
  ____              _______              
 / __ \___  ___ ___/_  __(_)_ _  ___ ____
/ /_/ / _ \/ -_) _ \/ / / /  ' \/ -_) __/
\____/ .__/\__/_//_/_/ /_/_/_/_/\__/_/       v2.0.0 (alpha)
    /_/                                     
MIT License: type "license" to see more details.
For help, type "help".
For bug reports, issues, and manual, please see:
<https://github.com/OpenTimer/OpenTimer>.
ot> cd example/map9v3
ot> read_celllib osu018_stdcells
ot> read_verilog map9v3.v
ot> read_sdc map9v3.sdc           
ot> report_timing
I 55040 21-07-13 16:13:49 celllib.cpp:34] loading celllib "osu018_stdcells"
I 50944 21-07-13 16:13:49 verilog.cpp:14] loading netlist "map9v3.v"
I 50944 21-07-13 16:13:49 sdc.cpp:35] loading sdc "map9v3.sdc" ...
I 55040 21-07-13 16:13:49 unit.cpp:244] use celllib time unit 1e-09 s
I 55040 21-07-13 16:13:49 unit.cpp:258] use celllib capacitance unit 1e-12 F
I 55040 21-07-13 16:13:49 unit.cpp:272] use celllib current unit 1e-06 A
I 55040 21-07-13 16:13:49 unit.cpp:286] use celllib voltage unit 1 V
I 55040 21-07-13 16:13:49 unit.cpp:300] use celllib resistance unit 1000 Ohm
I 55040 21-07-13 16:13:49 unit.cpp:314] use celllib power unit 1e-09 W
I 55040 21-07-13 16:13:49 celllib.cpp:66] added min celllib "osu018_stdcells" [cells:32]
I 55040 21-07-13 16:13:49 celllib.cpp:66] added max celllib "osu018_stdcells" [cells:32]
I 55040 21-07-13 16:13:49 verilog.cpp:21] added verilog module "map9v3" [gates:199]
I 50944 21-07-13 16:13:49 sdc.cpp:21] added 223 sdc commands
Startpoint    : reset
Endpoint      : sr_4_
Analysis type : max
------------------------------------------------------
       Type       Delay        Time   Dir  Description
------------------------------------------------------
       port    1000.000    1000.000  fall  reset
        pin       0.000    1000.000  fall  _304_:A (INVX1)
        pin      13.619    1013.619  rise  _304_:Y (INVX1)
        pin       0.000    1013.619  rise  _361_:R (DFFSR)
        pin      -0.130    1013.489  rise  _361_:Q (DFFSR)
        pin       0.000    1013.489  rise  _330_:A (BUFX2)
        pin       8.751    1022.239  rise  _330_:Y (BUFX2)
       port       0.000    1022.239  rise  sr_4_
    arrival                1022.239        data arrival time

       port    1000.000    1000.000        output port delay
   required                1000.000        data required time
------------------------------------------------------
      slack                 -22.239        VIOLATED
ot> report_slack -pin _334_:D
nan
ot> report_slack -pin _334_:Q
nan
ot> report_slack -pin _026_
nan
ot> report_slack -pin _304_:A
12.9
ot> report_slack -pin _341_:D
nan
ot> report_slack -pin _341_:Q
22.1
ot> 

clock constraints

Hi Tsung-Wei
As per standard SDC constraints, for clock, below are the right constraints that should be supported
set_clock_transition -rise -min 154 [get_clocks clk]
set_clock_transition -fall -min 155 [get_clocks clk]
set_clock_transition -rise -max 156 [get_clocks clk]
set_clock_transition -fall -max 157 [get_clocks clk]
set_clock_latency -min -rise 150 [get_clocks clk]
set_clock_latency -min -fall 151 [get_clocks clk]
set_clock_latency -max -rise 152 [get_clocks clk]
set_clock_latency -max -fall 153 [get_clocks clk]

But instead, opentimer supports below :
set_input_transition -rise -min 154 -clock clk [get_ports clk]
set_input_transition -fall -min 155 -clock clk [get_ports clk]
set_input_transition -rise -max 156 -clock clk [get_ports clk]
set_input_transition -fall -max 157 -clock clk [get_ports clk]
set_input_delay -min -rise 150 -clock clk [get_ports clk]
set_input_delay -min -fall 151 -clock clk [get_ports clk]
set_input_delay -max -rise 152 -clock clk [get_ports clk]
set_input_delay -max -fall 153 -clock clk [get_ports clk]

Is it possible to have consistent standard sdc support? This will make it easy to switch between different STA tools for evaluation and bench-marking

Compilation failed with higher version of g++

With g++10.2 the compilation will fail due to the following lines. These lines appear in multiple files and induce duplicate declaration.

namespace std {
  namespace filesystem = experimental::filesystem;
};

I believe with higher version of g++ the namespace std::filesystem has ready been declared in the standard header <filesystem>. Replace all std::experimental::filesystem with std::filesystem and <experimental/filesystem> with <filesystem> the problem can be resolved (but this workaround does not consider compatibility).

C++ API interface example

C++ API interface example

There is no clear place showing how to use a more "pure" C++ interface. It would be great if there is
something similar like a RCA in C++ were the "create node", "create edge", "compute time", "set input delay", "read_liberty" (NOT read_verilog in this example).

Compute the time delay between two paths, or find the worst path (not printed, but the C++ interface so that users can build their own tools).

(add/remove edges/nodes and then recompute/incremental the time after the change).

THis simple example should show the main C++ API if someone wants to link against OpenTimer and have avoids the verilog read path.

(This is the thing that we need to interface in something like lgraph)

Cmake -- configuring incomplete, errors occurred!

"cmake ../" gave me the following result

cmake ../
-- CMAKE_ROOT: /Applications/CMake.app/Contents/share/cmake-3.18
-- The C compiler identification is AppleClang 8.0.0.8000038
-- The CXX compiler identification is AppleClang 8.0.0.8000038
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at CMakeLists.txt:23 (message):

OpenTimer currently supports the following compilers:

  • g++ v7.3 or above

  • clang++ v6.0 or above

-- Configuring incomplete, errors occurred!
See also "/Users/divyagupta/OpenTimer/build/CMakeFiles/CMakeOutput.log".

I'm running on MacOS 10.11, I am not able to understand why the C & C++ compiler checks have been skipped.
XCode comes with gcc. I checked gcc version, Clang 8.0.0 :

gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/c++/4.2.1
Apple LLVM version 8.0.0 (clang-800.0.38)
Target: x86_64-apple-darwin15.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin


CMake error at CMakeLists.txt:23 is just what is shown in output, as below:

CMake Error at CMakeLists.txt:23 (message):

OpenTimer currently supports the following compilers:

  • g++ v7.3 or above

  • clang++ v6.0 or above


How can I make the cmake run successfully?

Thank you for your time!

opentimer aborts with cppr -enable

Hi
I added cppr -enable command in map9v3 testcase, which comes from opentimer installation (along with full fledged map9v3 sdc constraints), it aborts giving the below message:

OpenTimer: /home/kunalg/Desktop/work/tools/opentimer/OpenTimer/ot/timer/path.cpp:192: ot::Path::dump(std::ostream&) const::<lambda(ot::Test*)>: Assertion `std::fabs(sum - rat) < 1e-2f' failed.
Aborted

I have attached the testcase.tar.gz. To reproduce, use the below steps

  1. tar -xvzf map9v3.tar.gz
  2. cd map9v3
  3. ot-shell -i map9v3.conf

[Compile Error] make error during build

While building OpenTimer on OS X Yosemite, cmake runs fine, but make cannont find header files string_view, variant, experimental/filesystem, optional:

$ cmake ../
-- CMAKE_ROOT: /Applications/CMake.app/Contents/share/cmake-3.12
-- The C compiler identification is AppleClang 7.0.2.7000181
-- The CXX compiler identification is AppleClang 7.0.2.7000181
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- CMAKE_CXX_COMPILER_VERSION: 7.0.2.7000181
-- CMAKE_BUILD_TYPE: 
-- CMAKE_SYSTEM_NAME: Darwin
-- CMAKE_CXX_COMPILER: g++
-- CMAKE_CXX_FLAGS:  -Wall -O2
-- CMAKE_INSTALL_PREFIX: /usr/local
-- CMAKE_MODULE_PATH: 
-- OT_VERSION: 2.0.0 (alpha)
-- OT_HOME: /Users/blah/vlsi/OpenTimer
-- OT_BENCHMARK_DIR: /Users/blah/vlsi/OpenTimer/benchmark
-- OT_UNITTEST_DIR: /Users/blah/vlsi/OpenTimer/unittest
-- OT_LICENSE: /Users/blah/vlsi/OpenTimer/LICENSE
-- CMAKE_ARCHIVE_OUTPUT_DIRECTORY: /Users/blah/vlsi/OpenTimer/lib
-- PYTHON_EXECUTABLE: /Users/blah/anaconda2/bin/python
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - found
-- Found Threads: TRUE  
-- Found Tclsh: /usr/bin/tclsh (found version "8.5") 
-- Building executables ...
-- OT_EXE_LINKER_FLAGS: OpenTimer;Threads::Threads;stdc++fs
-- TAU15 executable: /Users/blah/vlsi/OpenTimer/bin/ot-tau15
-- Utility executable: /Users/blah/vlsi/OpenTimer/bin/ot-utility
-- OpenTimer shell: /Users/blah/vlsi/OpenTimer/bin/ot-shell
-- Building unit tests ...
-- Building Shell integration tests ...
-- Building TAU15 integration tests ...
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/blah/vlsi/OpenTimer/build

$ make
/Applications/CMake.app/Contents/bin/cmake -H/Users/blah/vlsi/OpenTimer -B/Users/blah/vlsi/OpenTimer/build --check-build-system CMakeFiles/Makefile.cmake 0
/Applications/CMake.app/Contents/bin/cmake -E cmake_progress_start /Users/blah/vlsi/OpenTimer/build/CMakeFiles /Users/blah/vlsi/OpenTimer/build/CMakeFiles/progress.marks
/Library/Developer/CommandLineTools/usr/bin/make -f CMakeFiles/Makefile2 all
/Library/Developer/CommandLineTools/usr/bin/make -f CMakeFiles/OpenTimer.dir/build.make CMakeFiles/OpenTimer.dir/depend
cd /Users/blah/vlsi/OpenTimer/build && /Applications/CMake.app/Contents/bin/cmake -E cmake_depends "Unix Makefiles" /Users/blah/vlsi/OpenTimer /Users/blah/vlsi/OpenTimer /Users/blah/vlsi/OpenTimer/build /Users/blah/vlsi/OpenTimer/build /Users/blah/vlsi/OpenTimer/build/CMakeFiles/OpenTimer.dir/DependInfo.cmake --color=
Scanning dependencies of target OpenTimer
/Library/Developer/CommandLineTools/usr/bin/make -f CMakeFiles/OpenTimer.dir/build.make CMakeFiles/OpenTimer.dir/build
[  2%] Building CXX object CMakeFiles/OpenTimer.dir/ot/unit/unit.cpp.o
g++   -I/Users/blah/vlsi/OpenTimer  -Wall -O2   -std=c++1z -o CMakeFiles/OpenTimer.dir/ot/unit/unit.cpp.o -c /Users/blah/vlsi/OpenTimer/ot/unit/unit.cpp
In file included from /Users/blah/vlsi/OpenTimer/ot/unit/unit.cpp:1:
In file included from /Users/blah/vlsi/OpenTimer/ot/unit/unit.hpp:4:
/Users/blah/vlsi/OpenTimer/ot/headerdef.hpp:18:10: fatal error: 'string_view' file not found
#include <string_view>
         ^
1 error generated.
make[2]: *** [CMakeFiles/OpenTimer.dir/ot/unit/unit.cpp.o] Error 1
make[1]: *** [CMakeFiles/OpenTimer.dir/all] Error 2
make: *** [all] Error 2

[Compilation Issue] Problem with Installing OpenTimer

Hello Tsung-Wei,
I am currently trying to install OpenTimer on ubuntu 64-bit. I did install GNU C++ compiler (gobjc++ -7 version : 7.3.0 16ubunt3) using Synaptic package manager and i also installed clang 5.0,. i could get to the cmake ../ command, but it is giving me a error after that. I have also included a snippet of that error in this message. I googled about it and tried using export to sent the path of GNU C++ compiler. Was unsuccessful doing that as well. Please help me out. Thank you

capture

[Liberty parser] can be confused by the contents of define()

The contents of a define( .. ) can contain keywords that will confuse the read function. For example :

define (cell_description, cell, string);
at a certain point will falsely trigger a cell extraction due to the "cell" token.
I think it can be fixed by adding something like this to the Celllib::read function right before the cell token is being checked for :

else if(*itr == "define") { std::string junk; if(itr = on_next_parentheses( itr, end, [&] (auto& str2) mutable {junk = str2; }); itr == end) { OT_LOGF("Define extraction failed."); } }

[Verilog Issue] declare multiple nets in a single statement

Describe the bug
I get the error when I declare more than one variables in a single statement in my Verilog file
E 59136 18-12-03 15:43:27 timer.cpp:160] cell n2 not found in celllib

To Reproduce
Using the provided example simple.v for convenience.

Steps to reproduce the behavior:

  1. Modify simple.v to declare two wires in a single statement:
module simple (
inp1,
inp2,
tau2015_clk,
out
);

// Start PIs
input inp1;
input inp2;
input tau2015_clk;

// Start POs
output out;

// Start wires
wire n1, n2;
wire n3;
wire n4;
wire inp1;
wire inp2;
wire tau2015_clk;
wire out;

// Start cells
NAND2X1 u1 ( .A(inp1), .B(inp2), .Y(n1) );
DFFNEGX1 f1 ( .D(n2), .CLK(tau2015_clk), .Q(n3) );
INVX1 u2 ( .A(n3), .Y(n4) );
INVX2 u3 ( .A(n4), .Y(out) );
NOR2X1 u4 ( .A(n1), .B(n3), .Y(n2) );

endmodule
  1. Run ot-shell with provided simple.conf

  2. See error

E 26368 18-12-03 15:48:17 timer.cpp:160] cell n2 not found in celllib
I 26368 18-12-03 15:48:17 verilog.cpp:24] added verilog module "simple" [gates:5]

Expected behavior
Expected OpenTimer to parse net/variable declarations correctly

Desktop (please complete the following information):

  • OS: Springdale Linux release 6.10

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.