Skip to content

Commit

Permalink
Adding ISPD18 related stuff.
Browse files Browse the repository at this point in the history
  • Loading branch information
gaflach committed Dec 26, 2017
1 parent dfbd880 commit fffa3ba
Show file tree
Hide file tree
Showing 48 changed files with 12,278 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ispd18/.gitignore
@@ -0,0 +1,7 @@
build

ide/netbeans/*
ide/netbeans/nbproject/private
!ide/netbeans/nbproject/
!ide/netbeans/Makefile

141 changes: 141 additions & 0 deletions ispd18/CMakeLists.txt
@@ -0,0 +1,141 @@
# Rsyn
# CMake Examples: https://github.com/ttroy50/cmake-examples

#########
# Setup #
#########

# Specify the minimum version for CMake
cmake_minimum_required(VERSION 3.1)

# Message
message(STATUS "Rsyn")
message(STATUS ${CMAKE_CURRENT_SOURCE_DIR})

# Find includes in the build directories
set(CMAKE_INCLUDE_CURRENT_DIR ON)

# Turn on automatic invocation of the MOC
set(CMAKE_AUTOMOC ON)

# Project's name
project(rsyn)

if (${CMAKE_SYSTEM_NAME} MATCHES "Windows")
set(WINDOWS TRUE)
elseif (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
set(LINUX TRUE)
elseif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
set(MACOSX TRUE)
endif()

# Set the output folder where your program will be created
set(CMAKE_BINARY_DIR bin)
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR})
set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR})

set(CMAKE_CXX_STANDARD 11)

set(PATH_RSYN ${CMAKE_CURRENT_SOURCE_DIR}/../rsyn)
set(PATH_ISPD18 ${CMAKE_CURRENT_SOURCE_DIR})

######################
# Check Dependencies #
######################
find_package(Boost COMPONENTS system filesystem program_options REQUIRED)
find_package(OpenGL REQUIRED)
find_package(GLEW REQUIRED)
find_package(wxWidgets COMPONENTS core base gl propgrid REQUIRED)
find_package(PNG REQUIRED)

# OpenMP (not working)
#find_package(OpenMP)
#if(OPENMP_FOUND)
# set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
# set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}")
#endif()

# OpenMP (work around)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fopenmp")

###############
# Source Code #
###############
file(GLOB_RECURSE SRC_FILES_RSYN
${PATH_RSYN}/src/*.cpp
${PATH_RSYN}/src/*.cc
${PATH_RSYN}/src/*.c)

file(GLOB_RECURSE SRC_FILES_ISPD18
${PATH_ISPD18}/src/*.cpp
${PATH_ISPD18}/src/*.cc
${PATH_ISPD18}/src/*.c)

set(SRC_FILES ${SRC_FILES_RSYN} ${SRC_FILES_ISPD18})

#################
# Library Paths #
#################
# Need to come before target is created.

if(LINUX)
link_directories(${PATH_RSYN}/lib/linux)
link_directories(${PATH_ISPD18}/lib/linux)
endif()

if(MACOSX)
link_directories(${PATH_RSYN}/lib/macosx)
link_directories(${PATH_ISPD18}/lib/macosx)
endif()

###########
# Targets #
###########

add_executable(rsyn ${SRC_FILES})

#######################
# Include Directories #
#######################

target_include_directories(rsyn PUBLIC "${PATH_RSYN}/src")
target_include_directories(rsyn PUBLIC "${PATH_RSYN}/include")
target_include_directories(rsyn PUBLIC "${PATH_ISPD18}/src")
target_include_directories(rsyn PUBLIC "${PATH_ISPD18}/include")

##################
# Compiler Flags #
##################

target_compile_options(rsyn PUBLIC "-O3")
target_compile_options(rsyn PUBLIC "-Wno-unused-result -Wno-format -Wno-return-type -Wno-unused-local-typedefs")

#################
# Linker Flags #
#################

target_link_libraries(rsyn lef)
target_link_libraries(rsyn def)

# OpenGL
include_directories(${OPENGL_INCLUDE_DIR})
target_link_libraries(rsyn ${OPENGL_gl_LIBRARY})
target_link_libraries(rsyn ${OPENGL_glu_LIBRARY})

# GLEW
target_include_directories(rsyn PUBLIC ${GLEW_INCLUDE_DIRS})
target_link_libraries(rsyn ${GLEW_LIBRARIES})

# wxWidgets
include(${wxWidgets_USE_FILE})
target_link_libraries(rsyn ${wxWidgets_LIBRARIES})

# Boost
target_include_directories(rsyn PUBLIC ${Boost_INCLUDE_DIR})
target_link_libraries(rsyn ${Boost_LIBRARIES})

# PNG
target_include_directories(rsyn PUBLIC ${PNG_INCLUDE_DIR})
target_link_libraries(rsyn ${PNG_LIBRARY})

33 changes: 33 additions & 0 deletions ispd18/README.md
@@ -0,0 +1,33 @@
Rsyn ISPD18 - Detailed Routing Contest
======================================

In this page you find instruction on how to use Rsyn for ISPD18 Detailed Routing Contest.

## Getting Rsyn's Source Code

git clone https://github.com/rsyn/rsyn-x.git

## Compiling Rsyn using Cmake

cd rsyn-x/ispd18
mkdir build
cd build
cmake ..
make -j 4

## NetBeans

Open the project at rsyn-x/ispd18/ide/netbeans.

**Configure NetBeans to use multi-threading compilation:**
Tools -> Options -> C/C++ -> Project Options
Type "-j 4" in "Make Options".

## Opening a Benchmark using Rsyn

./rsyn -gui
Ctrl+R
rsyn-x/ispd18/sample/ispd18_sample/ispd18_sample.rsyn

#![Rsyn]()

1 change: 1 addition & 0 deletions ispd18/bin/ICCAD15.parm
1 change: 1 addition & 0 deletions ispd18/bin/Makefile
1 change: 1 addition & 0 deletions ispd18/bin/PORT9.dat
1 change: 1 addition & 0 deletions ispd18/bin/POWV9.dat
1 change: 1 addition & 0 deletions ispd18/bin/comp.sh
15 changes: 15 additions & 0 deletions ispd18/bin/report-uplace.sh
@@ -0,0 +1,15 @@
#!/bin/sh

if [ -z "$1" ]; then
echo "Usage: report-uplace.sh <log file>"
exit
fi

grep "Final Result: superblue" $1 | awk '{printf ("%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\n", $3, $10, $12, $6, $7, $8, $9, $11)}' > _results
grep "Flow: ISPD 2016... Done" $1 | awk '{print $6}' > _runtime

echo "Benchmark ABU StWL eWNS eTNS lWNS lTNS QS Runtime"
paste _results _runtime

rm _results
rm _runtime
23 changes: 23 additions & 0 deletions ispd18/bin/report.sh
@@ -0,0 +1,23 @@
#!/bin/sh

if [ -z "$1" ]; then
echo "Usage: runall-report.sh <log file>"
exit
fi

grep " benchmark name : " $1 | awk '{print $4}' > _bench
grep " ABU penalty : " $1 | awk '{print $4}' > _abu
grep " HPWL, StWL (um) : " $1 | awk '{print $6}' > _stwl
grep " early WNS, TNS : " $1 | awk '{print $5 $6}' | awk -F , '{printf("%s\t%s\n", $1, $2)}' > _early
grep " late WNS, TNS : " $1 | awk '{print $5 $6}' | awk -F , '{printf("%s\t%s\n", $1, $2)}' > _late
grep "Running ICCAD 15 Mode... Done" $1 | awk '{print $7}' > _runtime

echo "Benchmark ABU StWL eWNS eTNS lWNS lTNS Runtime"
paste _bench _abu _stwl _early _late _runtime

rm _bench
rm _abu
rm _stwl
rm _early
rm _late
rm _runtime
1 change: 1 addition & 0 deletions ispd18/bin/run.mk
72 changes: 72 additions & 0 deletions ispd18/bin/runall-long.sh
@@ -0,0 +1,72 @@
#!/bin/sh

#Path to directory of Rsyn scripts
RSYN_SCRIPT_DIR=$1
EVAL_DIR="../misc/iccad2015_evaluate_solution_0831/"
BIN_DIR="../../bin"

echo "Directory of Rsyn Scripts: ${RSYN_SCRIPT_DIR}"

echo "###################################################################"
echo "# SUPERBLUE1 LONG DISPLACEMENT #"
echo "###################################################################"
make rscript script=${RSYN_SCRIPT_DIR}/superblue1-long.rsyn
cd $EVAL_DIR
make riccad15 dsg=superblue1 ut=0.80
cd $BIN_DIR

echo "###################################################################"
echo "# SUPERBLUE3 LONG DISPLACEMENT #"
echo "###################################################################"
make rscript script=${RSYN_SCRIPT_DIR}/superblue3-long.rsyn
cd $EVAL_DIR
make riccad15 dsg=superblue3 ut=0.87
cd $BIN_DIR

echo "###################################################################"
echo "# SUPERBLUE4 LONG DISPLACEMENT #"
echo "###################################################################"
make rscript script=${RSYN_SCRIPT_DIR}/superblue4-long.rsyn
cd $EVAL_DIR
make riccad15 dsg=superblue4 ut=0.90
cd $BIN_DIR

echo "###################################################################"
echo "# SUPERBLUE5 LONG DISPLACEMENT #"
echo "###################################################################"
make rscript script=${RSYN_SCRIPT_DIR}/superblue5-long.rsyn
cd $EVAL_DIR
make riccad15 dsg=superblue5 ut=0.85
cd $BIN_DIR

echo "###################################################################"
echo "# SUPERBLUE7 LONG DISPLACEMENT #"
echo "###################################################################"
make rscript script=${RSYN_SCRIPT_DIR}/superblue7-long.rsyn
cd $EVAL_DIR
make riccad15 dsg=superblue7 ut=0.90
cd $BIN_DIR

echo "###################################################################"
echo "# SUPERBLUE10 LONG DISPLACEMENT #"
echo "###################################################################"
make rscript script=${RSYN_SCRIPT_DIR}/superblue10-long.rsyn
cd $EVAL_DIR
make riccad15 dsg=superblue10 ut=0.87
cd $BIN_DIR

echo "###################################################################"
echo "# SUPERBLUE16 LONG DISPLACEMENT #"
echo "###################################################################"
make rscript script=${RSYN_SCRIPT_DIR}/superblue16-long.rsyn
cd $EVAL_DIR
make riccad15 dsg=superblue16 ut=0.85
cd $BIN_DIR

echo "###################################################################"
echo "# SUPERBLUE18 LONG DISPLACEMENT #"
echo "###################################################################"
make rscript script=${RSYN_SCRIPT_DIR}/superblue18-long.rsyn
cd $EVAL_DIR
make riccad15 dsg=superblue18 ut=0.85
cd $BIN_DIR
73 changes: 73 additions & 0 deletions ispd18/bin/runall-short.sh
@@ -0,0 +1,73 @@
#!/bin/sh

#Path to directory of Rsyn scripts
RSYN_SCRIPT_DIR=$1
EVAL_DIR="../misc/iccad2015_evaluate_solution_0831/"
BIN_DIR="../../bin"

echo "Directory of Rsyn Scripts: ${RSYN_SCRIPT_DIR}"

echo "###################################################################"
echo "# SUPERBLUE1 SHORT DISPLACEMENT #"
echo "###################################################################"
make rscript script=${RSYN_SCRIPT_DIR}/superblue1-short.rsyn
cd $EVAL_DIR
make riccad15 dsg=superblue1 ut=0.80
cd $BIN_DIR

echo "###################################################################"
echo "# SUPERBLUE3 SHORT DISPLACEMENT #"
echo "###################################################################"
make rscript script=${RSYN_SCRIPT_DIR}/superblue3-short.rsyn
cd $EVAL_DIR
make riccad15 dsg=superblue3 ut=0.87
cd $BIN_DIR

echo "###################################################################"
echo "# SUPERBLUE4 SHORT DISPLACEMENT #"
echo "###################################################################"
make rscript script=${RSYN_SCRIPT_DIR}/superblue4-short.rsyn
cd $EVAL_DIR
make riccad15 dsg=superblue4 ut=0.90
cd $BIN_DIR

echo "###################################################################"
echo "# SUPERBLUE5 SHORT DISPLACEMENT #"
echo "###################################################################"
make rscript script=${RSYN_SCRIPT_DIR}/superblue5-short.rsyn
cd $EVAL_DIR
make riccad15 dsg=superblue5 ut=0.85
cd $BIN_DIR

echo "###################################################################"
echo "# SUPERBLUE7 SHORT DISPLACEMENT #"
echo "###################################################################"
make rscript script=${RSYN_SCRIPT_DIR}/superblue7-short.rsyn
cd $EVAL_DIR
make riccad15 dsg=superblue7 ut=0.90
cd $BIN_DIR

echo "###################################################################"
echo "# SUPERBLUE10 SHORT DISPLACEMENT #"
echo "###################################################################"
make rscript script=${RSYN_SCRIPT_DIR}/superblue10-short.rsyn
cd $EVAL_DIR
make riccad15 dsg=superblue10 ut=0.87
cd $BIN_DIR

echo "###################################################################"
echo "# SUPERBLUE16 SHORT DISPLACEMENT #"
echo "###################################################################"
make rscript script=${RSYN_SCRIPT_DIR}/superblue16-short.rsyn
cd $EVAL_DIR
make riccad15 dsg=superblue16 ut=0.85
cd $BIN_DIR

echo "###################################################################"
echo "# SUPERBLUE18 SHORT DISPLACEMENT #"
echo "###################################################################"
make rscript script=${RSYN_SCRIPT_DIR}/superblue18-short.rsyn
cd $EVAL_DIR
make riccad15 dsg=superblue18 ut=0.85
cd $BIN_DIR

1 change: 1 addition & 0 deletions ispd18/bin/runall.sh
1 change: 1 addition & 0 deletions ispd18/bin/src/rsyn
1 change: 1 addition & 0 deletions ispd18/bin/src/x

0 comments on commit fffa3ba

Please sign in to comment.