Skip to content

Commit

Permalink
remove fastroute submodule
Browse files Browse the repository at this point in the history
  • Loading branch information
jjcherry56 committed Aug 6, 2020
1 parent 1f6eb44 commit 379f255
Show file tree
Hide file tree
Showing 123 changed files with 541,794 additions and 4 deletions.
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@
[submodule "src/ioPlacer"]
path = src/ioPlacer
url = https://github.com/The-OpenROAD-Project/ioPlacer.git
[submodule "src/FastRoute"]
path = src/FastRoute
url = https://github.com/The-OpenROAD-Project/FastRoute.git
[submodule "src/TritonMacroPlace"]
path = src/TritonMacroPlace
url = https://github.com/The-OpenROAD-Project/TritonMacroPlace.git
Expand Down
1 change: 0 additions & 1 deletion src/FastRoute
Submodule FastRoute deleted from 3b250e
15 changes: 15 additions & 0 deletions src/FastRoute/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
.git
.dockerignore
Dockerfile

# from .gitignore
build
FRlefdef
FlexRoute*
flexroute*
TritonRoute*
*.dat
*.log
*.param
support/ispd18/*
.gdb_history
12 changes: 12 additions & 0 deletions src/FastRoute/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
build
*.dat
*.log
*.param
.gdb_history
nbproject/
test/src/test_*/*.log
test/src/test_*/*.guide
test/src/test_*/*.txt
test/results
*~
TAGS
Empty file added src/FastRoute/.gitmodules
Empty file.
115 changes: 115 additions & 0 deletions src/FastRoute/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
###############################################################################
##
## BSD 3-Clause License
##
## Copyright (c) 2019, University of California, San Diego.
## 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.
##
###############################################################################

cmake_minimum_required(VERSION 3.1)

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)

project(FastRoute)
set(LIB_NAME "FastRoute")

# Print info on build
if( CMAKE_BUILD_TYPE MATCHES "[Dd][Ee][Bb][Uu][Gg]" )
# Tell other CMake files that we're doing a debug build
set(DEBUG_BUILD 1)

# Tell C/C++ that we're doing a debug build
add_definitions(-DDEBUG)
endif()

add_subdirectory(third_party/fastroute)
add_subdirectory(third_party/pdrev)

set(CMAKE_CXX_STANDARD 11)
set(Boost_USE_STATIC_LIBS ON)

# Loads swig and generates the tcl wrapper file
find_package(SWIG REQUIRED)

set(FASTROUTE_WRAP ${CMAKE_CURRENT_BINARY_DIR}/TclInterfaceWrap.cpp)
set(FASTROUTE_TCL_INIT ${CMAKE_CURRENT_BINARY_DIR}/FastrouteTclInitVar.cc)

add_custom_command(OUTPUT ${FASTROUTE_WRAP}
COMMAND ${SWIG_EXECUTABLE} -namespace -prefix FastRoute -tcl8 -c++ -o ${FASTROUTE_WRAP} ${FASTROUTE_HOME}/src/TclInterface.i
WORKING_DIRECTORY ${FASTROUTE_HOME}/src
DEPENDS ${FASTROUTE_HOME}/src/TclInterface.i ${FASTROUTE_HOME}/src/TclInterface.h
)

add_custom_command(OUTPUT ${FASTROUTE_TCL_INIT}
COMMAND ${OPENSTA_HOME}/etc/TclEncode.tcl ${FASTROUTE_TCL_INIT} fastroute_tcl_inits ${FASTROUTE_HOME}/src/fastroute.tcl
WORKING_DIRECTORY ${FASTROUTE_HOME}/src
DEPENDS ${FASTROUTE_HOME}/src/fastroute.tcl ${OPENSTA_HOME}/etc/TclEncode.tcl
)


set(SRC_FILES
src/Box.cpp
src/Coordinate.cpp
src/DBWrapper.cpp
src/FastRouteKernel.cpp
src/Grid.cpp
src/MakeFastRoute.cpp
src/Net.cpp
src/Netlist.cpp
src/Pin.cpp
src/RcTreeBuilder.cpp
src/SteinerTree.cpp
src/TclInterface.cpp
)

add_library(${LIB_NAME}
${SRC_FILES}
${FASTROUTE_WRAP}
${FASTROUTE_TCL_INIT})

target_include_directories(${LIB_NAME} PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/include
${CMAKE_CURRENT_SOURCE_DIR}/third_party/fastroute/include
${CMAKE_CURRENT_SOURCE_DIR}/third_party/pdrev/include
${OPENDB_HOME}/include/
${OPENROAD_HOME}/include
${DBSTA_HOME}/include
${OPENSTA_HOME}/include
${FASTROUTE_HOME}/src
${TCL_INCLUDE_PATH}
${ANTENNACHECKER_HOME}/include
${OPENDP_HOME}/include
)

target_link_libraries(${LIB_NAME}
FastRoute4.1
pdrev)
29 changes: 29 additions & 0 deletions src/FastRoute/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
BSD 3-Clause License

Copyright (c) 2019, University of California, San Diego.
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

2. 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.

3. 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.
17 changes: 17 additions & 0 deletions src/FastRoute/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FastRoute
======================

**FastRoute** is an open-source global router.

The algorithm base is from FastRoute4.1, and the database comes from [OpenDB](https://github.com/The-OpenROAD-Project/OpenDB)


The FastRoute4.1 version was received from <yuexu@iastate.edu> on June 15, 2019, with the BSD-3 open source license as given in the FastRoute [website](http://home.eng.iastate.edu/~cnchu/FastRoute.html#License).

**Important**: This branch is used to compile with the OpenROAD app. For the standalone mode of FastRoute, check *master* branch.

## Getting Started
You can find usage information inside OpenROAD app repository, in the "Global Routing" section of the [README file](https://github.com/The-OpenROAD-Project/OpenROAD/blob/develop/README.md).

Copyright (c) 2019, Federal University of Rio Grande do Sul (UFRGS)
All rights reserved.
32 changes: 32 additions & 0 deletions src/FastRoute/etc/scripts/example.tcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
fr_import_lef "path/to/example.lef"
fr_import_def "path/to/example.def"
set_output_file "path/to/output.guide"

set_capacity_adjustment 0.X
set_layer_adjustment M 0.N
set_region_adjustment lx ly ux uy layer adjustment
set_min_layer Y
set_max_layer Z
set_unidirectional_routing B

run

exit

# fr_import_lef: string input. set the lef file that will be loaded
# fr_import_def: string input. set the def file that will be loaded
# set_output_file: string input. indicate the name of the generated guides file. do not need ".guide" extension

# set_pitches_in_tile: integer input. indicate the number of routing tracks per tile
# set_capacity_adjustment: float input. indicate the percentage reduction of each edge. optional
# set_layer_adjustment: integer, float inputs. indicate the percentage reduction of each edge in a specified layer
# set_region_adjustment: int, int, int, int, int, float. indicate the percentage reduction of each edge in a specified region
# set_min_layer: integer input. indicate the min routing layer available for FastRoute. optional
# set_max_layer: integer input. indicate the max routing layer available for FastRoute. optional
# set_unidirectional_routing: boolean input. indicate if unidirectional routing is activated. optional


# start_fastroute: initialize FastRoute4-lefdef structures
# run_fastroute: run only FastRoute4.1 algorithm, without write guides
# write_guides: write guides file. Should be called only after run_fastroute
# run: execute FastRoute4-lefdef flow
18 changes: 18 additions & 0 deletions src/FastRoute/etc/scripts/example_antenna.tcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
read_lef "input.lef"
read_def "input.def"

fastroute -output_file "route.guide" \
-max_routing_layer 10 \
-unidirectional_routing \
-max_routing_length 10.0 \
-max_length_per_layer {{1 12.0} {2 30.0} {3 50.0} {7 100.0}} \

exit

# To fix long segments, the option -max_routing_length must be used. It sets a
# global max length, that will be used to all layers that does not have specific
# max routing length
#
# The option -max_length_per_layer receives a list of pairs. Each pair contains
# the layer index (beginning in 1) and the max routing length allowed for this
# layer
Loading

0 comments on commit 379f255

Please sign in to comment.