This repository has been archived by the owner on Mar 18, 2021. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
mgwoo
committed
Sep 30, 2018
0 parents
commit 97a4e29
Showing
30 changed files
with
48,830 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
src/*.o | ||
src/make.log | ||
src/sizer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "module/OpenSTA"] | ||
path = module/OpenSTA | ||
url = https://github.com/abk-openroad/OpenSTA |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
BSD 3-Clause License | ||
|
||
Copyright (c) 2018, The Regents of the University of California | ||
All rights reserved. | ||
|
||
Redistribution and use in source and binary forms, with or without | ||
modification, are permitted provided that the following conditions are met: | ||
|
||
* Redistributions of source code must retain the above copyright notice, this | ||
list of conditions and the following disclaimer. | ||
|
||
* Redistributions in binary form must reproduce the above copyright notice, | ||
this list of conditions and the following disclaimer in the documentation | ||
and/or other materials provided with the distribution. | ||
|
||
* Neither the name of the copyright holder nor the names of its | ||
contributors may be used to endorse or promote products derived from | ||
this software without specific prior written permission. | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE | ||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | ||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | ||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, | ||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
OPENSTADIR = module/OpenSTA | ||
SIZERDIR = src | ||
|
||
all: sta | ||
$(MAKE) -C $(SIZERDIR); | ||
|
||
sta: | ||
cd $(OPENSTADIR) && mkdir -p install-sp && ./bootstrap && ./configure --prefix=$(CURDIR)/$(OPENSTADIR)/install-sp && $(MAKE) install; | ||
|
||
|
||
clean: | ||
cd $(OPENSTADIR) && $(MAKE) distclean && rm -rf install-sp; | ||
$(MAKE) -C $(SIZERDIR) clean; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# TritonSizer | ||
UCSD Sizer | ||
|
||
### Pre-requisite | ||
* OpenSTA API | ||
|
||
### How To Compile | ||
$ git clone --recursive https://github.com/abk-openroad/TritonSizer.git | ||
|
||
Then, modify the \_\_ZLIB_HOME\_\_ and \_\_OPENSTA_HOME\_\_ to the corresponding install paths in [src/Makefile](src/Makefile) | ||
|
||
$ cd ~/TritonSizer | ||
$ make clean | ||
$ make | ||
|
||
### How To Execute | ||
|
||
$ sizer -env <environment file> -f <command file> | tee log | ||
|
||
//<environment file> is used to set environment variables and library information. <command file> contains information for input/output files and command options. | ||
|
||
### Manual | ||
* doc/TritonSizer-UserGuide-v0.1.pdf | ||
|
||
### 3-party module | ||
* Tcl v8.4.20 | ||
* zlib v1.2.3 | ||
* OpenSTA API | ||
|
||
### License | ||
* BSD-3-clause License | ||
|
||
### Authors | ||
- Hyein Lee and Dr. Jiajia Li (Ph.D. advisors: Prof. Andrew B. Kahng) | ||
- Many subsequent improvements were made by Minsoo Kim leading up to the initial release. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# TODO to improve TritonSizer code quality | ||
|
||
## For better readability | ||
- Factor out the codes. There are many duplicated codes. Try to keep APIs to have | ||
< 30 lines (so that it can be visible in one page) | ||
|
||
- Align the column. Keep 80 column line-break rule. | ||
|
||
e.g.) | ||
|
||
s = 1; | ||
xxxxxxx = 2; | ||
|
||
functionA(xxxxxxxxxxxxxxxx, yyyyyyyyyyyyyy, zzzzzzzzzzzzzzzzzzzzzzzzz, | ||
tt, uuuuuuuuuuuuu, vvvvvvvvvvvvvvvvvvvvvvvv, | ||
wwwwwwwwwwwwwwwwwwww, kkkk); | ||
|
||
- You can easily change your code-format by typing a below command | ||
|
||
$ clang-format -i XXX.cpp | ||
- Make sure that use the setting in [src/.clang-format](src/.clang-format) | ||
|
||
## Functionality | ||
- It would be better to support user-defined signoff tools. Currently PT, Tempus | ||
commands are hard-coded in TBC. | ||
- It would be better to improve UI / log messages. Current log messages might be too | ||
verbose. | ||
|
||
## Code structure / ETC | ||
- Encapsulate codes. Don't make everything public. Alway use static if possible. | ||
- Try to avoid global variables | ||
- Using assert is sometimes useful to debug. |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
BasedOnStyle: Google | ||
IndentWidth: 4 | ||
AllowShortFunctionsOnASingleLine: false | ||
AllowShortIfStatementsOnASingleLine: false | ||
AllowShortLoopsOnASingleLine: false | ||
SpaceBeforeAssignmentOperators: true | ||
SpacesInAngles: true | ||
SpacesInParentheses: false | ||
SpaceBeforeParens: Never | ||
BreakBeforeBraces: Custom | ||
BraceWrapping: | ||
IndentBraces: false | ||
AfterNamespace: false | ||
AfterClass: false | ||
AfterControlStatement: false | ||
AfterEnum: false | ||
AfterFunction: false | ||
AfterStruct: false | ||
AfterUnion: false | ||
BeforeCatch: true | ||
BeforeElse: true | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
# Please set your environment | ||
TCLLIB = -L __YOUR_TCL8.4_HOME__/lib -ltcl8.4 | ||
ZLIB_HOME = __YOUR_ZLIB_HOME__/lib | ||
|
||
# Below references submodule | ||
OPENSTA_HOME = ../module/OpenSTA | ||
OPENSTALIB_HOME = ../module/OpenSTA/install-sp | ||
|
||
|
||
SUFFIX = cpp | ||
GCC = g++ | ||
|
||
OFLAGS = -Wall -fomit-frame-pointer -funroll-all-loops -m64 -fprefetch-loop-arrays -ffast-math | ||
|
||
ZLIB = -lz | ||
|
||
OPENSTALIB = -Wl,--start-group $(OPENSTALIB_HOME)/lib/libliberty.a \ | ||
$(OPENSTALIB_HOME)/lib/libutil.a \ | ||
$(OPENSTALIB_HOME)/lib/libsearch.a \ | ||
$(OPENSTALIB_HOME)/lib/libdcalc.a \ | ||
$(OPENSTALIB_HOME)/lib/libgraph.a \ | ||
$(OPENSTALIB_HOME)/lib/libnetwork.a \ | ||
$(OPENSTALIB_HOME)/lib/libparasitics.a \ | ||
$(OPENSTALIB_HOME)/lib/libsdc.a \ | ||
$(OPENSTALIB_HOME)/lib/libsdf.a \ | ||
$(OPENSTALIB_HOME)/lib/libverilog.a \ | ||
-Wl,--end-group | ||
|
||
|
||
IFLAG = -I. -I$(ZLIB_HOME)/../include -I$(OPENSTALIB_HOME)/include | ||
LINK = | ||
LFLAG = -fPIC $(LINK) $(TCLLIB) \ | ||
$(OPENSTA_HOME)/app/StaApp_wrap.o \ | ||
$(OPENSTA_HOME)/app/StaMain.o \ | ||
$(OPENSTA_HOME)/app/TclInitVar.o \ | ||
$(OPENSTALIB) -L$(ZLIB_HOME) $(ZLIB) \ | ||
-lm -lpthread -ldl -Wl,-R/liab | ||
BINPATH = . | ||
OBJPATH = . | ||
|
||
SOURCES = $(wildcard *.$(SUFFIX)) | ||
OBJECTS = $(SOURCES:%.$(SUFFIX)=$(OBJPATH)/%.o) | ||
HEADERS = $(wildcard ./*.h) | ||
CFLAGS = $(OFLAG) $(IFLAG) -c -std=c++14 -fPIC -Wno-deprecated -g -gstrict-dwarf $(DBG) -Wunused -fpermissive | ||
|
||
TARGET = $(BINPATH)/sizer$(EXPER) | ||
|
||
$(TARGET):$(OBJECTS) | ||
$(PY) $(GCC) -o $(TARGET) $(IFLAG) \ | ||
$(OBJECTS) \ | ||
$(LFLAG) \ | ||
-g -gstrict-dwarf | ||
|
||
# Compile the application code | ||
$(OBJPATH)/%.o: %.$(SUFFIX) $(HEADERS) | ||
$(PY) $(GCC) -o $@ $(CFLAGS) $< | ||
.KEEP_STATE: | ||
test: | ||
@echo "Test ... " | ||
@echo "Match! :-)" | ||
@echo "Not match! :-(" | ||
clean: | ||
@echo "Now Removing ..." | ||
@-rm -rf $(OBJECTS) | ||
@echo "Done!" | ||
profile: | ||
@$(MAKE) -f makefile DBG="" | ||
debug: | ||
@$(MAKE) -f makefile DBG="-g" | ||
opt: | ||
@$(MAKE) -f makefile DBG="-O3" | ||
release: | ||
@$(MAKE) -f makefile LINK="-static-libstdc++" |
Oops, something went wrong.