diff --git a/.gitignore b/.gitignore index 8730b7a1..92e4f53c 100644 --- a/.gitignore +++ b/.gitignore @@ -13,31 +13,13 @@ TAGS .~lock.*# .DS_Store Makefile -Makefile.in - -.libs -.deps /build -/configure -/m4 -/compile -/config.h -/config.guess -/config.h.in -/config.log -/config.sub -/config.status -/libtool -/ltmain.sh -/install-sh -/missing -/depcomp -/ylwrap -/aclocal.m4 -/autom4te.cache -/stamp-h1 -/ylwrap +/debug +/rel + +# /util/ +/util/StaConfig.hh # /app/ /app/StaApp_wrap.cc @@ -45,7 +27,6 @@ Makefile.in /app/sta /app/sta.exe /app/sta.dSYM -/app/.dirstamp # /doc/ /doc/._Sta.docx diff --git a/AUTHORS b/AUTHORS deleted file mode 100644 index 7883123c..00000000 --- a/AUTHORS +++ /dev/null @@ -1 +0,0 @@ -James Cherry, Parallax Software, Inc. diff --git a/CMakeLists.txt b/CMakeLists.txt index eb0a520d..45ca9a5f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,7 +16,7 @@ cmake_minimum_required (VERSION 3.9) -project(STA VERSION 2.0.6) +project(STA VERSION 2.0.7) set(CMAKE_VERBOSE_MAKEFILE ON) set(CMAKE_CXX_STANDARD 11) @@ -436,13 +436,19 @@ set(STA_SWIG_FILES set(CMAKE_THREAD_PREFER_PTHREAD TRUE) set(THREADS_PREFER_PTHREAD_FLAG TRUE) find_package(Threads) -set(HAVE_PTHREADS ${CMAKE_USE_PTHREADS_INIT}) -if (HAVE_PTHREADS) +set(PTHREADS ${CMAKE_USE_PTHREADS_INIT}) +if (PTHREADS) message(STATUS "Found pthreads") endif() # Zlib include(FindZLIB) +# translate cmake bool to ifdef bool +if (ZLIB_FOUND) + set(ZLIB 1) +else() + set(ZLIB 0) +endif() ################################################################ # @@ -457,12 +463,13 @@ if("${CUDD}" STREQUAL "") set(CUDD_INCLUDE "") set(CUDD_LIB "") set(CUDD_FOUND FALSE) + set(CUDD 0) else() set(CUDD_INCLUDE ${CUDD}/include) find_library(CUDD_LIB NAMES cudd PATHS ${CUDD}/lib) if (CUDD_LIB) - # CUDD_FOUND referenced by config.h.cmake - set(CUDD_FOUND TRUE) + # CUDD referenced by StaConfig.hh.cmake + set(CUDD 1) message(STATUS "CUDD library: ${CUDD_LIB}") endif() endif() @@ -473,8 +480,8 @@ endif() message(STATUS "Enable SSTA: ${SSTA}") # configure a header file to pass some of the CMake settins -configure_file(${STA_HOME}/config.h.cmake - ${STA_HOME}/config.h +configure_file(${STA_HOME}/util/StaConfig.hh.cmake + ${STA_HOME}/util/StaConfig.hh ) @@ -651,7 +658,6 @@ set(STA_INCLUDE_DIRS search util verilog - . # config.h ${TCL_HEADER_DIR} ${CUDD_INCLUDE} ) diff --git a/COPYING b/COPYING deleted file mode 100644 index fc58352f..00000000 --- a/COPYING +++ /dev/null @@ -1,16 +0,0 @@ -# OpenSTA, Static Timing Analyzer -# Copyright (c) 2019, Parallax Software, Inc. -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - diff --git a/ChangeLog b/ChangeLog deleted file mode 100644 index debea987..00000000 --- a/ChangeLog +++ /dev/null @@ -1,11 +0,0 @@ -OpenSTA Static Timing Analyzer Release Notes --------------------------------------------- - -This file summarizes user visible changes for each release. - -Release 2.0 2018/06/27 ----------------------- - -# Local Variables: -# mode:text -# End: diff --git a/INSTALL b/INSTALL deleted file mode 100644 index 5c286ced..00000000 --- a/INSTALL +++ /dev/null @@ -1 +0,0 @@ -See README.MD for installation instructions. diff --git a/Makefile.am b/Makefile.am deleted file mode 100644 index 684eca51..00000000 --- a/Makefile.am +++ /dev/null @@ -1,35 +0,0 @@ -# OpenSTA, Static Timing Analyzer -# Copyright (c) 2019, Parallax Software, Inc. -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -ACLOCAL_AMFLAGS = -I m4 - -# app has to follow all library subdirs -SUBDIRS = $(STA_SUBDIRS) - -libs: - for subdir in $(SUBDIRS); do \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) libs); \ - done - -include_HEADERS = config.h - -# The automake target uses include directives, which don't work in xemacs. -xtags: - rm -rf TAGS; \ - for subdir in $(SUBDIRS); do \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) xtags); \ - done - diff --git a/NEWS b/NEWS deleted file mode 100644 index 700d2045..00000000 --- a/NEWS +++ /dev/null @@ -1 +0,0 @@ -See doc/BugLog for bug fixes in this release. diff --git a/README b/README deleted file mode 100644 index 9b7ba4c2..00000000 --- a/README +++ /dev/null @@ -1 +0,0 @@ -See README.MD diff --git a/README.md b/README.md index ff10b618..4b2f33ea 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,7 @@ See doc/OpenSTA.pdf for complete documentiaton. ## Getting Started OpenSTA can be run as a [Docker](https://www.docker.com/) container -or built as local executable with CMake or Autotools. +or built as local executable with CMake. ### Run using Docker * Install Docker on [Windows](https://docs.docker.com/docker-for-windows/), [Mac](https://docs.docker.com/docker-for-mac/) or [Linux](https://docs.docker.com/install/). @@ -96,8 +96,7 @@ cudd 2.4.1 3.0.0 CUDD is a binary decision diageram (BDD) package that is used to improve conditional timing arc handling. It is available [here](https://www.davidkebo.com/source/cudd_versions/cudd-3.0.0.tar.gz) or [here](https://sourceforge.net/projects/cudd-mirror/). Note that the file hierarchy of the CUDD installation changed with version 3.0. -Some changes to the CMake or configure scripts are required to support older -versions. +Some changes to the CMake are required to support older versions. You may use the `--prefix ` option to `configure` to install in a location other than the default (`/usr/local/lib`). @@ -162,72 +161,12 @@ If you make changes to `CMakeLists.txt` you may need to clean out existing CMake cached variable values by deleting all of the files in the build directory. -### Installing from a tarfile - -Installing from a tarfile has the advantage that Autotools, bison, -flex and swig do not need to be installed. - -Use the following commands to unpack the dist file and compile it. -``` -tar zvfz opensta-.tgz -cd opensta- -./configure [options...] -make -``` -With no options, configure builds an optimized executable. -The resulting executable is app/sta. -``` -configure options: - -h, --help display configure help and exit - --enable-debug enable debug - --enable-asan enable AddressSanitizer - --enable-gprof enable gprof profiling - --enable-gcov enable gcov profiling - --enable-32bit force 32 bit compile - --with-include=dirs directories to search for include files - --with-lib=dirs directories to search for libraries - --with-tcl=dirs directories to search for Tcl init files - --with-cudd=path use Cudd BDD package, defaults to $CUDD - --with-visualstudio use Microcruft Visual Studio C++ compiler -``` -If the configure script fails to find any of the `TCL`, `Zlib` or `CUDD` -files, use the `--with-include`, `--with-lib`, `--with-tcl`, `--with-cudd` -options to add directories to search for the files. - -The configure `--help` option lists the generic configure options that -are not described above. The default arguments to configure disable -shared libraries. To build with shared libraries use the -`--enable-shared` option. - -### Installing with Autotools - -Building with GNU Autotools the additional build dependencies shown -below. -``` - from Ubuntu Xcode - 18.04.1 10.1 -autoconf 2.53 2.69 2.69 -automake 1.6.3 1.15.1 1.16.1 -libtool 1.4.2 2.4.6 2.4.6 -``` -Use the following commands to checkout the git repository and compile -it. -``` -git clone https://xp-dev.com/git/opensta -git checkout master|branch -./bootstrap -./configure [options...] -make -``` -Configure options are show above in the "Installing from tarkit" section. - ### Installing on Windoz The Win32 API does not natively support the pthreads API. The pthreads-win32 package is one way to get support for pthreads for 32 bit builds. It is available from [pthreads](www.sourceware.org/pthreads-win32). -If the configure script does not find `pthreads.h` the build proceeds -without thread support. +If Cmake does not find `pthreads.h` the build proceeds without thread support. Use a .bat file to start a cygwin shell that has its path set to support the Microcruft cl compiler by calling the vsvars32.bat script @@ -242,13 +181,15 @@ tcsh-startup.bat CMake is supposedly more compatible with the windoz environment so you may have better luck wih it. -Configure and build from the shell. Note that tcl and zlib must be +Cmake and build from the shell. Note that tcl and zlib must be built with the Visual C++ compiler to link to the sta libraries. + + mkdir build + cd build + cmakd .. + make ... -./bootstrap -./configure --with-visualstudio -make maintainer-clean -... + Good luck and don't bother me with windoz specific issues. I am happy to say I haven't owned a windoz machine in 20 years. diff --git a/app/Main.cc b/app/Main.cc index 22272af6..fe3a8685 100644 --- a/app/Main.cc +++ b/app/Main.cc @@ -16,7 +16,7 @@ #include #include "Machine.hh" -#include "config.h" // VERSION +#include "StaConfig.hh" // STA_VERSION #include "StringUtil.hh" #include "Sta.hh" #include "StaMain.hh" @@ -39,7 +39,7 @@ main(int argc, char **argv) return 0; } else if (argc == 2 && stringEq(argv[1], "-version")) { - printf("%s\n", VERSION); + printf("%s\n", STA_VERSION); return 0; } else { diff --git a/bootstrap b/bootstrap deleted file mode 100755 index c5a7472d..00000000 --- a/bootstrap +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -autoreconf --install diff --git a/config.h.cmake b/config.h.cmake deleted file mode 100644 index 082defe3..00000000 --- a/config.h.cmake +++ /dev/null @@ -1,15 +0,0 @@ -// Compatible with autoheader/configure generated config.h - -#define VERSION "${STA_VERSION}" - -#define HAVE_PTHREAD_H ${HAVE_PTHREADS} - -#if ${ZLIB_FOUND}==TRUE - #define ZLIB -#endif - -#if ${CUDD_FOUND}==TRUE - #define CUDD -#endif - -#define SSTA ${SSTA} diff --git a/configure.ac b/configure.ac deleted file mode 100644 index c6eafc85..00000000 --- a/configure.ac +++ /dev/null @@ -1,560 +0,0 @@ -# OpenSTA, Static Timing Analyzer -# Copyright (c) 2019, Parallax Software, Inc. -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -# Process this file with autoconf to produce a configure script. - -AC_INIT(sta, 2.0.6) -AM_INIT_AUTOMAKE -AC_CONFIG_MACRO_DIR([m4]) -AC_CONFIG_HEADERS(config.h) - -#-------------------------------------------------------------------- -# Set default paths. -#-------------------------------------------------------------------- - -AC_ARG_ENABLE(32bit, - [AS_HELP_STRING([--enable-32bit],[force 32 bit compile])], - [case "${enableval}" in - yes) force32bit=true ;; - no) force32bit=false ;; - *) AC_MSG_ERROR(bad value ${enableval} for --enable-32bit) ;; - esac], - [force32bit=false]) - -HOST_ARCH=`uname -m` -HOST_OS=`uname -s` - -if test x$force32bit = xtrue; then - HOST_ARCH=i686 -fi - -echo -n "checking host... " -case "${HOST_OS}" in - *Linux*) - case "${HOST_ARCH}" in - i?86) - echo "Linux 32bit" - INCLUDE_DIRS="/usr/include" - LIB_DIRS="/usr/lib /usr/local/lib /usr/lib/i386-linux-gnu" - LIB_EXTS="a so .so.1" - ;; - - x86_64) - echo "Linux 64bit" - INCLUDE_DIRS="/usr/include" - LIB_DIRS="/usr/lib64 /usr/lib /usr/lib/x86_64-linux-gnu" - LIB_EXTS="a so" - ;; - - *) - echo "Linux unknown" - INCLUDE_DIRS="/usr/include" - LIB_DIRS="/usr/lib" - LIB_EXTS="a so" - ;; - esac - ;; - - CYGWIN*) - echo "Cygwin" - INCLUDE_DIRS="/usr/include" - LIB_DIRS="/usr/lib" - LIB_EXTS="a so" - ;; - - Darwin) - echo "Darwin" - use_clang=true - if test x$use_clang = xtrue; then - # clang/gcc-apple llvm - CXX=clang++ - CC=clang++ - INCLUDE_DIRS="/usr/local/include /usr/include" - LIB_DIRS="/usr/local/lib /usr/lib" - else - # gcc - CXX=g++ - CC=g++ - INCLUDE_DIRS="/usr/local/opt/tcl-tk/include /usr/local/opt/zlib/include /usr/include" - LIB_DIRS="/usr/local/opt/tcl-tk/lib /usr/local/opt/zlib/lib /usr/local/lib" - fi - LIB_EXTS="dylib" - ;; - - *) - echo "Unknown" - INCLUDE_DIRS="/usr/include /usr/local/include" - LIB_DIRS="/usr/lib /usr/local/lib" - LIB_EXTS="a so" - ;; - -esac - -#-------------------------------------------------------------------- - -AC_ARG_ENABLE(debug, - [AS_HELP_STRING([--enable-debug],[enable debug])], - [case "${enableval}" in - yes) debug=true ;; - no) debug=false ;; - *) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;; - esac], - [debug=false]) - -AC_ARG_ENABLE(gprof, - [AS_HELP_STRING([--enable-gprof],[enable gprof profiling])], - [case "${enableval}" in - yes) gprof=true ;; - no) gprof=false ;; - *) AC_MSG_ERROR(bad value ${enableval} for --enable-gprof) ;; - esac], - [gprof=false]) - -AC_ARG_ENABLE(gcov, - [AS_HELP_STRING([--enable-gcov],[enable gcov profiling])], - [case "${enableval}" in - yes) gcov=true ;; - no) gcov=false ;; - *) AC_MSG_ERROR(bad value ${enableval} for --with-gcov) ;; - esac], - [gcov=false]) - -AC_ARG_ENABLE(asan, - [AS_HELP_STRING([--enable-asan],[enable AddressSanitizer])], - [case "${enableval}" in - yes) asan=true ;; - no) asan=false ;; - *) AC_MSG_ERROR(bad value ${enableval} for --enable-asan) ;; - esac], - [asan=false]) - -AC_ARG_ENABLE(ssta, - [AS_HELP_STRING([--enable-ssta],[enable ssta])], - [case "${enableval}" in - yes) ssta=true ;; - no) ssta=false ;; - *) AC_MSG_ERROR(bad value ${enableval} for --enable-ssta) ;; - esac], - [ssta=false]) - -AC_ARG_WITH(include, - [AS_HELP_STRING([--with-include=dirs],[directories to search for include files])], - [INCLUDE_DIRS="${withval}"], - []) - -AC_ARG_WITH(lib, - [AS_HELP_STRING([--with-lib=dirs],[directories to search for libraries])], - [LIB_DIRS="${withval}"], - []) - -AC_ARG_WITH(cudd, - [AS_HELP_STRING([--with-cudd=path],[use CUDD BDD package, defaults to $CUDD])], - [CUDD_ARG="${withval}"], - [CUDD_ARG=$CUDD]) - -AC_ARG_WITH(visualstudio, - [AS_HELP_STRING([--with-visualstudio],[use Microcruft Visual Studio C++ compiler])], - [case "${withval}" in - yes) visualstudio=true ;; - no) visualstudio=false ;; - *) AC_MSG_ERROR(bad value ${withval} for --with-visualstudio) ;; - esac], - [visualstudio=false]) - -if test x$visualstudio = xtrue; then - CXX=cl - CC=cl - LIB_EXTS="lib" -fi - -AC_ARG_WITH(optimize, - [AS_HELP_STRING([--with-optimize],[obsolete; optimization is on by default])], - [], - []) - -#-------------------------------------------------------------------- - -if test x$ssta = xtrue; then - AC_DEFINE(SSTA, 1, "SSTA support") -else - AC_DEFINE(SSTA, 0, "SSTA support") -fi - -#-------------------------------------------------------------------- -# Locate the Tcl package -#-------------------------------------------------------------------- - -TCL_INCLUDE="" -tcl_major="8" -tcl_minors="6 5 4 3 2" -for tcl_minor in $tcl_minors; do - AC_MSG_CHECKING(for Tcl $tcl_major.$tcl_minor header file) - found_tcl_header=false - for dir in $INCLUDE_DIRS ; do - tcl_header=$dir/tcl.h - if test -r $tcl_header; then - AC_MSG_RESULT($tcl_header) - TCL_INCLUDE=$dir - found_tcl_header=true - break - fi - - dir2=$dir/tcl$tcl_major.$tcl_minor - tcl_header=$dir2/tcl.h - if test -r $tcl_header; then - AC_MSG_RESULT($tcl_header) - TCL_INCLUDE=$dir2 - found_tcl_header=true - break - fi - done - if test -z "$TCL_INCLUDE"; then - AC_MSG_RESULT(not found) - fi - - AC_MSG_CHECKING(for Tcl $tcl_major.$tcl_minor library) - TCL_LIB="" - for dir in $LIB_DIRS ; do - for ext in $LIB_EXTS; do - # With period between tcl_major/tcl_minor. - lib=tcl$tcl_major.$tcl_minor - lib_path="$dir/lib$lib.$ext" - if test -r $lib_path; then - AC_MSG_RESULT($lib_path) - TCL_LIB_DIR=$dir - TCL_LIB=$lib - break 2 - fi - # Without period between major/minor. - lib=tcl$tcl_major$tcl_minor - lib_path="$dir/lib$lib.$ext" - if test -r $lib_path; then - AC_MSG_RESULT($lib_path) - TCL_LIB_DIR=$dir - TCL_LIB=$lib - break 2 - fi - # Without leading lib or period between major/minor (windoz). - lib=tcl$tcl_major$tcl_minor - lib_path="$dir/$lib.$ext" - if test -r $lib_path; then - AC_MSG_RESULT($lib_path) - TCL_LIB_DIR=$dir - TCL_LIB=$lib - break 2 - fi - done - done - if test -z "$TCL_LIB"; then - AC_MSG_RESULT(not found) - fi - - if test $found_tcl_header = true && - test -n "$TCL_LIB"; then - break - fi - -done - -#-------------------------------------------------------------------- -# Locate the Zlib package -#-------------------------------------------------------------------- - -AC_MSG_CHECKING(for Zlib header file) -ZLIB_INCLUDE="" -for dir in $INCLUDE_DIRS ; do - if test -r $dir/zlib.h; then - AC_MSG_RESULT($dir) - ZLIB_INCLUDE=$dir - AC_DEFINE(ZLIB, 1, "Zlib compressed file reader") - break - fi -done -if test -z "$ZLIB_INCLUDE"; then - AC_MSG_RESULT(not found) -fi - -AC_MSG_CHECKING(for Zlib library) -ZLIB_LIB="" -for dir in $LIB_DIRS ; do - for ext in $LIB_EXTS; do - lib_path="$dir/libz.$ext" - if test -r $lib_path; then - AC_MSG_RESULT($lib_path) - ZLIB_DIR=$dir - ZLIB_LIB="z" - break 2 - fi - done -done -if test -z "$ZLIB_LIB"; then - AC_MSG_RESULT(not found) -fi - -AC_SUBST(ZLIB_INCLUDE) -AC_SUBST(ZLIB_LIB) - -#-------------------------------------------------------------------- -# Locate the Cudd package -#-------------------------------------------------------------------- - -CUDD_INCLUDE="" -CUDD_LIBS="" -if test "$CUDD_ARG"; then - AC_MSG_RESULT($CUDD_ARG) - AC_MSG_CHECKING(for CUDD header file) - CUDD_INCLUDE_DIR="$CUDD_ARG/include" - CUDD_HEADER="$CUDD_INCLUDE_DIR/cudd.h" - if test -r "$CUDD_HEADER"; then - AC_MSG_RESULT($CUDD_HEADER) - CUDD_INCLUDE=$CUDD_INCLUDE_DIR - AC_DEFINE(CUDD, 1, "CUDD bdd package") - else - AC_MSG_RESULT(not found) - fi - - AC_MSG_CHECKING(for CUDD library) - CUDD_LIB_EXT="a" - CUDD_LIB="$CUDD_ARG/lib/libcudd.$CUDD_LIB_EXT" - if test -r $CUDD_LIB; then - AC_MSG_RESULT($CUDD_LIB) - CUDD_LIBS="$CUDD_ARG/lib/libcudd.$CUDD_LIB_EXT" - else - AC_MSG_RESULT(not found) - fi -fi - -AC_SUBST(CUDD_LIBS) - -#-------------------------------------------------------------------- - -# Checks for programs. -AC_PROG_CXX -# Disable shared libraries by default. -AC_DISABLE_SHARED -AC_PROG_AWK -AC_PROG_YACC -AM_PROG_LEX -AC_PROG_INSTALL -AC_PROG_LN_S -AC_PROG_MAKE_SET - -# Checks for header files. -AC_CHECK_HEADERS(malloc.h) -AC_CHECK_HEADERS(limits.h) -AC_CHECK_HEADERS(strings.h) -AC_CHECK_HEADERS(stddef.h) -AC_CHECK_HEADERS(inttypes.h) -AC_CHECK_HEADERS(float.h) -AC_CHECK_HEADERS(pthread.h, HAVE_PTHREAD=true, HAVE_PTHREAD=false) -AC_CHECK_HEADERS([sys/time.h]) -AC_HEADER_STDBOOL - -# Checks for typedefs, structures, and compiler characteristics. -AC_C_CONST - -# Checks for library functions. -AC_FUNC_MALLOC -AC_FUNC_VPRINTF -AC_FUNC_STRTOD -AC_TYPE_SIZE_T - -AC_CHECK_FUNC(strdup) -AC_CHECK_FUNC(strstr) -AC_CHECK_FUNC(strchr) -AC_CHECK_FUNC(strrchr) -AC_CHECK_FUNC(strpbrk) -AC_CHECK_FUNC(strtol) -AC_CHECK_FUNC(strtoul) -AC_CHECK_FUNC(strcasecmp) -AC_CHECK_FUNC(strncasecmp) -AC_CHECK_FUNC(gettimeofday) -AC_CHECK_FUNC(sqrt) -AC_CHECK_FUNC(memset) - -AC_C_INLINE -AC_FUNC_ERROR_AT_LINE - -#-------------------------------------------------------------------- - -if test $CXX = clang++; then - # suppress deprecated-register warnings in flex files. - CXXFLAGS="-std=c++11 -Wall -Wcast-qual -Wunused-parameter -Wno-deprecated-register" - CXX_OPT="-O3" - CXX_DEBUG="-g" - CXX_ASAN="-fsanitize=address -O1 -fno-omit-frame-pointer" - CXX_LD=$CXX - - LDFLAGS="-stdlib=libc++" - if test x$HAVE_PTHREAD = xtrue; then - LDFLAGS="$LDFLAGS -lpthread" - fi - if test "$TCL_LIB"; then - LDFLAGS="$LDFLAGS -L$TCL_LIB_DIR -l$TCL_LIB" - fi - if test "$ZLIB_LIB"; then - LDFLAGS="$LDFLAGS -L$ZLIB_DIR -l$ZLIB_LIB" - fi - -elif test x$GXX = xyes; then - # Use GCC_EXTRA_FLAGS for local flags. - # -Wno-deprecated-register to suppress warnings in flex files - CXXFLAGS="-std=c++11 -Wall -Wextra -Wpointer-arith -Wcast-qual -Wno-deprecated-register -pipe $GCC_EXTRA_FLAGS" - if test x$force32bit = xtrue; then - CXXFLAGS="$CXXCFLAGS -m32" - fi - CXX_OPT="-O3" - CXX_DEBUG="-g" - CXX_GPROF="-pg -g" - CXX_GCOV="-fprofile-arcs -ftest-coverage" - CXX_LD=$CXX - - LDFLAGS="" - if test x$HAVE_PTHREAD = xtrue; then - LDFLAGS="$LDFLAGS -lpthread" - fi - if test "$TCL_LIB"; then - LDFLAGS="$LDFLAGS -L$TCL_LIB_DIR -l$TCL_LIB" - fi - if test "$ZLIB_LIB"; then - LDFLAGS="$LDFLAGS -L$ZLIB_DIR -l$ZLIB_LIB" - fi - -elif test x$visualstudio = xtrue; then - # /Zc:forScope force conformance in for Loop scope - # /EHa use c++ exception handling - # /W3 display level 3 warnings - # /WL one line diagnostics - # /c compiles without linking - # /GR enable run time type info (RTTI) - CXX_FLAGS="/nologo /Zc:forScope /EHa /W3 /WL /c /GR" - # /MDd use debug version of vc runtime library. - # /RTC1 run time error check use of uninitialized variable, initialize stack - # variables to non-zero value - # /GS buffer security check - # /Z7 symbolic debugging info - # /Od disable optimization - CXX_DEBUG="/MDd /RTC1 /GS /Z7 /Od" - # /MD use optimized version of vc runtime library. - # /Ox full optimization - # /G7 ?? - # /Gy enable function level linking - CXX_OPT="/MD /Ox /G7 /Gy" - CXX_GPROF="" - CXX_GCOV="" - - CXX_LD="link" - LDFLAGS="/nologo /SUBSYSTEM:CONSOLE /OPT:REF /IGNORE:4089 /NODEFAULTLIB:MSVCRT user32.lib advapi32.lib /OUT:sta" - if test "$TCL_LIB"; then - LDFLAGS="$LDFLAGS `cygpath -m $TCL_LIB_DIR/$TCL_LIB.$LIB_EXTS`" - fi - if test "$ZLIB_LIB"; then - LDFLAGS="$LDFLAGS `cygpath -m $ZLIB_DIR/$ZLIB_LIB.$LIB_EXTS`" - fi - - if test "$TCL_INCLUDE"; then - TCL_INCLUDE=`cygpath -m $TCL_INCLUDE` - fi - if test "$ZLIB_INCLUDE"; then - ZLIB_INCLUDE=`cygpath -m $ZLIB_INCLUDE` - fi - if test "$CUDD_INCLUDE"; then - CUDD_INCLUDE=`cygpath -m $CUDD_INCLUDE` - fi -fi - -if test x$debug = xtrue; then - CXXFLAGS+=" $CXX_DEBUG" -elif test x$optimize = xtrue; then - CXXFLAGS+=" $CXX_OPT" -elif test x$gprof = xtrue; then - if test $CXX = clang++; then - echo "clang does not support gprof" - exit - fi - CXXFLAGS+=" $CXX_GPROF" - LDFLAGS+=" $CXX_GPROF" -elif test x$asan = xtrue; then - CXXFLAGS+=" $CXX_ASAN" -elif test x$gcov = xtrue; then - CXXFLAGS+=" $CXX_GCOV" - LDFLAGS+=" $CXX_GCOV" -else - # optimize by default - CXXFLAGS+=" $CXX_OPT" -fi - -YFLAGS="-d -p \$*_" -AC_SUBST(YFLAGS) - -SWIG=swig -AC_SUBST(SWIG) -SWIG_FLAGS="-tcl8 -c++" -AC_SUBST(SWIG_FLAGS) - -# The subdirectory app has to follow all library subdirs. -STA_SUBDIRS="util liberty network graph sdc sdf parasitics dcalc search tcl doc etc verilog app" - -STA_INCLUDE="-I.. -I../util -I../liberty -I../network -I../graph -I../sdc -I../sdf -I../parasitics -I../dcalc -I../search -I../verilog -I../app" - -STA_LIBS="../search/libsearch.la ../sdf/libsdf.la ../graph/libgraph.la ../dcalc/libdcalc.la ../parasitics/libparasitics.la ../sdc/libsdc.la ../liberty/libliberty.la ../network/libnetwork.la ../util/libutil.la" - -SWIG_DEPEND="../tcl/StaException.i ../tcl/StaTcl.i ../tcl/NetworkEdit.i ../sdf/Sdf.i ../dcalc/DelayCalc.i ../parasitics/Parasitics.i" - -TCL_INIT_FILES="../tcl/Util.tcl ../dcalc/DelayCalc.tcl ../tcl/Graph.tcl ../tcl/Liberty.tcl ../tcl/Link.tcl ../tcl/Network.tcl ../tcl/NetworkEdit.tcl ../parasitics/Parasitics.tcl ../tcl/Sdc.tcl ../sdf/Sdf.tcl ../tcl/Search.tcl ../tcl/Cmds.tcl ../tcl/Variables.tcl ../tcl/Sta.tcl ../tcl/Power.tcl ../tcl/Splash.tcl" - -if test "$TCL_INCLUDE"; then - STA_INCLUDE="$STA_INCLUDE -I$TCL_INCLUDE" -fi - -if test "$ZLIB_INCLUDE"; then - STA_INCLUDE="$STA_INCLUDE -I$ZLIB_INCLUDE" -fi - -if test "$CUDD_INCLUDE"; then - STA_INCLUDE="$STA_INCLUDE -I$CUDD_INCLUDE" -fi - -AC_SUBST(STA_INCLUDE) -AC_SUBST(STA_LIBS) -AC_SUBST(TCL_INIT_FILES) -AC_SUBST(SWIG_DEPEND) -AM_CPPFLAGS=$STA_INCLUDE -AC_SUBST(AM_CPPFLAGS) - -# libtool generation has to be after AR/AR_FLAGS are set. -AC_PROG_LIBTOOL - -AC_CONFIG_FILES(Makefile) -AC_CONFIG_FILES(util/Makefile) -AC_CONFIG_FILES(liberty/Makefile) -AC_CONFIG_FILES(network/Makefile) -AC_CONFIG_FILES(verilog/Makefile) -AC_CONFIG_FILES(graph/Makefile) -AC_CONFIG_FILES(sdc/Makefile) -AC_CONFIG_FILES(sdf/Makefile) -AC_CONFIG_FILES(parasitics/Makefile) -AC_CONFIG_FILES(dcalc/Makefile) -AC_CONFIG_FILES(search/Makefile) -AC_CONFIG_FILES(tcl/Makefile) -AC_CONFIG_FILES(doc/Makefile) -AC_CONFIG_FILES(etc/Makefile) -AC_CONFIG_FILES(app/Makefile) - -# Pass $STA_SUBDIRS to Makefile.am. -AC_SUBST(STA_SUBDIRS) - -AC_OUTPUT diff --git a/dcalc/GraphDelayCalc1.cc b/dcalc/GraphDelayCalc1.cc index bf2b9ddd..5ff10c9a 100644 --- a/dcalc/GraphDelayCalc1.cc +++ b/dcalc/GraphDelayCalc1.cc @@ -1438,7 +1438,7 @@ GraphDelayCalc1::edgeFromSlew(const Vertex *from_vertex, Slew GraphDelayCalc1::idealClkSlew(const Vertex *vertex, const TransRiseFall *tr, - const MinMax *min_max) const + const MinMax *min_max) { float slew = min_max->initValue(); const ClockSet *clks = idealClks(vertex); @@ -1718,7 +1718,7 @@ GraphDelayCalc1::setIdealClks(const Vertex *vertex, } ClockSet * -GraphDelayCalc1::idealClks(const Vertex *vertex) const +GraphDelayCalc1::idealClks(const Vertex *vertex) { ideal_clks_map_lock_.lock(); ClockSet *clks = ideal_clks_map_.findKey(vertex); @@ -1727,7 +1727,7 @@ GraphDelayCalc1::idealClks(const Vertex *vertex) const } bool -GraphDelayCalc1::isIdealClk(const Vertex *vertex) const +GraphDelayCalc1::isIdealClk(const Vertex *vertex) { const ClockSet *clks = idealClks(vertex); return clks != 0 diff --git a/dcalc/GraphDelayCalc1.hh b/dcalc/GraphDelayCalc1.hh index 965f311c..f6d95d00 100644 --- a/dcalc/GraphDelayCalc1.hh +++ b/dcalc/GraphDelayCalc1.hh @@ -195,11 +195,11 @@ protected: void clearIdealClkMap(); bool setIdealClks(const Vertex *vertex, ClockSet *clks); - ClockSet *idealClks(const Vertex *vertex) const; - bool isIdealClk(const Vertex *vertex) const; + ClockSet *idealClks(const Vertex *vertex); + bool isIdealClk(const Vertex *vertex); Slew idealClkSlew(const Vertex *vertex, const TransRiseFall *tr, - const MinMax *min_max) const; + const MinMax *min_max); MultiDrvrNet *multiDrvrNet(const Vertex *drvr_vertex) const; void loadCap(Parasitic *drvr_parasitic, bool has_set_load, @@ -222,7 +222,7 @@ protected: VertexSet invalid_delays_; // Vertices with invalid -from/-to timing checks. VertexSet invalid_checks_; - mutable Mutex check_vertices_lock_; + Mutex check_vertices_lock_; SearchPred *search_pred_; SearchPred *search_non_latch_pred_; SearchPred *clk_pred_; @@ -233,7 +233,7 @@ protected: // delays to be recomputed during incremental delay calculation. float incremental_delay_tolerance_; VertexIdealClksMap ideal_clks_map_; - mutable Mutex ideal_clks_map_lock_; + Mutex ideal_clks_map_lock_; friend class FindVertexDelays; friend class MultiDrvrNet; diff --git a/doc/ChangeLog.txt b/doc/ChangeLog.txt new file mode 100644 index 00000000..8ab9ea3f --- /dev/null +++ b/doc/ChangeLog.txt @@ -0,0 +1,1290 @@ +Parallax Static Timing Analyzer Release Notes +--------------------------------------------- + +This file summarizes user visible changes for each release. + +Release 2.0.0 2018/09/28 +------------------------- + +Builds using Autotools/configure are no longer supported. +Use CMake as documented in README.mb. + +The check_timing command -no_output_delay checks output ports for +set_output_delay. + +The report_power command reports the power consumption of the design +or a specific instance. + + report_power [-instance inst] [-digits digits] [> filename] [>> filename] + +Report power used by the design or a specific instance. The internal, +switching, leakage and total power are reported. Design power is +reported separately for combinational, sequential, macro and pad +groups. + +The write_path_spice command writes a spice netlist for a timing path. + + write_path_spice -path_args path_args + -spice_directory spice_directory + -subckt_file subckt_file + -lib_subckt_file lib_subckts_file\ + -model_file model_file + -power power + -ground ground + +Use path_args to specify -from/-through/-to as arguments to the +find_timing_paths command. For each path, a spice netlist and the +subckts referenced by the path are written in spice_directory. The +spice netlist is written in path_.sp and subckt file is +path_.subckt. + +Spice netlists for liberty library cells are read from +lib_subckts_file. The spice netlists used by the path are written to +subckt_file, which spice_file .includes. The device models used by the +spice subckt netlists in model_file are .included in spice_file. Power +and ground names are specified with the -power and -ground arguments. +The spice netlist includes a piecewise linear voltage source at the +input and .measure statement for each gate delay and pin slew. + +The report_checks, find_timing_paths commands now support an +-unconstrained flag. + + report_checks -unconstrained + find_timing_paths -unconstrained + +The sta_report_unconstrained_paths variable will be supported for +for compatibility in this current release. + +The read_parasitics command has been renamed read_spef and no longer +supports the SPF format. + +Release 1.11.0 2017/08/18 +------------------------- + +Use the define_corners command to define the names of multiple +process/temperature/voltage corners. + + define_corners corner_name1 [orner_name2]... + +The define_corners command must follow set_operating_conditions +-analysis_type precede any reference to the corner names and can only +appear once in a command file. There is no support for re-defining +corners. + +For analysis type single each corner has one delay calculation result +and early/late path arrivals. For analysis type best_case/worst_case +and on_chip_varition each corner has min/max delay calculation results +and early/late path arrivals. + +Use the report_timing -corner keyword to report timing for one corner. +With no corner keyword report timing reports the corner with the +smallest slack for each timing check. + + report_timing [-corner corner_name] + +The following commands do not require the -corner keyword if there +is only one corner. Otherwise, it is required. + + read_liberty [-corner corner_name] [-min] [-max] + read_parasitics [-min] [-max] + report_delay_calculation [-corner corner_name] + set_annotated_transition [-corner corner_name] + set_annotated_delay [-corner corner_name] + set_annotated_check [-corner corner_name] + read_sdf [-corner corner_name] + write_sdf [-corner corner_name] + +An example command script using multiple corners is shown below. + + read_liberty liberty1.lib + read_verilog reg1.v + link_design top + define_corners ff ss + read_sdf -corner ff reg1.sdf + read_sdf -corner ss reg1_ss.sdf + create_clock -name clk -period 10 {clk1 clk2 clk3} + set_input_delay -clock clk 0 {in1 in2} + report_timing -delay_type min_max + report_timing -delay_type min_max -corner ss + report_timing -delay_type min_max -corner ff + +Note that the following use of the set_min_library command show below + + read_liberty liberty1.lib + set_min_library -min_version liberty1_min.lib liberty1.lib + +can be replaced with the following commands using min/max flags: + + read_liberty -max liberty1.lib + read_liberty -min liberty1_min.lib + +.... + +The report_timing -unique_pins flag is used in conjuntion with -nworst +to report multiple paths to an endpoint that traverse different pins +without showing multiple paths with different rise/fall transitions. + + report_timing [-unique_pins] + +.... + +The set_max_delay/set_min_delay commands now support the -ignore_clock_latency +option. + + set_max_delay -ignore_clock_latency + set_min_delay -ignore_clock_latency + +Clock latency at the source and destination of the path delay is +ignored. The constraint is reported in the default path group +(**default**) rather than the clock path group when the path ends at a +timing check. + +.... + +The write_sdf command writes an Standard Delay Format (SDF) file for +the design. + + write_sdf [-divider /|.] [-significant_digits digits] [-gzip] + [-no_timestamp] [-no_version] filename + + -divider separates hierarchy levels in name. It must be '/' or '.'. + -significant_digits specifies the number of digits after the decimal point + for delays + -gzip flag writes the file in gzip compressed format + -no_timestamp flag excludes the DATE statement in the header + -no_version flags excludes the VERSION statement in the header + filename is the name of the SDF file + +The SDF TIMESCALE is same as the time_unit in the first liberty file read. + +.... + +The group_path command now supports the -default flag. + + group_path -default + +When the -default flag is specified paths matching the from/through/to +criteria are added to the path group named **default**. Either the +-default or -name arguments must be specified. + +.... + +Common clock pessimism is now enabled by default +(timing_remove_clock_reconvergence_pessimism true). + +.... + +The report_clock_timing command is used to report the worst clock +skew. + + report_clock_timing [-type skew] [-setup|-hold] [-clock clocks] + [-significant_digits digits] + +Only -type skew is supported. -setup and -hold are mutually exclusive. + +Release 1.10.1 2014/12/23 +------------------------- + +The set_annotated_check command now supports a -clock argument to +specify a clock rise/fall edge to annotate. + + set_annotated_check -setup|-hold|-recovery|-removal [-rise] [-fall] [-min] [-max] + [-from from_pins] [-to to_pins] [-clock rise|fall] + [-cond sdf_cond] [-worst] check_value} + +The set_max_transition command now supports pin objects. + + set_max_transition [-clock_path] [-data_path] [-rise] [-fall] slew objects + + +Release 1.10.0 2013/06/23 +------------------------- + +The default analysis type has changed from single to +on_chip_variation. For designs that do not explicitly set the +analysis type this may make the STA run longer because it is +determining both minimum and maximum arrival times. + +Use the following command to explicitly set the analysis type to single. + + set_operation_conditions -analysis_type single + +.... + +The read_liberty -min|-max option is no longers supported. Use the +set_min_library command after the the design has been linked instead. + + set_min_library -min_version min_library max_library + +.... + +The default value of timing_input_port_default_clock has changed to false. + +.... + +An Arnoldi reducer and delay calculator for use with detailed +parasitics is now supported. Use the set_delay_calculator command to +change the delay calculator. + + set_delay_calculator arnoldi + +.... + +The get_timing_arcs -filter option is now supported. + + get_timing_arcs [-filter expr] + +.... + +The set_clock_uncertainty -from_edge -to_edge options are no longer supported. + +.... + +The allocate_budgets and write_sdc commands now have a +-significant_digits option for to control the number of digits in the +SDC file. + + write_sdc [-no_timestamp] [-significant_digits digits] filename + + allocate_budgets [-levels all|level] [-format ptsh|dctcl|dcsh] + [-file_format_spec format_spec] [-write_context] [-no_driving_cells] + [-no_timestamp] [-significant_digits digits] [instance_list] + +Release 1.9.1 2011/03/02 +------------------------ + +The following commands are now supported. + + set_annotated_check -setup|-hold|-recovery|-removal + [-rise] [-fall] [-min] [-max] + [-from from_pins] [-to to_pins] [-clock rise|fall] + [-cond sdf_cond] [-worst] check_value + + all_fanin -to sink_list [-flat] [-only_cells] [-startpoints_only] + [-levels level_count] [-pin_levels pin_count] + [-trace_arcs timing|enabled|all] + + all_fanout -from source_list [-flat] [-only_cells] [-endpoints_only] + [-levels level_count] [-pin_levels pin_count] + [-trace_arcs timing|enabled|all] + + remove_propagated_clock objects + +.... + +The create_generated_clock command now supports the phase locked loop +options -pll_out and -pll_feedback. + + create_generated_clock [-pll_out pll_out_pin] [-pll_feedback pll_fdbk_pin] + +The -source, -pll_out and -pll_feedback must all be pins on the same +PLL instance. The delay between the PLL out and feedback pins is +removed from the source latency of the generated clock. + +.... + +The set_timing_derate command now supports -rise and -fall flags. + + set_timing_derate [-rise] [-fall] [-early] [-late] [-clock] [-data] + [-net_delay] [-cell_delay] [-cell_check] + factor [object_list] + +.... + +The update_timing command now supports the -full flag. + + update_timing [-full] + +Without -full arrivals are updated incrementally. +With -full all arrivals are updated from scratch. + +.... + +The following commands return the total and worst negative slack in +the design. + + total_negative_slack [-min] [-max] + worst_negative_slack [-min] [-max] + +Release 1.9.0 2010/07/01 +------------------------ + +The set_disable_timing and remove_disable_timing commands now support +get_timing_arcs results as arguments. + + set_disable_timing [get_timing_arcs -from u2/B -to u2/Z] + set_disable_timing [get_timing_arcs -of_objects [get_lib_cells liberty1/snl_invx1]] + remove_disable_timing [get_timing_arcs -from u2/B -to u2/Z] + +.... + +The get_timing_arcs command now supports the -of_objects argument. + + get_timing_arcs [-from from_pin] [-to to_pin] [-of_objects objects] + +The keyword arguments -from and -to cannot be used with -of_objects. +Objects must be a collection of instances or library cells. + +.... + +The redirect command redirects the output from a group of commands to +a TCL variable. + + redirect -variable var { cmds } + +.... + +The query_objects command is now supported. + + query_objects [-verbose] collection + +.... + +OpenAccess databases are no longer supported. + +Release 1.8.2 2009/11/18 +------------------------ + +The rise/fall from/through/to arguments of the group_path command are +now supported. + + group_path [-from from_list] [-rise_from from_list] [-fall_from from_list] + [-through through_list] [-rise_through through_list] [-fall_through through_list] + [-to to_list] [-rise_to to_list] [-fall_to to_list] + +The create_generated_clock -combinational flag is now supported. + +The set_clock_groups command is now supported. The -allow_paths flag +is ignored. + + set_clock_groups [-name name] [-logically_exclusive] [-physically_exclusive] + [-asynchronous] [-allow_paths] -group clock_list + +The set_clock_sense command is now supported. The -pulse flag is +ignored. + + set_clock_sense [-positive] [-negative] [-pulse pulse] [-stop_propagation] + [clock clock_list] + +If there were non-unate timing arcs in the clock network previous +releases would issue a warning and only propagate the positive unate +clock edges. In this release both edges of the clock are propagated +and no warning is issued. Use the set_clock_sense command to control +the unateness of the non-unate clock edge if necessary. + +In previous releases the set_input_delay command on a clock source pin +would set the clock source delay (insertion delay) of the clock pin. +With this release the set_input_delay is ignored. + +The remove_disable_timing command is now supported. The +remove_disable_timing removes disables from a corresponding +set_disable_timing command. + + remove_disable_timing [-from from_port] [-to to_port] objects + +The following SDC commands are parsed and ignored: + + set_ideal_latency [-rise] [-fall] [-min] [-max] delay objects + set_ideal_network [-no_propagation] object_list + set_ideal_transition [-rise] [-fall] [-min] [-max] transition_time objects + +The linker now creates empty "block box" cells for instances that +reference undefined cells when the variable link_create_black_boxes is +"true". When link_create_black_boxes is false an error is reported +and the link fails. + +Release 1.8.1 2009/05/01 +------------------------ + +The STA now supports threading on multi-processor systems. +The STA executable -threads argument specifies the number of threads +to use. + + app/sta -threads max|integer + +The default value is one. If -threads is "max" the thread count is +set to the processor count. Using multiple threads on multi-processor +hosts reduces the wall run time by running multiple computations in +parallel on each processor. + +The TCL variable timing_report_unconstrained_path is deprecated. +Use timing_report_unconstrained_paths instead. + +The liberty library default values for the default_input_pin_cap and +default_inout_pin_cap attributes has been changed from 1.0 to 0.0. + +Problems found by read_parasitics are now reported as warnings rather +than errors. + +The create_generated_clock -edge_shift option is now supported. + +The timing_input_port_default_clock variable is now supported. + + timing_input_port_default_clock true|false + +The timing_all_clocks_propagated variable is now supported. +When true, all clocks are propagated. + + timing_all_clocks_propagated true|false + +Release 1.8.0 2008/10/01 +------------------------ + +The memory used by the STA has been signficantly reduced. + +The effective capacitance calculated by the Dartu/Menezes/Pileggi +delay calculation algorithm has improved accuracy. This will change +delay calculation results when SPEF/SPF RSPF/DSPF parasitics are used. + +Release 1.7.2 Patches +--------------------- + +The common reconvergent pressimism removal (crpr) for clocks with +combinational reconvergence is controlled by the +timing_clock_combinational_reconvergence_pessimism variable. +The valid values are: + converge - use the crpr at the pin that the paths converge + diverge - use the crpr at the pin that the paths diverge + none - use zero for the crpr + +Release 1.7.2 2008/01/28 +------------------------ + +Verilog 2001 port declaratation support has been added. An example is +shown below. + + module top (input in1, in2, clk1, clk2, clk3, + output out); + +Release 1.7.1 patches +--------------------- + +The set_disable_clock_gating_check command disables clock gating +checks. The remove_disable_clock_gating_check command removes a +previous disable. The objects are clock gating cells (instances) or +the clock or enable pin on the clock gating instance. + + set_disable_clock_gating_check objects + remove_disable_clock_gating_check objects + +.... + +The set_units command is now supported. + + set_units [-capacitance cap_unit] [-resistance res_unit] [-time time_unit] + [-voltage voltage_unit] [-current current_unit] [-power power_unit] + +The units are specified as a scale factor followed by a unit name. +The unit names are shown below. + + capacitance f + time s + current A + resistance ohm + voltage v + power w + +The scale factors are as follows. + + M 1E+6 + k 1E+3 + m 1E-3 + u 1E-6 + n 1E-9 + p 1E-12 + f 1E-15 + +An example of the set_units command is shown below. + + set_units -time ns -capacitance pF -current mA -voltage V -resistance kOhm + +.... + +The following SDC commands are parsed but have no effect on timing results. + + create_voltage_area [-name name] [-coordinate coordinates] + [-guard_band_x guard_x] [-guard_band_y guard_y] cells + set_level_shifter_strategy [-rule rule_type] + set_level_shifter_threshold [-voltage volt] + +.... + +The first liberty library that is read sets the default units used for +tcl commands and reporting. In previous releases they came from the +last library read. + + +Release 1.7.1 2007/08/13 +------------------------ + +The report_annotated_delay and report_annotated_check commands are now +supported. + + report_annotated_delay [-cell] [-net] [-from_in_ports] [-to_out_ports] + [-max_line lines] [-list_annotated] [-list_not_annotated] [-constant_arcs] + + report_annotated_check [-setup] [-hold] [-recovery] [-removal] [-nochange] + [-width] [-period] [-max_skew] + [-max_line lines] [-list_annotated] [-list_not_annotated] [-constant_arcs] + +.... + +The report_timing -group option is now supported. + + report_timing [-group group_names] + +Only path groups in group_names are reported. + +.... + +The set_max_transition command now supports clock objects. + + set_max_transition [-clock_path] [-data_path] [-rise] [-fall] slew objects + +The object list is a list of ports, clocks or designs. + +If specified for a design, the default maximum transition is set for +the design. + +If specified for a clock, the maximum transition is applied to all +pins in the specified clock domain. The -clock_path option restricts +the maximum transition to clocks in clock paths. The -data_path +option restricts the maximum transition to clocks in data paths. The +-clock_path, -data_path, -rise, and -fall flags only apply to clock +objects. + +.... + +Support for pulse clocks has been added. The liberty pin pulse_clock +attribute specifies the triggering edge and clock sense for a pulse +generator. + + pulse_clock rise_triggered_high_pulse|rise_triggered_low_pulse + fall_triggered_high_pulse|fall_triggered_low_pulse + +.... + +The timing_report_unconstrained_path variable is now supported. + + timing_report_unconstrained_path true|false + +When timing_report_unconstrained_path is true, report_timing reports +unconstrained paths if no constrained paths are found. The default +value is "false". + +.... + +The timing_disable_clock_gating_checks variable is now supported. + + timing_disable_clock_gating_checks true|false + +When timing_disable_clock_gating_checks is true, clock gating setup +and hold timing checks are disabled. The default value is "false". + +.... + +The timing_disable_recovery_removal_checks variable is now supported. + + timing_disable_recovery_removal_checks true|false + +When timing_disable_recovery_removal_checks is true, recovery and +removal timing checks are disabled. The default value is "false". + +.... + +The read_sdf command now supports the -path and -cond_use options. + + read_sdf [-path path] [-cond_use min|max|min_max] + +The path specifies a path to a hierarchical instance in the design to +annotate delays on. + +The cond_use option is used when the SDF file contains conditional +delays and the library does not have conditional delay arcs. If +cond_use is min, the minimum of all conditional delays is used. If +cond_use is max, the maximum of all conditional delays is used. If +cond_use is min_max and min_max operating conditions are in use, the +minimum of the conditional delay values is used for minimum operating +conditions and the maximum of the conditional delay values is used for +maximum operating conditions. + +The sdf reader now supports the PORT, DEVICE, CONDELSE and PERIOD +statements. + +.... + +The report_constraint command now supports minimum period and max skew +checks. + + report_constraint [-min_period] [-max_skew] + +The report_constraint -min_pulse_width command now only reports the +constraint with the least slack rather than all min pulse width +checks. + +Release 1.7.0 2007/03/16 +------------------------ + +The set_clock_latency -clock option is now supported. + + set_clock_latency [-source] [-clock clock] [-rise] [-fall] [-min] [-max] + [-early] [-late] delay object_list + remove_clock_latency [-source] [-clock clock] object_list + +The set_timing_derate command now supports the optional object_list argument. + + set_timing_derate [-early] [-late] [-clock] [-data] + [-net_delay] [-cell_delay] [-cell_check] + factor [object_list] + +object_list is a list of nets, instances or library cells. + +The following commands now support -regexp and -nocase flags: + + get_cells + get_clocks + get_lib_cells + get_lib_pins + get_libs + get_nets + get_pins + get_ports + +Without -regexp unix style file glob pattern matching is used. +With -regexp TCL regular expression matching is used. +When the -nocase is used regular expressions are case insensitive. +The -nocase flag can only be used with -regexp. + +The timing_dynamic_loop_breaking variable is now supported. + + timing_dynamic_loop_breaking true|false + +When timing_dynamic_loop_breaking is "false" combinational logic loops +are disabled by disabling timing arcs in the loop. When +timing_dynamic_loop_breaking is "true" all paths around the loop are +reported. The default value is false. + +Release 1.6.2 patches +--------------------- + +The -rise_to and -fall_to arguments are now supported by all exceptions. + set_false_path [-rise_to to_list] [-fall_to to_list] + set_multicycle_path [-rise_to to_list] [-fall_to to_list] + set_min_delay [-rise_to to_list] [-fall_to to_list] + set_max_delay [-rise_to to_list] [-fall_to to_list] + reset_path [-rise_to to_list] [-fall_to to_list] + +Release 1.6.2 2006/12/08 +------------------------ + +The set_input_delay/set_output_delay -reference_pin option is now supported. + + set_input_delay -reference_pin pin [-clock clock] [-clock_fall] + set_output_delay -reference_pin pin [-clock clock] [-clock_fall] + +For propagated clocks, the input arrival time is relative to the clock +arrival time at the reference pin (the clock source latency and +network latency from the clock source to the reference pin). For ideal +clocks, input arrival time is relative to the reference pin clock +source latency. With the -clock_fall flag the arrival time is +relative to the falling transition at the reference pin. If no clocks +arrive at the reference pin the set_input_delay command is ignored. +If no -clock is specified the arrival time is with respect to all +clocks that arrive at the reference pin. + +The set_input_delay/set_output_delay -source_latency_included and +-network_latency_included options are now supported. + + set_input_delay [-source_latency_included] [-network_latency_included] + set_output_delay [-source_latency_included] [-network_latency_included] + +If -source_latency_included is not specified the clock source latency +(insertion delay) is added to the delay value. + +If -network_latency_included is not specified and the clock is ideal +the clock latency is added to the delay value. + +The set_clock_uncertainty command now supports -rise_from, -fall_from, +-rise_to and -fall_to arguments. + + set_clock_uncertainty [-from|-rise_from|-fall_from clocks] + [-to|-rise_to|-fall_to clocks] + +The report_timing command now supports the -path_type +full_clock_expanded option. If the source or target clock is +generated and propagated, the path from the clock source pin is also +reported. + + report_timing -path_type command|end|full|full_clock + |full_clock_expanded|short|summary + +The report_timing command now supports the -rise_to and -fall_to +arguments as alternative to using +-delay_type max_rise|min_rise|max_fall|min_fall. + +The report_timing command is now faster if only a -to argument is +used. + +The report_min_pulse_width command is now supported. + + report_min_pulse_width [-verbose] [-nosplit] + [-significant_digits digits] [pins] + +If no pins are specified all pins in the clock network with min pulse +width checks are reported. + +The report_constraint command now supports the -min_pulse_width option. + report_constraint [-min_pulse_width] + +The set_min_pulse_width command is now supported. + + set_min_pulse_width [-low] [-high] value objects + +Objects can be pins, instances, or clocks. If -low and -high are not +specified the minimum width applies to both high and low pulses. + +The report_clock command now takes a list of clock names to report. + + report_clock [clock] + +The get_ports function now supports the -filter arguement. + + get_ports [-filter expr] + +where "expr" is of the form + attribute ==|=~ value + +The only supported attribute for ports is direction. + +The timing_disable_internal_inout_cell_paths variable is now +supported. + + timing_disable_internal_inout_cell_paths true|false + +The default value is "true". When set to "true", paths from +bidirectional (inout) ports back into the instance are disabled. When +set to "false", paths from bidirectional (inout) ports back into the +instance are enabled. + +The -compatibility command line option is no longer supported. +DC compatibility mode has been removed. + +Release 1.6.1 2006/10/04 +------------------------- + +The timing_disable_cond_default_arcs variable is now supported. + + timing_disable_cond_default_arcs true|false + +When set to true, default timing arcs with no condition ("when" +expression) are disabled if there are other conditional timing arcs +between the same pins. The default value is false. + +The remove_clock_transition command removes the clock transition time +set with the set_clock_transition command. + + remove_clock_transition clock_list + +The remove_clock_latency command removes the clock latency +set with the set_clock_latency command. + + remove_clock_latency [-source] object_list + object_list is a list of clocks, pins, or ports + +The liberty mode_definition and mode statements are now supported for +case analysis. + +Incremental SDF delay annotation is now supported. INCREMENT is +allowed as an alias for INCREMENTAL. + +The get_pins "-of_object" argument has been renamed to "-of_objects" +to match the SDC definition. + +Release 1.5.1 2006/05/16 +------------------------- + +No user visible or api changes. + +Release 1.5.0 2006/03/05 +------------------------- + +The read_min_max_lib command is no longer supported. The read_liberty +command now supports argument flags for min/max libraries. + + read_liberty [-min] [-max] filename + +Libraries read with the -min flag are used for min path delay +calculation and libraries read with the -max flag are used for max +path delay calculation. + +Support for gcc 3.4.4 and swig 1.3.28 added. + +Release 1.4.4 2005/12/08 +------------------------- + +The current_instance command now supports non-null instance arguments. + +The set_load command now supports -rise and -fall options for +transition specific loads. The -rise and -fall options can not be +used for net objects. + +The report_timing command -delay option has been renamed to -delay_type. + +The set_timing_derate command is now supported. + + set_timing_derate [-early] [-late] [-clock] [-data] + [-net_delay] [-cell_delay] [-cell_check] derate + +Use the reset_timing_derate command to remove all derating factors. + +Paths that start at latches only report the path from the latch with a +"time given to startpoint" rather than the entire path through the D +to Q path of the latch. + +Liberty rise/fall_capacitance and rise/fall_capacitance_range +attributes are now supported. + +The default_significant_digits variable has been renamed to +report_default_significant_digits. + +Release 1.4.1 2005/05/20 +------------------------- + +The read_min_max_lib command is now supported. + + read_min_max_lib -name name + -min liberty_min_file + [-min_operating_condition min_op_cond] + [-use_min_operating_condition min_op_cond_used] + -max liberty_max_file + [-max_operating_condition max_op_cond] + [-use_max_operating_condition min_op_cond_used] + +The read_min_max_lib merges the timing values from two liberty files +together to create a new library used for multi-operating condition +analysis. The merged library is named with the -name argument. The +libraries named in liberty_min_file and liberty_max_file are not +accessible after they are merged. + +The timing values in liberty_min_file are used at the operating +conditions named min_op_cond (default MIN). The min_op_cond operating +conditions are from the operating condition min_op_cond_used in +liberty_min_file. + +The timing values in liberty_max_file are used at the operating +conditions named max_op_cond (default MAX). The max_op_cond operating +conditions are from the operating condition max_op_cond_used in +liberty_max_file. + +Use the set_operating_conditions command to use the merged library +timing values. + + set_operating_conditions -analysis_type bc_wc|on_chip_variation + -min min_op_cond -max max_op_cond + +The read_parasitics command now supports multiple analysis points. + + read_parasitics [-analysis_point ap] + +If ap is min the parasitics are used for min delay calculation +If ap is max the parasitics are used for max delay calculation. +If ap is min_max the parasitics are used for both min and max +delay calculation. The default value of ap is min_max. + +Along these same lines, if an OpenAccess has parasitics when it is +read using the read_oa_db command, the STA looks for analysis points +named "min" and "max". If it finds both, they are used for +corresponding min and max delay calculation. If not, the STA looks +for an analysis point named "min_max". If found, it is used for min +and max delay calculation. + +Release 1.3.10 2005/04/04 +------------------------- + +The read_parasitics command now supports a coupling capacitance +reduction factor, and an option to keep coupling capacitors. + + read_parasitics [-keep_capacitive_coupling] + [-coupling_reduction_factor factor] + +Coupling capacitances in parasitic networks are multiplied by the +coupling factor when the parasitic is reduced. + +Release 1.3.6 2005/01/30 +------------------------ + +OpenAccess support for multiple parasitic analysis points. The STA +looks for an analysis point named "max" first, then "min". If it +finds both, they are used for corresponding min and max delay +calculation. + +Release 1.3.2 2004/12/20 +------------------------ + +OpenAccess 2.2 verilog2oa is now supported. Include a file that +contains Verilog modules for each of the Liberty library cells that +defines the ports and their declarations. + + verilog2oa -verilog "reg1.v liberty1.v" \ + -top top -lib reg1 -view verilog -blackBox + +This creates an EMH network for a module named "top" in the "verilog" +view of the "reg1" library. To read this database into the sta, use +the following commands. + + read_oa_db reg1 top verilog + read_liberty liberty1.lib + +Release 1.3.1 2004/12/15 +------------------------ + +Keyword arguments for commands can down be abreviated. For example + + report_timing -sig 3 + +can be used instead of + + report_timing -significant_digits 3 + +The report_timing command now supports the -slack_lesser_than and +-slack_greater_than arguments. + +The find command is now supported for compatibility with +DesignCompiler(tm) scripts. + + find [-hierarchy] [-flat] type patterns + +Supported types are port, net, pin, clock, library, lib_cell and lib_pin. + +Release 1.3.0 2004/12/03 +------------------------ + +The report_constraint command is now supported. + + report_constraint [-all_violators] [-verbose] + [-path_type slack_only|end] + [-max_delay] [-min_delay] + [-recovery] [-removal] + [-clock_gating_setup] [-clock_gating_hold] + [-max_transition] [-min_transition] + [-significant_digits digits] [-nosplit] + [> filename] [>> filename] + +The reset_path command is now supported. + + reset_path [-setup] [-hold] [-rise] [-fall] [-from from_list] + [-rise_from from_list] [-fall_from from_list] + [-through through_list] [-rise_through through_list] + [-fall_through through_list] [-to to_list] + +The reset_path command removes any matching set_false_path, +set_multicycle_path, set_max_delay or set_min_delay commands. + +The set_false_path, set_multicycle_path, set_max_delay and +set_min_delay commands now support the -reset_path option to delete +matching exceptions before adding the exception being defined. + +The set_compatibilty command is no longer supported. Use the +compatibility command line option to set the compatibility mode. + + sta -compatibility pt|dc + +The default compatibilty mode has been changed to "pt". + +Latch behavior is now controlled with the timing_latch_required_on_open +variable. + + timing_latch_required_on_open true|false + +The default value is true. When false the required time for latches +is the closing edge of the enable clock. This is a more accurate +choice for the required time because the setup check is also to the +closing edge of the latch enable. + +The set_instance_pvt command is used to set the process, voltage and +temperature for an instance in the design. + + set_instance_pvt insts [-min] [-max] [-process process] + [-voltage voltage] [-temperature temperature] + +The process, voltage and temperature values default to the operating +condition if they are not supplied. + +Release 1.2.17 2004/11/23 +------------------------- + +The timing_clock_gating_propagate_enable variable is now supported. + + timing_clock_gating_propagate_enable true|false + +When set to true, paths of gated clock enables are propagated through +the clock gating instance. If the gated clock controls sequential +elements setting timing_clock_gating_propagate_enable to false +prevents spurious paths from the clock enable. The default value is +"true". + +The timing_enable_preset_clear_arcs variable is now supported. + + timing_enable_preset_clear_arcs true|false + +When set to true, paths through asyncronous preset and clear timing +arcs are searched. The default value is "false". + +Liberty three dimensional tables are now supported. + +Release 1.2.14 2004/10/30 +------------------------- + +The SDF reader now optionally supports pin and instances names that do +not quote dividers in escaped names. + + read_sdf [-unescaped_dividers] + +With the -unescaped_dividers flag, path names in the SDF do not have +to escape hierarchy dividers when the path name is escaped. For +example, the escaped Verilog name "\inst1/inst2 " can be referenced as +"inst1/inst2". The correct SDF name is "inst1\/inst2", since the +divider does not represent a change in hierarchy in this case. + +Release 1.2.10 2004/08/25 +------------------------- + +The all_registers command is now supported. + +all_registers [-clock clocks] [-rise_clock clocks] [-fall_clock clocks] + [-cells] [-data_pins] [-clock_pins] [-async_pins] + [-output_pins] [-level_sensitive] [-edge_triggered] + +Release 1.2.5 2004/04/17 +------------------------ + +Suse Linux 64 bit port complete. + +Release 1.2.4 2004/04/01 +------------------------ + +The set_max_time_borrow command is now supported. + + set_max_time_borrow limit latch_instance|enable_pin|data_pin|clock + +The create_generated_clock -master_clock option is now supported. + +The set_data_check command is now supported. + + set_data_check [-from from_object] [-rise_from from_object] + [-fall_from from_object] [-to to_object] [-rise_to to_object] + [-fall_to to_object] [-setup] [-hold] [-clock clock_object] + value + +Release 1.2.2 2004/01/13 +------------------------ + +The group_path command is now supported. + + group_path -name group_name [-weight weight] [-critical_range range] + [-from from_list] [-through through_list] [-to to_list]} + +The -weight and -critical_range arguements are ignored. + +Differing driver and slew liberty library slew thresholds are now +supported. + +The report_timing -path_type "end" and "summary" are now supported. + +The set_driving_cell command -min and -max options are now supported. + +The read_parasitics command now supports parasitic network reduction +after each net is read, substantially reducing the memory footprint +required to store the parasitics. + + read_parasitics -reduce_to pi_elmore|pi_pole_residue2 -delete_after_reduce + +The parasitics can be reduced to a pi/elmore (rspf) model or a second +order pi/pole/residue model. + +Release 1.1.7 2003/10/19 +------------------------ + +The echo command is similar to the tcl "put" command and supports +redirection. + + echo [-n] args... + +The set_annotated_delay and set_annotated_transition commands are now +supported. + + set_annotated_delay -cell|-net [-rise] [-fall] [-min] [-max] + [-from from_pins] [-to to_pins] delay + + set_annotated_transition [-rise] [-fall] [-min] [-max] slew pin_list + +Liberty timing group conditional "when" expressions are now supported. + +The create_clock -add option to define multiple clocks on a pin is now +supported. + +The following SDC commands are parsed and ignored. + + set_max_dynamic_power + set_max_leakage_power + set_min_porocity + +Release 1.1.6 2003/08/02 +------------------------ + +Release 1.1.5 2003/07/11 +------------------------ + +The source command now supports output redirection. + + source [-echo] [-verbose] filename [> filename] [>> filename] + +Release 1.1.4 2003/06/10 +------------------------ + +The report_timing -path_type option is now supported. + + report_timing [-path_type short|full|full_clock] + +The following variable are now supported for analysis type +on_chip_variation: + + timing_remove_clock_reconvergence_pessimism false|true + timing_clock_reconvergence_pessimism normal|same_transition + +Release 1.1.3 2003/05/06 +------------------------ + +The allocate_budgets command now has a -no_driving_cells option to +suppress the inclusion of set_driving_cell commands in the budget +constraint files. This is useful when the driving cell libraries are +not available in the tools that use the budget. + +SDF COND support added. + +The read_edif command has additional arguments to support the confused +world of fpgas. + +read_edif [-cell_name cell_name] [-ignore_libraries] + [-group_bus_ports] filename + + -cell_name overrides cell name for any cell that has a contents section. + -ignore_libraries ignores library names. + All cells that do not already have a definition are built in + the edif library. libraryRefs search all libraries for the cell + named in the cellRef. + -group_bus_ports groups bus ports that are individually defined + into a bus as if they were defined using an array. + +Release 1.1.2 2003/03/07 +------------------------ + +The report_timing -nets option is now supported. + +The report_clock command reports the period and waveform for all of +the clocks. + +A mode to control compatibility is now supported from the command line +or as a TCL command. + sta [-compatibility native|pt|dc] + set_compatibility native|pt|dc + +The read_edif command reads an edif netlist. + +Release 1.1.1 2003/01/20 +------------------------ + +The read_spf command has been replaced by the read_parasitics command, +which reads rspf, dspf and spef format files. + +The set_timing_disable command now supports library cell and port arguments. + +The liberty reader now supports the following + bus_naming_style + variable = value; + +The following network editing commands are now supported: + connect_net net pins_ports + create_cell cell_names lib_cell_name + create_net net_list + disconnect_net net pins_ports|-all + remove_cell cell_list + remove_net net_list + swap_cell cell_list swap_in + +Release 1.1.0 2002/02/12 +------------------------ + +The report_timing command -nworst option reports more than one path +per endpoint. The default value of path_end_count is 1. + + report_timing -nworst path_end_count + +Gated clock timing checks are disabled unless a set_clock_gating_check +command has been executed. + +The following SDC commands are now supported. + create_generated_clock + get_pins -hsc + get_nets -hsc + hierarchy_separator variable + set_case_analysis + set_drive + set_drive_resistance (alias for set_drive) + set_hierarchy_separator + set_max_area + set_max_capacitance + set_max_fanout + set_max_transition + set_min_capacitance + set_min_fanout + set_resistance + +The check_timing command now has options to control which checks are +performed. + + check_timing [-verbose] [-unconstrained_endpoints] [-multiple_clock] + [-no_clock] [-no_input_delay] [-loops] [-generated_clocks] + [> filename] [>> filename] + +The allocate_budgets command now has a -no_timestamp option to +suppress insertiing the date and time into the context files. + +The write_sdc command is now supported. + + write_sdc [-no_timestamp] filename + +Interface Logic Model (ILM) support has been added with the +identify_interface_logic and write_ilm_netlist commands. + + identify_interface_logic [-ignore_ports ports_list] [-auto_ignore] + [-latch_level level] [-remove_disabled_logic] + + write_ilm_netlist [-include_all_net_pins] [-verbose] filename + +Release 1.0.19 2002/04/24 +------------------------- + +The help command finds commands matching a pattern and shows their arguments. + + help pattern + + +set_clock_gating_check -high -low arguments are now supported. + +The following commands have been renamed: + show_cell report_lib_cell + show_pin report_pin + show_net report_net + show_instance report_instance or report_cell + show_path report_path + show_arrival report_arrival + show_edges report_edges + +report_delay_calculation now has a -significant_digits argument. + +All printing commands now support file redirection. + +# Local Variables: +# mode:text +# End: diff --git a/doc/OpenSTA.odt b/doc/OpenSTA.odt index fa4e5b19..c8a6cde7 100644 Binary files a/doc/OpenSTA.odt and b/doc/OpenSTA.odt differ diff --git a/doc/OpenSTA.pdf b/doc/OpenSTA.pdf index 6b243d1a..6a3d2dc1 100644 Binary files a/doc/OpenSTA.pdf and b/doc/OpenSTA.pdf differ diff --git a/graph/Delay.hh b/graph/Delay.hh index a9ca5d32..8719394d 100644 --- a/graph/Delay.hh +++ b/graph/Delay.hh @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -#include "config.h" +#include "StaConfig.hh" #ifndef STA_DELAY_H #define STA_DELAY_H diff --git a/graph/DelayFloat.cc b/graph/DelayFloat.cc index 4a376d2d..48ef42d4 100644 --- a/graph/DelayFloat.cc +++ b/graph/DelayFloat.cc @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -#include "config.h" +#include "StaConfig.hh" #include "Machine.hh" #include "Fuzzy.hh" #include "Units.hh" diff --git a/graph/DelayNormal2.cc b/graph/DelayNormal2.cc index 2af66427..d48c2f21 100644 --- a/graph/DelayNormal2.cc +++ b/graph/DelayNormal2.cc @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -#include "config.h" +#include "StaConfig.hh" #include // sqrt #include "Machine.hh" #include "Error.hh" diff --git a/liberty/LibertyReader.cc b/liberty/LibertyReader.cc index f4057f7b..5ffb5d9b 100644 --- a/liberty/LibertyReader.cc +++ b/liberty/LibertyReader.cc @@ -2569,10 +2569,10 @@ LibertyReader::setPortDefaults(LibertyPort *port) } void -LibertyReader::endPin(LibertyGroup *group) +LibertyReader::endPin(LibertyGroup *) { if (cell_) { - endPorts(group); + endPorts(); if (in_bus_ || in_bundle_) { ports_ = saved_ports_; port_group_ = saved_port_group_; @@ -2582,7 +2582,7 @@ LibertyReader::endPin(LibertyGroup *group) } void -LibertyReader::endPorts(LibertyGroup *) +LibertyReader::endPorts() { // Capacitances default based on direction so wait until the end // of the pin group to set them. @@ -2638,7 +2638,7 @@ LibertyReader::endBus(LibertyGroup *group) if (cell_) { if (ports_->empty()) libWarn(group, "bus %s bus_type not found.\n", group->firstName()); - endBusOrBundle(group); + endBusOrBundle(); in_bus_ = false; } } @@ -2662,9 +2662,9 @@ LibertyReader::beginBusOrBundle(LibertyGroup *group) } void -LibertyReader::endBusOrBundle(LibertyGroup *group) +LibertyReader::endBusOrBundle() { - endPorts(group); + endPorts(); deleteContents(&bus_names_); bus_names_.clear(); ports_ = NULL; @@ -2716,7 +2716,7 @@ LibertyReader::endBundle(LibertyGroup *group) if (cell_) { if (ports_->empty()) libWarn(group, "bundle %s member not found.\n", group->firstName()); - endBusOrBundle(group); + endBusOrBundle(); in_bundle_ = false; } } diff --git a/liberty/LibertyReaderPvt.hh b/liberty/LibertyReaderPvt.hh index a6176c6a..6f9000d5 100644 --- a/liberty/LibertyReaderPvt.hh +++ b/liberty/LibertyReaderPvt.hh @@ -190,8 +190,8 @@ public: virtual void beginBundle(LibertyGroup *group); virtual void endBundle(LibertyGroup *group); virtual void beginBusOrBundle(LibertyGroup *group); - virtual void endBusOrBundle(LibertyGroup *group); - virtual void endPorts(LibertyGroup *group); + virtual void endBusOrBundle(); + virtual void endPorts(); virtual void setPortCapDefault(LibertyPort *port); virtual void setPortDefaults(LibertyPort *port); virtual void visitMembers(LibertyAttr *attr); diff --git a/network/ConcreteLibrary.cc b/network/ConcreteLibrary.cc index 708904c7..53606208 100644 --- a/network/ConcreteLibrary.cc +++ b/network/ConcreteLibrary.cc @@ -595,7 +595,7 @@ ConcreteCellPortBitIterator::findNext() if (member_iter_ == NULL) { if (port_iter_.hasNext()) { next_ = port_iter_.next(); - if (next_->hasMembers()) { + if (next_->isBus()) { member_iter_ = next_->memberIterator(); next_ = member_iter_->next(); } diff --git a/sdc/CycleAccting.cc b/sdc/CycleAccting.cc index ae3d037f..af2f8153 100644 --- a/sdc/CycleAccting.cc +++ b/sdc/CycleAccting.cc @@ -66,7 +66,7 @@ CycleAccting::findDelays(StaState *sta) tgt_max_cycle = 100; else { int ratio = std::ceil(src_period / tgt_period); - tgt_max_cycle = std::max(ratio, 100); + tgt_max_cycle = std::max(ratio, 1000); } bool tgt_past_src = false; bool src_past_tgt = false; diff --git a/sdc/InputDrive.cc b/sdc/InputDrive.cc index ac9a5cde..407d83db 100644 --- a/sdc/InputDrive.cc +++ b/sdc/InputDrive.cc @@ -89,7 +89,8 @@ InputDrive::driveResistanceMinMaxEqual(const TransRiseFall *tr) } void -InputDrive::setDriveCell(LibertyCell *cell, +InputDrive::setDriveCell(LibertyLibrary *library, + LibertyCell *cell, LibertyPort *from_port, float *from_slews, LibertyPort *to_port, @@ -106,13 +107,15 @@ InputDrive::setDriveCell(LibertyCell *cell, int mm_index = mm->index(); InputDriveCell *drive = drive_cells_[tr_index][mm_index]; if (drive) { + drive->setLibrary(library); drive->setCell(cell); drive->setFromPort(from_port); drive->setFromSlews(from_slews); drive->setToPort(to_port); } else { - drive = new InputDriveCell(cell, from_port, from_slews, to_port); + drive = new InputDriveCell(library, cell, from_port, + from_slews, to_port); drive_cells_[tr_index][mm_index] = drive; } } @@ -179,10 +182,12 @@ InputDrive::slew(const TransRiseFall *tr, //////////////////////////////////////////////////////////////// -InputDriveCell::InputDriveCell(LibertyCell *cell, +InputDriveCell::InputDriveCell(LibertyLibrary *library, + LibertyCell *cell, LibertyPort *from_port, float *from_slews, LibertyPort *to_port) : + library_(library), cell_(cell), from_port_(from_port), to_port_(to_port) @@ -190,6 +195,12 @@ InputDriveCell::InputDriveCell(LibertyCell *cell, setFromSlews(from_slews); } +void +InputDriveCell::setLibrary(LibertyLibrary *library) +{ + library_ = library; +} + void InputDriveCell::setCell(LibertyCell *cell) { diff --git a/sdc/InputDrive.hh b/sdc/InputDrive.hh index 72f5cce5..1df7e714 100644 --- a/sdc/InputDrive.hh +++ b/sdc/InputDrive.hh @@ -49,7 +49,8 @@ public: bool hasDriveResistance(const TransRiseFall *tr, const MinMax *min_max); bool driveResistanceMinMaxEqual(const TransRiseFall *tr); - void setDriveCell(LibertyCell *cell, + void setDriveCell(LibertyLibrary *library, + LibertyCell *cell, LibertyPort *from_port, float *from_slews, LibertyPort *to_port, @@ -86,10 +87,13 @@ private: class InputDriveCell { public: - InputDriveCell(LibertyCell *cell, + InputDriveCell(LibertyLibrary *library, + LibertyCell *cell, LibertyPort *from_port, float *from_slews, LibertyPort *to_port); + LibertyLibrary *library() const { return library_; } + void setLibrary(LibertyLibrary *library); LibertyCell *cell() const { return cell_; } void setCell(LibertyCell *cell); LibertyPort *fromPort() const { return from_port_; } @@ -103,6 +107,7 @@ public: private: DISALLOW_COPY_AND_ASSIGN(InputDriveCell); + LibertyLibrary *library_; LibertyCell *cell_; LibertyPort *from_port_; float from_slews_[TransRiseFall::index_count]; diff --git a/sdc/Sdc.cc b/sdc/Sdc.cc index 54fc0d7c..08989b54 100644 --- a/sdc/Sdc.cc +++ b/sdc/Sdc.cc @@ -756,16 +756,17 @@ Sdc::deleteDeratingFactors() //////////////////////////////////////////////////////////////// void -Sdc::setDriveCell(Port *port, +Sdc::setDriveCell(LibertyLibrary *library, LibertyCell *cell, + Port *port, LibertyPort *from_port, float *from_slews, LibertyPort *to_port, const TransRiseFallBoth *tr, const MinMaxAll *min_max) { - ensureInputDrive(port)->setDriveCell(cell, from_port, from_slews, to_port, - tr, min_max); + ensureInputDrive(port)->setDriveCell(library, cell, from_port, from_slews, + to_port, tr, min_max); } void @@ -2071,6 +2072,12 @@ Sdc::makeClockGroup(ClockGroups *clk_groups, clk_groups->makeClockGroup(clks); } +ClockGroupIterator * +Sdc::clockGroupIterator() +{ + return new ClockGroupIterator(clk_groups_name_map_); +} + void Sdc::ensureClkGroupExclusions() { @@ -5990,15 +5997,6 @@ Sdc::setWireloadMode(WireloadMode mode) WireloadMode Sdc::wireloadMode() { - if (wireload_mode_ == wire_load_mode_unknown) { - // Look for a default. - LibertyLibrary *lib = network_->defaultLibertyLibrary(); - if (lib) { - WireloadMode default_mode = lib->defaultWireloadMode(); - if (default_mode != wire_load_mode_unknown) - wireload_mode_ = default_mode; - } - } return wireload_mode_; } diff --git a/sdc/Sdc.hh b/sdc/Sdc.hh index 334b4eaf..e80d4586 100644 --- a/sdc/Sdc.hh +++ b/sdc/Sdc.hh @@ -155,6 +155,7 @@ typedef Map CellDeratingFactorsMap; typedef Set ClockGroupsSet; typedef Map ClockGroupsClkMap; typedef Map ClockGroupsNameMap; +typedef ClockGroupsNameMap::Iterator ClockGroupIterator; typedef Map ClockSenseMap; typedef Set ClkHpinDisables; typedef Set GroupPathSet; @@ -238,8 +239,9 @@ public: float res); // Set the drive on design port using external cell timing arcs of // cell driven by from_slews between from_port and to_port. - void setDriveCell(Port *port, + void setDriveCell(LibertyLibrary *library, LibertyCell *cell, + Port *port, LibertyPort *from_port, float *from_slews, LibertyPort *to_port, @@ -488,9 +490,10 @@ public: void removeClockGroupsAsynchronous(const char *name); bool sameClockGroup(const Clock *clk1, const Clock *clk2); - // Clocks explicitly excluded by set_clock_group. + // Clocks explicitly excluded by set_clock_group. bool sameClockGroupExplicit(const Clock *clk1, const Clock *clk2); + ClockGroupIterator *clockGroupIterator(); void setClockSense(PinSet *pins, ClockSet *clks, ClockSense sense); diff --git a/sdc/WriteSdc.cc b/sdc/WriteSdc.cc index c42a6ecb..3bc9ec72 100644 --- a/sdc/WriteSdc.cc +++ b/sdc/WriteSdc.cc @@ -280,12 +280,12 @@ void writeSdc(Instance *instance, const char *filename, const char *creator, - bool native, + bool compatible, bool no_timestamp, int digits, Sdc *sdc) { - WriteSdc writer(instance, filename, creator, native, digits, + WriteSdc writer(instance, filename, creator, compatible, digits, no_timestamp, sdc); writer.write(); } @@ -293,7 +293,7 @@ writeSdc(Instance *instance, WriteSdc::WriteSdc(Instance *instance, const char *filename, const char *creator, - bool native, + bool compatible, int digits, bool no_timestamp, Sdc *sdc) : @@ -301,7 +301,7 @@ WriteSdc::WriteSdc(Instance *instance, instance_(instance), filename_(filename), creator_(creator), - native_( native), + compatible_(compatible), digits_(digits), no_timestamp_(no_timestamp), top_instance_(instance == sdc_network_->topInstance()), @@ -986,11 +986,12 @@ ClockGroupLess::operator()(const ClockGroup *clk_group1, void WriteSdc::writeClockGroups() const { - ClockGroupsNameMap::Iterator groups_iter(sdc_->clk_groups_name_map_); - while (groups_iter.hasNext()) { - ClockGroups *clk_groups = groups_iter.next(); + ClockGroupIterator *groups_iter = sdc_->clockGroupIterator(); + while (groups_iter->hasNext()) { + ClockGroups *clk_groups = groups_iter->next(); writeClockGroups(clk_groups); } + delete groups_iter; } void @@ -1737,15 +1738,16 @@ WriteSdc::writeDrivingCell(Port *port, LibertyPort *from_port = drive_cell->fromPort(); LibertyPort *to_port = drive_cell->toPort(); float *from_slews = drive_cell->fromSlews(); - LibertyLibrary *lib = cell->libertyLibrary(); + LibertyLibrary *lib = drive_cell->library(); fprintf(stream_, "set_driving_cell"); if (tr) fprintf(stream_, " %s", transRiseFallFlag(tr)); if (min_max) fprintf(stream_, " %s", minMaxFlag(min_max)); - fprintf(stream_, " -library %s -lib_cell %s", - lib->name(), - cell->name()); + // Only write -library if it was specified in the sdc. + if (lib) + fprintf(stream_, " -library %s", lib->name()); + fprintf(stream_, " -lib_cell %s", cell->name()); if (from_port) fprintf(stream_, " -from_pin {%s}", from_port->name()); @@ -2434,16 +2436,16 @@ void WriteSdc::writeVariables() const { if (sdc_->propagateAllClocks()) { - if (native_) - fprintf(stream_, "set sta_propagate_all_clocks 1\n"); - else + if (compatible_) fprintf(stream_, "set timing_all_clocks_propagated true\n"); + else + fprintf(stream_, "set sta_propagate_all_clocks 1\n"); } if (sdc_->presetClrArcsEnabled()) { - if (native_) - fprintf(stream_, "set sta_preset_clear_arcs_enabled 1\n"); - else + if (compatible_) fprintf(stream_, "set timing_enable_preset_clear_arcs true\n"); + else + fprintf(stream_, "set sta_preset_clear_arcs_enabled 1\n"); } } @@ -2481,7 +2483,7 @@ WriteSdc::writeGetTimingArcs(Edge *edge, const char * WriteSdc::getTimingArcsCmd() const { - return native_ ? "get_timing_edges" : "get_timing_arcs"; + return compatible_ ? "get_timing_arcs" : "get_timing_edges"; } //////////////////////////////////////////////////////////////// diff --git a/sdc/WriteSdc.hh b/sdc/WriteSdc.hh index f681803e..776e204d 100644 --- a/sdc/WriteSdc.hh +++ b/sdc/WriteSdc.hh @@ -28,7 +28,7 @@ void writeSdc(Instance *instance, const char *filename, const char *creator, - bool native, + bool compatible, bool no_timestamp, int digits, Sdc *sdc); diff --git a/sdc/WriteSdcPvt.hh b/sdc/WriteSdcPvt.hh index ef2262b8..572b9ff1 100644 --- a/sdc/WriteSdcPvt.hh +++ b/sdc/WriteSdcPvt.hh @@ -29,7 +29,7 @@ public: WriteSdc(Instance *instance, const char *filename, const char *creator, - bool native, + bool compatible, int digits, bool no_timestamp, Sdc *sdc); @@ -239,7 +239,7 @@ protected: Instance *instance_; const char *filename_; const char *creator_; - bool native_; + bool compatible_; int digits_; bool no_timestamp_; bool top_instance_; diff --git a/sdf/SdfWriter.cc b/sdf/SdfWriter.cc index db886ed5..e56f432a 100644 --- a/sdf/SdfWriter.cc +++ b/sdf/SdfWriter.cc @@ -18,7 +18,7 @@ #include #include "Machine.hh" #include "Zlib.hh" -#include "config.h" // VERSION +#include "StaConfig.hh" // STA_VERSION #include "Fuzzy.hh" #include "StringUtil.hh" #include "MinMaxValues.hh" @@ -208,7 +208,7 @@ SdfWriter::writeHeader(LibertyLibrary *default_lib, gzprintf(stream_, " (VENDOR \"Parallax\")\n"); gzprintf(stream_, " (PROGRAM \"STA\")\n"); if (!no_version) - gzprintf(stream_, " (VERSION \"%s\")\n", VERSION); + gzprintf(stream_, " (VERSION \"%s\")\n", STA_VERSION); gzprintf(stream_, " (DIVIDER %c)\n", sdf_divider_); OperatingConditions *cond_min = diff --git a/search/Bfs.cc b/search/Bfs.cc index be255a96..b0e21916 100644 --- a/search/Bfs.cc +++ b/search/Bfs.cc @@ -241,18 +241,16 @@ BfsIterator::visitParallel(Level to_level, { int visit_count = 0; if (!empty()) { - int thread_count = threadCount(); - if (thread_count <= 1) + if (thread_count_ <= 1) visit_count = visit(to_level, visitor); else { - ForEachArg *args = - new ForEachArg[thread_count]; - Thread *threads = new Thread[thread_count]; + ForEachArg args[thread_count_]; + Thread threads[thread_count_]; Mutex lock; - for (int i = 0; i < thread_count; i++) { - ForEachArg *arg = &args[i]; - arg->lock_ = &lock; - arg->func_ = visitor->copy(); + for (int i = 0; i < thread_count_; i++) { + ForEachArg &arg = args[i]; + arg.lock_ = &lock; + arg.func_ = visitor->copy(); } Level level = first_level_; @@ -265,17 +263,17 @@ BfsIterator::visitParallel(Level to_level, incrLevel(first_level_); BfsListIterator iter(level_vertices, this, bfs_index_); - for (int i = 0; i < thread_count; i++) { - ForEachArg *arg = &args[i]; + for (int i = 0; i < thread_count_; i++) { + ForEachArg &arg = args[i]; // Initialize the iterator for this level's vertices. - arg->iter_ = &iter; + arg.iter_ = &iter; threads[i].beginTask(forEachBegin, - reinterpret_cast(arg)); + reinterpret_cast(&arg)); } // Wait for all threads working on this level before moving on. - for (int i = 0; i < thread_count; i++) + for (int i = 0; i < thread_count_; i++) threads[i].wait(); visit_count += iter.count(); @@ -287,12 +285,10 @@ BfsIterator::visitParallel(Level to_level, } } - for (int i = 0; i < thread_count; i++) { + for (int i = 0; i < thread_count_; i++) { ForEachArg *arg = &args[i]; delete arg->func_; } - delete [] threads; - delete [] args; } } return visit_count; diff --git a/search/PathGroup.cc b/search/PathGroup.cc index f8761384..484bf7ab 100644 --- a/search/PathGroup.cc +++ b/search/PathGroup.cc @@ -36,6 +36,8 @@ namespace sta { +int PathGroup::group_count_max = std::numeric_limits::max(); + PathGroup * PathGroup::makePathGroupSlack(const char *name, int group_count, @@ -119,7 +121,7 @@ PathGroup::insert(PathEnd *path_end) { lock_.lock(); path_ends_.push_back(path_end); - if (group_count_ < std::numeric_limits::max() + if (group_count_ != group_count_max && static_cast(path_ends_.size()) > group_count_ * 2) prune(); lock_.unlock(); diff --git a/search/PathGroup.hh b/search/PathGroup.hh index d9f6c1af..5c8b0940 100644 --- a/search/PathGroup.hh +++ b/search/PathGroup.hh @@ -65,7 +65,8 @@ public: PathGroupIterator *iterator(); // This does NOT delete the path ends. void clear(); - + static int group_count_max; + protected: PathGroup(const char *name, int group_count, diff --git a/search/ReportPath.cc b/search/ReportPath.cc index 872a94ad..d4ccf38d 100644 --- a/search/ReportPath.cc +++ b/search/ReportPath.cc @@ -87,7 +87,6 @@ ReportField::setProperties(const char *title, setWidth(width); } - void ReportField::setWidth(int width) { @@ -95,9 +94,9 @@ ReportField::setWidth(int width) if (blank_) stringDelete(blank_); - blank_ = new char[width + 1]; + blank_ = new char[width_ + 1]; int i; - for (i = 0; i < width; i++) + for (i = 0; i < width_; i++) blank_[i] = ' '; blank_[i] = '\0'; } @@ -114,20 +113,19 @@ const float ReportPath::field_blank_ = -1.0; ReportPath::ReportPath(StaState *sta) : StaState(sta), - start_end_pt_width_(78), + format_(report_path_full), + no_split_(false), + start_end_pt_width_(80), plus_zero_(NULL), minus_zero_(NULL) { - makeFields(); - setPathFormat(report_path_full); - setReportFields(false, false, false, false); setDigits(2); - setNoSplit(false); + makeFields(); + setReportFields(false, false, false, false); } ReportPath::~ReportPath() { - delete fields_; delete field_description_; delete field_total_; delete field_incr_; @@ -144,16 +142,19 @@ ReportPath::~ReportPath() void ReportPath::makeFields() { - fields_ = new ReportFieldSeq; - field_fanout_ = makeField("fanout", "Fanout", 10, false, NULL, true); - field_capacitance_ = makeField("capacitance", "Cap", 10, false, + field_fanout_ = makeField("fanout", "Fanout", 5, false, NULL, true); + field_capacitance_ = makeField("capacitance", "Cap", 6, false, units_->capacitanceUnit(), true); - field_slew_ = makeField("slew", "Slew", 10, false, units_->timeUnit(), true); - field_incr_ = makeField("incr", "Delay", 10, false, units_->timeUnit(), true); - field_total_ = makeField("total", "Time", 10, false, units_->timeUnit(), true); + field_slew_ = makeField("slew", "Slew", 6, false, units_->timeUnit(), + true); + field_incr_ = makeField("incr", "Delay", 6, false, units_->timeUnit(), + true); + field_total_ = makeField("total", "Time", 6, false, units_->timeUnit(), + true); field_edge_ = makeField("edge", "", 1, false, NULL, true); - field_case_ = makeField("case", "case", 10, false, NULL, false); - field_description_ = makeField("description", "Description", 36, true, NULL, true); + field_case_ = makeField("case", "case", 11, false, NULL, false); + field_description_ = makeField("description", "Description", 36, + true, NULL, true); } ReportField * @@ -166,7 +167,7 @@ ReportPath::makeField(const char *name, { ReportField *field = new ReportField(name, title, width, left_justify, unit, enabled); - fields_->push_back(field); + fields_.push_back(field); return field; } @@ -192,12 +193,12 @@ ReportPath::setReportFieldOrder(StringSeq *field_names) field->setEnabled(false); } - ReportFieldSeq *next_fields = new ReportFieldSeq; + ReportFieldSeq next_fields; StringSeq::Iterator name_iter(field_names); while (name_iter.hasNext()) { const char *field_name = name_iter.next(); ReportField *field = findField(field_name); - next_fields->push_back(field); + next_fields.push_back(field); field->setEnabled(true); } // Push remaining disabled fields on the end. @@ -205,10 +206,15 @@ ReportPath::setReportFieldOrder(StringSeq *field_names) while (field_iter2.hasNext()) { ReportField *field = field_iter2.next(); if (!field->enabled()) - next_fields->push_back(field); + next_fields.push_back(field); + } + + fields_.clear(); + ReportFieldSeq::Iterator field_iter3(next_fields); + while (field_iter3.hasNext()) { + ReportField *field = field_iter3.next(); + fields_.push_back(field); } - delete fields_; - fields_ = next_fields; } void @@ -2982,18 +2988,18 @@ ReportPath::reportLine(const char *what, string &result) { ReportFieldSeq::Iterator field_iter(fields_); - bool first_field = true; + int field_index = 0; while (field_iter.hasNext()) { ReportField *field = field_iter.next(); + bool first_field = field_index == 0; + bool last_field = field_index == fields_.size() - 1; + if (field->enabled()) { - if (!first_field - // Compatibility kludge; suppress trailing whitespace for edge. - && field != field_edge_) + if (!first_field) result += ' '; - first_field = false; if (field == field_description_) - reportDescription(what, result); + reportDescription(what, first_field, last_field, result); else if (field == field_fanout_) { if (fanout == field_blank_) reportFieldBlank(field, result); @@ -3027,7 +3033,9 @@ ReportPath::reportLine(const char *what, } else if (field == field_case_ && line_case) result += line_case; + } + field_index++; } reportEndOfLine(result); } @@ -3083,15 +3091,26 @@ ReportPath::reportDashLineTotal(string &result) void ReportPath::reportDescription(const char *what, string &result) +{ + reportDescription(what, false, false, result); +} + +void +ReportPath::reportDescription(const char *what, + bool first_field, + bool last_field, + string &result) { result += what; int length = strlen(what); - if (!no_split_ && length > field_description_->width()) { + if (!no_split_ + && first_field + && length > field_description_->width()) { reportEndOfLine(result); for (int i = 0; i < field_description_->width(); i++) result += ' '; } - else { + else if (!last_field) { for (int i = length; i < field_description_->width(); i++) result += ' '; } diff --git a/search/ReportPath.hh b/search/ReportPath.hh index 9b0c7fea..a6579f7e 100644 --- a/search/ReportPath.hh +++ b/search/ReportPath.hh @@ -28,42 +28,10 @@ namespace sta { class Corner; class DcalcAnalysisPt; class PathExpanded; +class ReportField; using std::string; -class ReportField -{ -public: - ReportField(const char *name, - const char *title, - int width, - bool left_justify, - Unit *unit, - bool enabled); - ~ReportField(); - void setProperties(const char *title, - int width, - bool left_justify); - const char *name() const { return name_; } - const char *title() const { return title_; } - int width() const { return width_; } - void setWidth(int width); - bool leftJustify() const { return left_justify_; } - Unit *unit() const { return unit_; } - const char *blank() { return blank_; } - void setEnabled(bool enabled); - bool enabled() const { return enabled_; } - -protected: - const char *name_; - const char *title_; - int width_; - bool left_justify_; - Unit *unit_; - bool enabled_; - char *blank_; -}; - typedef Vector ReportFieldSeq; class ReportPath : public StaState @@ -77,6 +45,7 @@ public: bool report_net, bool report_cap, bool report_slew); + int digits() const { return digits_; } void setDigits(int digits); void setNoSplit(bool no_split); ReportField *findField(const char *name); @@ -451,6 +420,10 @@ protected: void reportDashLineTotal(string &result); void reportDescription(const char *what, string &result); + void reportDescription(const char *what, + bool first_field, + bool last_field, + string &result); void reportFieldTime(float value, ReportField *field, string &result); @@ -535,7 +508,7 @@ protected: // Path options. ReportPathFormat format_; - ReportFieldSeq *fields_; + ReportFieldSeq fields_; bool report_input_pin_; bool report_net_; bool no_split_; @@ -562,5 +535,39 @@ private: DISALLOW_COPY_AND_ASSIGN(ReportPath); }; +class ReportField +{ +public: + ReportField(const char *name, + const char *title, + int width, + bool left_justify, + Unit *unit, + bool enabled); + ~ReportField(); + void setProperties(const char *title, + int width, + bool left_justify); + const char *name() const { return name_; } + const char *title() const { return title_; } + int width() const { return width_; } + void setWidth(int width); + bool leftJustify() const { return left_justify_; } + Unit *unit() const { return unit_; } + const char *blank() { return blank_; } + void setEnabled(bool enabled); + bool enabled() const { return enabled_; } + +protected: + const char *name_; + const char *title_; + int width_; + bool left_justify_; + Unit *unit_; + bool enabled_; + char *blank_; + ReportPath *report_path_; +}; + } // namespace #endif diff --git a/search/Search.cc b/search/Search.cc index f7e5fc83..0b751f51 100644 --- a/search/Search.cc +++ b/search/Search.cc @@ -698,7 +698,7 @@ Search::arrivalInvalid(Vertex *vertex) debugPrint1(debug_, "search", 2, "arrival invalid %s\n", vertex->name(sdc_network_)); if (!arrival_iter_->inQueue(vertex)) { - // Lock for DelayCalcObserveRequired called by GraphDelayCalc threads. + // Lock for StaDelayCalcObserver called by delay calc threads. invalid_arrivals_lock_.lock(); invalid_arrivals_.insert(vertex); invalid_arrivals_lock_.unlock(); @@ -769,7 +769,7 @@ Search::requiredInvalid(Vertex *vertex) debugPrint1(debug_, "search", 2, "required invalid %s\n", vertex->name(sdc_network_)); if (!required_iter_->inQueue(vertex)) { - // Lock for DelayCalcObserveRequired called by GraphDelayCalc threads. + // Lock for StaDelayCalcObserver called by delay calc threads. invalid_arrivals_lock_.lock(); invalid_requireds_.insert(vertex); invalid_arrivals_lock_.unlock(); @@ -2908,7 +2908,7 @@ Search::findTag(const TransRiseFall *tr, InputDelay *input_delay, bool is_segment_start, ExceptionStateSet *states, - bool own_states) const + bool own_states) { Tag probe(0, tr->index(), path_ap->index(), clk_info, is_clk, input_delay, is_segment_start, states, false, this); diff --git a/search/Search.hh b/search/Search.hh index 9fd7a114..2a0dd07b 100644 --- a/search/Search.hh +++ b/search/Search.hh @@ -295,7 +295,7 @@ public: InputDelay *input_delay, bool is_segment_start, ExceptionStateSet *states, - bool own_states) const; + bool own_states); void reportTags() const; void reportClkInfos() const; virtual ClkInfo *findClkInfo(ClockEdge *clk_edge, @@ -557,24 +557,24 @@ protected: SlackSeq tns_; // Indexed by path_ap->index(). VertexSlackMapSeq tns_slacks_; - mutable Mutex tns_lock_; + Mutex tns_lock_; // Indexed by path_ap->index(). WorstSlacks *worst_slacks_; // Use pointer to clk_info set so Tag.hh does not need to be included. ClkInfoSet *clk_info_set_; Mutex clk_info_lock_; // Use pointer to tag set so Tag.hh does not need to be included. - mutable TagHashSet *tag_set_; + TagHashSet *tag_set_; // Entries in tags_ may be missing where previous filter tags were deleted. - mutable TagIndex tag_capacity_; - mutable Tag **tags_; - mutable TagIndex tag_count_; - mutable Mutex tag_lock_; - mutable TagGroupSet *tag_group_set_; - mutable TagGroup **tag_groups_; - mutable TagGroupIndex tag_group_count_; + TagIndex tag_capacity_; + Tag **tags_; + TagIndex tag_count_; + Mutex tag_lock_; + TagGroupSet *tag_group_set_; + TagGroup **tag_groups_; + TagGroupIndex tag_group_count_; // Capacity of tag_groups_. - mutable TagGroupIndex tag_group_capacity_; + TagGroupIndex tag_group_capacity_; Mutex tag_group_lock_; // Latches data outputs to queue on the next search pass. VertexSet pending_latch_outputs_; diff --git a/search/Sim.cc b/search/Sim.cc index cd34410f..1800cb85 100644 --- a/search/Sim.cc +++ b/search/Sim.cc @@ -15,6 +15,7 @@ // along with this program. If not, see . #include "Machine.hh" +#include "StaConfig.hh" // CUDD #include "Error.hh" #include "Debug.hh" #include "Report.hh" @@ -29,7 +30,7 @@ #include "Graph.hh" #include "Sim.hh" -#ifdef CUDD +#if CUDD #include "cudd.h" #endif // CUDD @@ -39,7 +40,7 @@ static Pin * findDrvrPin(const Pin *pin, Network *network); -#ifdef CUDD +#if CUDD Sim::Sim(StaState *sta) : StaState(sta), @@ -55,11 +56,6 @@ Sim::Sim(StaState *sta) : Sim::~Sim() { delete observer_; - BddSymbolTable::Iterator sym_iter(symtab_); - while (sym_iter.hasNext()) { - DdNode *sym_node = sym_iter.next(); - Cudd_RecursiveDeref(cudd_manager_, sym_node); - } if (Cudd_CheckZeroRef(cudd_manager_) > 0) internalErrorNoThrow("non-zero cudd reference counts"); Cudd_Quit(cudd_manager_); @@ -83,6 +79,7 @@ Sim::functionSense(const FuncExpr *expr, bool decreasing = (Cudd_Decreasing(cudd_manager_, bdd, input_index) == Cudd_ReadOne(cudd_manager_)); Cudd_RecursiveDeref(cudd_manager_, bdd); + clearSymtab(); cudd_lock_.unlock(); TimingSense sense; if (increasing && decreasing) @@ -97,6 +94,17 @@ Sim::functionSense(const FuncExpr *expr, return sense; } +void +Sim::clearSymtab() const +{ + BddSymbolTable::Iterator sym_iter(symtab_); + while (sym_iter.hasNext()) { + DdNode *sym_node = sym_iter.next(); + Cudd_RecursiveDeref(cudd_manager_, sym_node); + } + symtab_.clear(); +} + LogicValue Sim::evalExpr(const FuncExpr *expr, const Instance *inst) const @@ -108,8 +116,10 @@ Sim::evalExpr(const FuncExpr *expr, value = logic_zero; else if (bdd == Cudd_ReadOne(cudd_manager_)) value = logic_one; - if (bdd) + if (bdd) { Cudd_RecursiveDeref(cudd_manager_, bdd); + clearSymtab(); + } cudd_lock_.unlock(); return value; } diff --git a/search/Sim.hh b/search/Sim.hh index e7440cff..c4203b70 100644 --- a/search/Sim.hh +++ b/search/Sim.hh @@ -18,7 +18,7 @@ #define STA_SIM_H #include -#include "config.h" // CUDD +#include "StaConfig.hh" // CUDD #include "DisallowCopyAssign.hh" #include "Map.hh" #include "Mutex.hh" @@ -131,6 +131,7 @@ protected: DdNode *funcBdd(const FuncExpr *expr, const Instance *inst) const; DdNode *ensureNode(LibertyPort *port) const; + void clearSymtab() const; DdManager *cudd_manager_; mutable BddSymbolTable symtab_; diff --git a/search/Sta.cc b/search/Sta.cc index b478dd8e..768b7f9f 100644 --- a/search/Sta.cc +++ b/search/Sta.cc @@ -852,16 +852,17 @@ Sta::setInputSlew(Port *port, } void -Sta::setDriveCell(Port *port, +Sta::setDriveCell(LibertyLibrary *library, LibertyCell *cell, + Port *port, LibertyPort *from_port, float *from_slews, LibertyPort *to_port, const TransRiseFallBoth *tr, const MinMaxAll *min_max) { - sdc_->setDriveCell(port, cell, from_port, from_slews, to_port, - tr, min_max); + sdc_->setDriveCell(library, cell, port, from_port, from_slews, to_port, + tr, min_max); delaysInvalidFrom(port); } @@ -2076,12 +2077,12 @@ Sta::constraintsChanged() void Sta::writeSdc(const char *filename, - bool native, + bool compatible, bool no_timestamp, int digits) { sta::writeSdc(network_->topInstance(), filename, "write_sdc", - native, no_timestamp, digits, sdc_); + compatible, no_timestamp, digits, sdc_); } //////////////////////////////////////////////////////////////// diff --git a/search/Sta.hh b/search/Sta.hh index ae3ec1b1..e8ce25d4 100644 --- a/search/Sta.hh +++ b/search/Sta.hh @@ -204,8 +204,9 @@ public: void setResistance(Net *net, const MinMaxAll *min_max, float res); - void setDriveCell(Port *port, + void setDriveCell(LibertyLibrary *library, LibertyCell *cell, + Port *port, LibertyPort *from_port, float *from_slews, LibertyPort *to_port, diff --git a/tcl/Cmds.tcl b/tcl/Cmds.tcl index 91591b62..fce22f69 100644 --- a/tcl/Cmds.tcl +++ b/tcl/Cmds.tcl @@ -100,7 +100,7 @@ proc delete_objects_from_list_cmd { list objects } { } elseif {$list_type == "LibertyPort"} { set obj [get_lib_pins $obj] } else { - sta_error "remove_from_collection unsupported object type $list_type." + sta_error "unsupported object type $list_type." } } set index [lsearch $list $obj] @@ -1955,7 +1955,7 @@ proc write_path_spice { args } { sta_error "No -lib_subckt_file specified.\n" } - if { [info exists keys(-lib_subckt_file)] } { + if { [info exists keys(-model_file)] } { set model_file [file_expand_tilde $keys(-model_file)] if { ![file readable $model_file] } { sta_error "-model_file $model_file is not readable.\n" diff --git a/tcl/Power.tcl b/tcl/Power.tcl index df04e94c..0c01d0f0 100644 --- a/tcl/Power.tcl +++ b/tcl/Power.tcl @@ -24,7 +24,7 @@ namespace eval sta { define_cmd_args "report_power" \ { [-instances instances]\ - [-corner corner_name]]\ + [-corner corner_name]\ [-digits digits]\ [> filename] [>> filename] } diff --git a/tcl/Sdc.tcl b/tcl/Sdc.tcl index 98960e88..2279f801 100644 --- a/tcl/Sdc.tcl +++ b/tcl/Sdc.tcl @@ -127,7 +127,7 @@ define_cmd_args "write_sdc" \ proc write_sdc { args } { parse_key_args "write_sdc" args keys {-digits -significant_digits} \ - flags {-native -no_timestamp} + flags {-compatible -no_timestamp} check_argc_eq1 "write_sdc" $args set digits 4 @@ -141,8 +141,8 @@ proc write_sdc { args } { set filename [file nativename [lindex $args 0]] set no_timestamp [info exists flags(-no_timestamp)] - set native [info exists flags(-native)] - write_sdc_cmd $filename $native $no_timestamp $digits + set compatible [info exists flags(-native)] + write_sdc_cmd $filename $compatible $no_timestamp $digits } ################################################################ @@ -2223,21 +2223,22 @@ proc set_driving_cell { args } { set min_max [parse_min_max_all_flags flags] # -cell is an undocumented non-sdc alias for -lib_cell. - if [info exists keys(-cell)] { + if { [info exists keys(-cell)] } { set keys(-lib_cell) $keys(-cell) } - if [info exists keys(-lib_cell)] { + if { [info exists keys(-lib_cell)] } { set cell_name $keys(-lib_cell) - if [info exists keys(-library)] { - set liberty [get_liberty_error "library" $keys(-library)] - set liberty_cell [$liberty find_liberty_cell $cell_name] - if { $liberty_cell == "NULL" } { + if { [info exists keys(-library)] } { + set library [get_liberty_error "library" $keys(-library)] + set cell [$library find_liberty_cell $cell_name] + if { $cell == "NULL" } { sta_error "cell '$lib_name:$cell_name' not found." } } else { - set liberty_cell [find_liberty_cell $cell_name] - if { $liberty_cell == "NULL" } { + set library "NULL" + set cell [find_liberty_cell $cell_name] + if { $cell == "NULL" } { sta_error "'$cell_name' not found." } } @@ -2248,12 +2249,12 @@ proc set_driving_cell { args } { set to_port "NULL" if [info exists keys(-pin)] { set to_port_name $keys(-pin) - set to_port [$liberty_cell find_liberty_port $to_port_name] + set to_port [$cell find_liberty_port $to_port_name] if { $to_port == "NULL" } { sta_error "port '$to_port_name' not found." } } else { - set port_iter [$liberty_cell liberty_port_iterator] + set port_iter [$cell liberty_port_iterator] set output_count 0 while {[$port_iter has_next]} { set port [$port_iter next] @@ -2275,7 +2276,7 @@ proc set_driving_cell { args } { set from_port "NULL" if [info exists keys(-from_pin)] { set from_port_name $keys(-from_pin) - set from_port [$liberty_cell find_liberty_port $from_port_name] + set from_port [$cell find_liberty_port $from_port_name] if { $from_port == "NULL" } { sta_error "port '$from_port_name' not found." } @@ -2308,7 +2309,7 @@ proc set_driving_cell { args } { set ports [get_ports_error "ports" [lindex $args 0]] foreach port $ports { - set_drive_cell_cmd $port $liberty_cell $from_port \ + set_drive_cell_cmd $library $cell $port $from_port \ $from_slew_rise $from_slew_fall $to_port $tr $min_max } } diff --git a/tcl/Search.tcl b/tcl/Search.tcl index 001c3074..94ad5fb3 100644 --- a/tcl/Search.tcl +++ b/tcl/Search.tcl @@ -213,6 +213,7 @@ proc parse_rise_fall_arg { arg } { proc parse_report_path_options { cmd args_var default_format unknown_key_is_error } { variable path_options + variable report_path_field_width_extra global sta_report_default_digits upvar 1 $args_var args @@ -242,6 +243,11 @@ proc parse_report_path_options { cmd args_var default_format } set path_options(num_fmt) "%.${digits}f" set_report_path_digits $digits + # Numberic field width expands with digits. + set field_width [expr $digits + $report_path_field_width_extra] + foreach field {total incr capacitance slew} { + set_report_path_field_width $field $field_width + } if { [info exists path_options(-fields)] } { set fields $path_options(-fields) diff --git a/tcl/Sta.tcl b/tcl/Sta.tcl index a9d7d671..7c4a05b6 100644 --- a/tcl/Sta.tcl +++ b/tcl/Sta.tcl @@ -35,17 +35,20 @@ proc define_sta_cmds {} { } proc define_report_path_fields {} { + variable report_path_field_width_extra + set_rise_fall_short_names "^" "v" set_report_path_field_order { fanout capacitance slew \ incr total edge case description } - set_report_path_field_properties "description" "Description" 36 1 - set_report_path_field_properties "total" "Time" 10 0 - set_report_path_field_properties "incr" "Delay" 10 0 - set_report_path_field_properties "capacitance" "Cap" 10 0 - set_report_path_field_properties "slew" "Slew" 10 0 - set_report_path_field_properties "fanout" "Fanout" 10 0 + set_report_path_field_properties "description" "Deescription" 36 1 + set width $report_path_field_width_extra + set_report_path_field_properties "total" "Time" $width 0 + set_report_path_field_properties "incr" "Delay" $width 0 + set_report_path_field_properties "capacitance" "Cap" $width 0 + set_report_path_field_properties "slew" "Slew" $width 0 + set_report_path_field_properties "fanout" "Fanout" 5 0 set_report_path_field_properties "edge" "" 1 0 - set_report_path_field_properties "case" "" 10 0 + set_report_path_field_properties "case" "" 11 0 } ################################################################ @@ -415,7 +418,7 @@ proc_redirect report_check_types { set path_min_max "min" } if { $all_violators } { - set group_count $sta::int_max + set group_count $sta::group_count_max set slack_min [expr -$sta::float_inf] set slack_max 0.0 } else { @@ -772,9 +775,9 @@ proc set_assigned_transition { args } { # ################################################################ -define_sta_cmd_args "delete_objects_from_list" {list objs} +define_sta_cmd_args "delete_from_list" {list objs} -proc delete_objects_from_list { list objects } { +proc delete_from_list { list objects } { delete_objects_from_list_cmd $list $objects } diff --git a/tcl/StaTcl.i b/tcl/StaTcl.i index dac36b07..a949017b 100644 --- a/tcl/StaTcl.i +++ b/tcl/StaTcl.i @@ -35,7 +35,7 @@ #include #include "Machine.hh" -#include "config.h" // VERSION +#include "StaConfig.hh" // STA_VERSION #include "Stats.hh" #include "Report.hh" #include "Error.hh" @@ -1991,12 +1991,12 @@ private: %inline %{ float float_inf = INF; -int int_max = std::numeric_limits::max(); + int group_count_max = PathGroup::group_count_max; const char * version() { - return VERSION; + return STA_VERSION; } void @@ -3512,8 +3512,9 @@ set_input_slew_cmd(Port *port, } void -set_drive_cell_cmd(Port *port, +set_drive_cell_cmd(LibertyLibrary *library, LibertyCell *cell, + Port *port, LibertyPort *from_port, float from_slew_rise, float from_slew_fall, @@ -3524,7 +3525,7 @@ set_drive_cell_cmd(Port *port, float from_slews[TransRiseFall::index_count]; from_slews[TransRiseFall::riseIndex()] = from_slew_rise; from_slews[TransRiseFall::fallIndex()] = from_slew_fall; - Sta::sta()->setDriveCell(port, cell, from_port, from_slews, + Sta::sta()->setDriveCell(library, cell, port, from_port, from_slews, to_port, tr, min_max); } @@ -4249,6 +4250,18 @@ set_report_path_field_properties(const char *field_name, sta->report()->print("Error: unknown report path field %s\n", field_name); } +void +set_report_path_field_width(const char *field_name, + int width) +{ + Sta *sta = Sta::sta(); + ReportField *field = sta->findReportPathField(field_name); + if (field) + field->setWidth(width); + else + sta->report()->print("Error: unknown report path field %s\n", field_name); +} + void set_report_path_digits(int digits) { @@ -4639,12 +4652,12 @@ disabled_edges_sorted() void write_sdc_cmd(const char *filename, - bool native, + bool compatible, bool no_timestamp, int digits) { cmdLinkedNetwork(); - Sta::sta()->writeSdc(filename, native, no_timestamp, digits); + Sta::sta()->writeSdc(filename, compatible, no_timestamp, digits); } void diff --git a/tcl/Variables.tcl b/tcl/Variables.tcl index 2ae57454..46facd26 100644 --- a/tcl/Variables.tcl +++ b/tcl/Variables.tcl @@ -168,6 +168,9 @@ proc trace_pocv_enabled { name1 name2 op } { pocv_enabled set_pocv_enabled } +# Report path numeric field width is digits + extra. +set report_path_field_width_extra 5 + ################################################################ proc trace_boolean_var { op var_name get_proc set_proc } { diff --git a/util/Machine.cc b/util/Machine.cc index f8391f9d..167248e4 100644 --- a/util/Machine.cc +++ b/util/Machine.cc @@ -19,7 +19,7 @@ #include #include // GetSystemInfo #include "Machine.hh" -#include "config.h" +#include "StaConfig.hh" namespace sta { @@ -95,7 +95,7 @@ memoryUsage() #include #include #include "Machine.hh" -#include "config.h" +#include "StaConfig.hh" #include "StringUtil.hh" namespace sta { diff --git a/util/Pthread.cc b/util/Pthread.cc index 365bf4cb..972254bd 100644 --- a/util/Pthread.cc +++ b/util/Pthread.cc @@ -14,9 +14,9 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -#include "config.h" +#include "StaConfig.hh" -#if !HAVE_PTHREAD_H +#if !PTHREADS #include "Pthread.hh" diff --git a/util/Pthread.hh b/util/Pthread.hh index 91127107..a7de84c5 100644 --- a/util/Pthread.hh +++ b/util/Pthread.hh @@ -17,9 +17,9 @@ #ifndef STA_PTHREAD_H #define STA_PTHREAD_H -#include "config.h" +#include "StaConfig.hh" -#if HAVE_PTHREAD_H +#if PTHREADS #include #define STA_PTHREAD_SCOPE_SYSTEM PTHREAD_SCOPE_SYSTEM #else @@ -88,5 +88,5 @@ int pthread_rwlock_unlock(pthread_rwlock_t *); } // namespace -#endif // HAVE_PTHREAD_H +#endif // PTHREAD #endif // STA_PTHREAD_H diff --git a/util/StaConfig.hh.cmake b/util/StaConfig.hh.cmake new file mode 100644 index 00000000..1a343a36 --- /dev/null +++ b/util/StaConfig.hh.cmake @@ -0,0 +1,9 @@ +#define STA_VERSION "${STA_VERSION}" + +#define PTHREADS ${PTHREADS} + +#define ZLIB ${ZLIB} + +#define CUDD ${CUDD} + +#define SSTA ${SSTA} diff --git a/util/ThreadForEach.hh b/util/ThreadForEach.hh index 5b202ed9..5feca83d 100644 --- a/util/ThreadForEach.hh +++ b/util/ThreadForEach.hh @@ -27,7 +27,9 @@ template class ForEachArg { public: ForEachArg() {} - ForEachArg(Iterator *iter, Mutex *lock, Func *func) : + ForEachArg(Iterator *iter, + Mutex *lock, + Func *func) : iter_(iter), lock_(lock), func_(func) @@ -64,7 +66,9 @@ forEachBegin(void *arg) // Parallel version of STL for_each. template void -forEach(Iterator *iter, Func *func, int thread_count) +forEach(Iterator *iter, + Func *func, + int thread_count) { if (thread_count <= 1) { while (iter->hasNext()) @@ -90,7 +94,9 @@ forEach(Iterator *iter, Func *func, int thread_count) // Func::copy() must be defined. template void -forEach2(Iterator *iter, Func *func, int thread_count) +forEach2(Iterator *iter, + Func *func, + int thread_count) { if (thread_count <= 1) { while (iter->hasNext()) diff --git a/util/Zlib.hh b/util/Zlib.hh index 590b38bf..3cf446fb 100644 --- a/util/Zlib.hh +++ b/util/Zlib.hh @@ -20,9 +20,9 @@ // The zlib package is optional. // Define stdio based macros if it is missing. -#include "config.h" // ZLIB +#include "StaConfig.hh" // ZLIB -#ifdef ZLIB +#if ZLIB #include