Added Python for FLUTE (for fast RSMT in HFNS).
* New: In flute, added a Python binding. Contains two methods: "readLUT()", to load the POWV9.dat and POST9.dat and "flute()" to build a RSMT. "flute()" takes a tuple of positions (themselves 2-uple) like: ( (x0,y0), (x1,y1,), ... (xN,yM) ) and returns a tuple of 3-uple of branches: ( (n0,x0,y0), (n1,x1,y1), ... ) In "flute.h", set the distance type (DTYPE) to int64_t to always accomodate DbU::Unit. As it now uses the Hurricane Python interface and the path utilities from CRL Core, move it's compilation *after* them (see build.conf in bootstrap).
This commit is contained in:
parent
ea94175eb4
commit
18405599e8
|
@ -14,11 +14,11 @@ projects = [
|
|||
, { 'name' : "coriolis"
|
||||
, 'tools' : [ "bootstrap"
|
||||
, "lefdef"
|
||||
, "flute"
|
||||
, "coloquinte"
|
||||
, "vlsisapd"
|
||||
, "hurricane"
|
||||
, "crlcore"
|
||||
, "flute"
|
||||
, "etesian"
|
||||
, "anabatic"
|
||||
, "katana"
|
||||
|
|
|
@ -16,5 +16,11 @@
|
|||
check_distribution()
|
||||
setup_sysconfdir( "${CMAKE_INSTALL_PREFIX}" )
|
||||
|
||||
find_package(PythonLibs 2 REQUIRED)
|
||||
find_package(PythonSitePackages REQUIRED)
|
||||
find_package(VLSISAPD REQUIRED)
|
||||
find_package(HURRICANE REQUIRED)
|
||||
find_package(CORIOLIS REQUIRED)
|
||||
|
||||
add_subdirectory( src )
|
||||
add_subdirectory( cmake_modules )
|
||||
|
|
|
@ -1,31 +1,50 @@
|
|||
# -*- mode: CMAKE explicit-buffer-name: "CMakeLists.txt<flute/src/3.1>" -*-
|
||||
|
||||
include_directories ( ${FLUTE_SOURCE_DIR}/src/3.1
|
||||
)
|
||||
include_directories( ${FLUTE_SOURCE_DIR}/src/3.1
|
||||
${CORIOLIS_LIBRARIES}
|
||||
${HURRICANE_INCLUDE_DIR}
|
||||
${CONFIGURATION_INCLUDE_DIR}
|
||||
${PYTHON_INCLUDE_PATH}
|
||||
)
|
||||
|
||||
set ( includes flute.h
|
||||
dl.h
|
||||
mst2.h
|
||||
err.h
|
||||
heap.h
|
||||
dist.h
|
||||
global.h
|
||||
neighbors.h
|
||||
)
|
||||
set ( cpps flute.cpp
|
||||
flute_mst.cpp
|
||||
dist.cpp
|
||||
dl.cpp
|
||||
err.cpp
|
||||
mst2.cpp
|
||||
heap.cpp
|
||||
neighbors.cpp
|
||||
)
|
||||
set( includes flute.h
|
||||
dl.h
|
||||
mst2.h
|
||||
err.h
|
||||
heap.h
|
||||
dist.h
|
||||
global.h
|
||||
neighbors.h
|
||||
)
|
||||
set( cpps flute.cpp
|
||||
flute_mst.cpp
|
||||
dist.cpp
|
||||
dl.cpp
|
||||
err.cpp
|
||||
mst2.cpp
|
||||
heap.cpp
|
||||
neighbors.cpp
|
||||
)
|
||||
add_library( flute ${cpps} )
|
||||
set_target_properties( flute PROPERTIES VERSION 3.1 SOVERSION 3 )
|
||||
set( pyCpps PyFlute.cpp )
|
||||
set( depLibs flute
|
||||
${CORIOLIS_LIBRARIES}
|
||||
${HURRICANE_PYTHON_LIBRARIES}
|
||||
${UTILITIES_LIBRARY}
|
||||
${PYTHON_LIBRARIES}
|
||||
-lutil
|
||||
)
|
||||
|
||||
add_library ( flute ${cpps} )
|
||||
set_target_properties ( flute PROPERTIES VERSION 3.1 SOVERSION 3 )
|
||||
add_python_module( "${pyCpps}"
|
||||
None
|
||||
"pyflute;1.0;1"
|
||||
Flute
|
||||
"${depLibs}"
|
||||
include/coriolis2/flute
|
||||
)
|
||||
|
||||
install ( TARGETS flute DESTINATION lib${LIB_SUFFIX} )
|
||||
install ( FILES ${includes} DESTINATION include/flute/3.1 )
|
||||
install ( FILES POST9.dat
|
||||
POWV9.dat DESTINATION share/flute/3.1 )
|
||||
install( TARGETS flute DESTINATION lib${LIB_SUFFIX} )
|
||||
install( FILES ${includes} DESTINATION include/flute/3.1 )
|
||||
install( FILES POST9.dat
|
||||
POWV9.dat DESTINATION share/flute/3.1 )
|
||||
|
|
|
@ -19,7 +19,7 @@ namespace Flute {
|
|||
#define REMOVE_DUPLICATE_PIN 0 // Remove dup. pin for flute_wl() & flute()
|
||||
|
||||
#ifndef DTYPE // Data type for distance
|
||||
#define DTYPE int
|
||||
#define DTYPE int64_t
|
||||
#endif
|
||||
|
||||
|
||||
|
|
|
@ -446,9 +446,9 @@ namespace Katana {
|
|||
updateEstimateDensityOfPath( this, targets[0], targets[1], weight );
|
||||
return;
|
||||
default:
|
||||
{ int accuracy = 3;
|
||||
int* xs = new int [targets.size()];
|
||||
int* ys = new int [targets.size()];
|
||||
{ int accuracy = 3;
|
||||
int64_t* xs = new int64_t [targets.size()];
|
||||
int64_t* ys = new int64_t [targets.size()];
|
||||
|
||||
for ( size_t itarget=0 ; itarget<targets.size() ; ++itarget ) {
|
||||
Point center = targets[itarget]->getCenter();
|
||||
|
|
|
@ -1528,11 +1528,11 @@ void Graph::Monotonic()
|
|||
Tree* Graph::createFluteTree()
|
||||
// ****************************
|
||||
{
|
||||
int accuracy = 3; // accuracy for flute (by default 3)
|
||||
int d = _vertexes_to_route.size(); // degre du net, ie nombre de routingPads
|
||||
int *x = new int [d]; // x coordinates of the vertexes
|
||||
int *y = new int [d]; // y coordinates of the vertexes
|
||||
Tree* flutetree = new Tree; // the flute Steiner Tree
|
||||
int accuracy = 3; // accuracy for flute (by default 3)
|
||||
int d = _vertexes_to_route.size(); // degre du net, ie nombre de routingPads
|
||||
int64_t *x = new int64_t [d]; // x coordinates of the vertexes
|
||||
int64_t *y = new int64_t [d]; // y coordinates of the vertexes
|
||||
Tree* flutetree = new Tree; // the flute Steiner Tree
|
||||
|
||||
//cout << "Net : " << _working_net << endl;
|
||||
// scans _working_net to find x,y coordinates and fill x, y and d
|
||||
|
|
Loading…
Reference in New Issue