From 619a1b9f728dd4738107a012221cc7c810385b14 Mon Sep 17 00:00:00 2001 From: Jean-Paul Chaput Date: Mon, 3 Dec 2012 08:29:28 +0000 Subject: [PATCH] * All Tools: - New: Added FreeBSD/Ubuntu patches from Otacilio De Araujo (). * ./kite: - New: Makes use of cbug to display the (scary) debug messages. - Change: Re-enable deletion of Knik in Kite destructor. --- kite/CMakeLists.txt | 1 + kite/src/CMakeLists.txt | 1 + kite/src/KiteEngine.cpp | 22 +++++++---------- kite/src/NegociateWindow.cpp | 10 +------- kite/src/RoutingEvent.cpp | 43 +++++++++++++++++---------------- kite/src/TrackSegment.cpp | 14 +++-------- kite/src/kite/NegociateWindow.h | 14 +++-------- 7 files changed, 40 insertions(+), 65 deletions(-) diff --git a/kite/CMakeLists.txt b/kite/CMakeLists.txt index 8238576a..35f5786f 100644 --- a/kite/CMakeLists.txt +++ b/kite/CMakeLists.txt @@ -26,6 +26,7 @@ find_package(CORIOLIS REQUIRED) find_package(KNIK REQUIRED) find_package(KATABATIC REQUIRED) + find_package(Libexecinfo REQUIRED) if(BUILD_DOC) find_package(Doxygen) endif(BUILD_DOC) diff --git a/kite/src/CMakeLists.txt b/kite/src/CMakeLists.txt index 0bab44eb..abfcf78b 100644 --- a/kite/src/CMakeLists.txt +++ b/kite/src/CMakeLists.txt @@ -87,6 +87,7 @@ ${Boost_LIBRARIES} ${LIBXML2_LIBRARIES} ${PYTHON_LIBRARIES} -lutil + ${LIBEXECINFO_LIBRARIES} ) add_library ( pyKite MODULE ${pyCpps} ) diff --git a/kite/src/KiteEngine.cpp b/kite/src/KiteEngine.cpp index da995dff..d581cb8c 100644 --- a/kite/src/KiteEngine.cpp +++ b/kite/src/KiteEngine.cpp @@ -2,14 +2,9 @@ // -*- C++ -*- // // This file is part of the Coriolis Software. -// Copyright (c) UPMC/LIP6 2008-2010, All Rights Reserved +// Copyright (c) UPMC/LIP6 2008-2012, All Rights Reserved // -// =================================================================== -// -// $Id$ -// -// x-----------------------------------------------------------------x -// | | +// +-----------------------------------------------------------------+ // | C O R I O L I S | // | K i t e - D e t a i l e d R o u t e r | // | | @@ -17,10 +12,7 @@ // | E-mail : Jean-Paul.Chaput@asim.lip6.fr | // | =============================================================== | // | C++ Module : "./KiteEngine.cpp" | -// | *************************************************************** | -// | U p d a t e s | -// | | -// x-----------------------------------------------------------------x +// +-----------------------------------------------------------------+ #include @@ -164,7 +156,7 @@ namespace Kite { cmess2 << " - RoutingEvents := " << RoutingEvent::getAllocateds() << endl; - //_knik->destroy (); + _knik->destroy (); ltraceout(90); } @@ -355,7 +347,7 @@ namespace Kite { size_t tracksSize = rp->getTracksSize(); for ( size_t itrack=0 ; itrackgetTrackByIndex ( itrack ); - Knik::Edge* edge = NULL; + //Knik::Edge* edge = NULL; ltrace(300) << "Capacity from: " << track << endl; @@ -539,6 +531,10 @@ namespace Kite { // DebugSession::addToTrace ( getCell(), "mips_r3000_core.mips_r3000_1m_dp.addsub32_carith_se.gi_3_23" ); // DebugSession::addToTrace ( getCell(), "mips_r3000_core.mips_r3000_1m_dp.addsub32_carith_se.gi_3_28" ); //DebugSession::addToTrace ( getCell(), "cout_to_pads" ); + //DebugSession::addToTrace ( getCell(), "mux_5.sel0" ); + //DebugSession::addToTrace ( getCell(), "wm_rf.nandr0" ); + //DebugSession::addToTrace ( getCell(), "adder_sub.gi_2_18" ); + //DebugSession::addToTrace ( getCell(), "adder_sub.pi_3_20" ); createDetailedGrid (); buildPowerRails (); diff --git a/kite/src/NegociateWindow.cpp b/kite/src/NegociateWindow.cpp index f1f8f6a1..915385a5 100644 --- a/kite/src/NegociateWindow.cpp +++ b/kite/src/NegociateWindow.cpp @@ -2,14 +2,9 @@ // -*- C++ -*- // // This file is part of the Coriolis Software. -// Copyright (c) UPMC/LIP6 2008-2011, All Rights Reserved -// -// =================================================================== -// -// $Id$ +// Copyright (c) UPMC/LIP6 2008-2012, All Rights Reserved // // +-----------------------------------------------------------------+ -// | | // | C O R I O L I S | // | K i t e - D e t a i l e d R o u t e r | // | | @@ -17,9 +12,6 @@ // | E-mail : Jean-Paul.Chaput@asim.lip6.fr | // | =============================================================== | // | C++ Module : "./NegociateWindow.cpp" | -// | *************************************************************** | -// | U p d a t e s | -// | | // +-----------------------------------------------------------------+ diff --git a/kite/src/RoutingEvent.cpp b/kite/src/RoutingEvent.cpp index e0ba4aeb..859608b0 100644 --- a/kite/src/RoutingEvent.cpp +++ b/kite/src/RoutingEvent.cpp @@ -2,14 +2,9 @@ // -*- C++ -*- // // This file is part of the Coriolis Software. -// Copyright (c) UPMC/LIP6 2008-2011, All Rights Reserved -// -// =================================================================== -// -// $Id$ +// Copyright (c) UPMC/LIP6 2008-2012, All Rights Reserved // // +-----------------------------------------------------------------+ -// | | // | C O R I O L I S | // | K i t e - D e t a i l e d R o u t e r | // | | @@ -17,9 +12,6 @@ // | E-mail : Jean-Paul.Chaput@asim.lip6.fr | // | =============================================================== | // | C++ Module : "./RoutingEvent.cpp" | -// | *************************************************************** | -// | U p d a t e s | -// | | // +-----------------------------------------------------------------+ @@ -1619,7 +1611,7 @@ namespace { Track* track = candidates[icandidate].getTrack(); TrackElement* other = track->getSegment(overlap.getCenter()); if ( not other ) { - cerr << Error("conflictSolve1_v1b(): No segment under overlap center.") << endl; + cbug << Error("conflictSolve1_v1b(): No segment under overlap center.") << endl; continue; } @@ -2004,7 +1996,7 @@ namespace { } else { clearActions (); if ( data->getState() == DataNegociate::Unimplemented ) { - cerr << "[UNSOLVED] " << segment << " unable to slacken topology." << endl; + cinfo << "[UNSOLVED] " << segment << " unable to slacken topology." << endl; } } @@ -2396,7 +2388,8 @@ namespace { << " vs. " << DbU::getValueString(interval.getVMax()) << endl; // Ugly: Direct uses of routing pitch. if ( interval.getVMax()+DbU::lambda(5.0) >= uside.getVMin() ) { - ltrace(200) << "Using next GCell." << endl; + interval.inflate( 0, DbU::fromLambda(5.0) ); + ltrace(200) << "Using next GCell " << interval << endl; imaxconflict++; } } @@ -2443,16 +2436,20 @@ namespace { if ( minExpanded ) { //doglegAxis = dogLegGCell->getUSide(_segment->getDirection(),false).getVMax() - DbU::lambda(1.0); doglegAxis = dogLegGCell->getUSide(_segment->getDirection()/*,false*/).getCenter(); + ltrace(200) << "MARK 1 doglegAxis: " << DbU::getValueString(doglegAxis) << endl; } else { // Ugly: hardcoded pitch. doglegAxis = interval.getVMin() - DbU::lambda(5.0); + ltrace(200) << "MARK 2 doglegAxis: " << DbU::getValueString(doglegAxis) << endl; } } else { if ( maxExpanded ) { doglegAxis = dogLegGCell->getUSide(_segment->getDirection()/*,false*/).getVMin(); + ltrace(200) << "MARK 3 doglegAxis: " << DbU::getValueString(doglegAxis) << endl; } else { // Ugly: hardcoded pitch (5.0 - 1.0). doglegAxis = interval.getVMax() + DbU::lambda(4.0); + ltrace(200) << "MARK 4 doglegAxis: " << DbU::getValueString(doglegAxis) << endl; } } if ( doglegReuse1 ) _S.addAction ( dogleg, SegmentAction::OtherRipup ); @@ -3781,7 +3778,7 @@ namespace Kite { RoutingEvent* parentEvent = parent->getDataNegociate()->getRoutingEvent(); if ( parentEvent == this ) { - cerr << Error("RoutingEvent::getAxisHint(): Parentage loop between\n" + cbug << Error("RoutingEvent::getAxisHint(): Parentage loop between\n" " this :%p:%s\n parent:%p:%s" ,_segment->base(),getString(_segment->base()).c_str() ,parent ->base(),getString(parent ->base()).c_str() @@ -3861,7 +3858,7 @@ namespace Kite { if ( loop.isLooping() ) { if ( ltracelevel() > 200 ) { - cerr << Error("Loop detected: %s.\n Enabling trace (level:200)" + cbug << Error("Loop detected: %s.\n Enabling trace (level:200)" ,_getString().c_str()) << endl; //ltracelevel ( 200 ); //Cfg::getParamInt("misc.traceLevel")->setInt ( 200, Cfg::Parameter::CommandLine ); @@ -3875,7 +3872,7 @@ namespace Kite { #if LOOP_DEBUG if ( loop.getMaxCount() > 500 ) { - cerr << Error("Loop detected, removing event %s.",_getString().c_str()) << endl; + cbug << Error("Loop detected, removing event %s.",_getString().c_str()) << endl; //Cfg::getParamInt("misc.traceLevel")->setInt ( 1000, Cfg::Parameter::CommandLine ); //ltracelevel ( 1000 ); @@ -3905,7 +3902,7 @@ namespace Kite { for ( size_t i=0 ; iisTerminal()) { + ltrace(200) << "Not expanding on Terminals:" << _constraints << endl; + } else { + ltrace(200) << "Expanding:" << _constraints << endl; + // Ugly: direct uses of Cell Gauge. + _constraints.inflate ( DbU::lambda(50.0) ); + ltrace(200) << "Expanding (after):" << _constraints << endl; + } } // else if ( _segment->isDogleg() // and (_segment->getDataNegociate()->getState() >= DataNegociate::MaximumSlack) ) { diff --git a/kite/src/TrackSegment.cpp b/kite/src/TrackSegment.cpp index 2e89d4aa..89880a96 100644 --- a/kite/src/TrackSegment.cpp +++ b/kite/src/TrackSegment.cpp @@ -2,14 +2,9 @@ // -*- C++ -*- // // This file is part of the Coriolis Software. -// Copyright (c) UPMC/LIP6 2008-2010, All Rights Reserved +// Copyright (c) UPMC/LIP6 2008-2012, All Rights Reserved // -// =================================================================== -// -// $Id$ -// -// x-----------------------------------------------------------------x -// | | +// +-----------------------------------------------------------------+ // | C O R I O L I S | // | K i t e - D e t a i l e d R o u t e r | // | | @@ -17,10 +12,7 @@ // | E-mail : Jean-Paul.Chaput@asim.lip6.fr | // | =============================================================== | // | C++ Module : "./TrackSegment.cpp" | -// | *************************************************************** | -// | U p d a t e s | -// | | -// x-----------------------------------------------------------------x +// +-----------------------------------------------------------------+ diff --git a/kite/src/kite/NegociateWindow.h b/kite/src/kite/NegociateWindow.h index 372f7db4..17f1c5c8 100644 --- a/kite/src/kite/NegociateWindow.h +++ b/kite/src/kite/NegociateWindow.h @@ -2,14 +2,9 @@ // -*- C++ -*- // // This file is part of the Coriolis Software. -// Copyright (c) UPMC/LIP6 2008-2010, All Rights Reserved +// Copyright (c) UPMC/LIP6 2008-2011, All Rights Reserved // -// =================================================================== -// -// $Id$ -// -// x-----------------------------------------------------------------x -// | | +// +-----------------------------------------------------------------+ // | C O R I O L I S | // | K i t e - D e t a i l e d R o u t e r | // | | @@ -17,10 +12,7 @@ // | E-mail : Jean-Paul.Chaput@asim.lip6.fr | // | =============================================================== | // | C++ Header : "./NegociateWindow.h" | -// | *************************************************************** | -// | U p d a t e s | -// | | -// x-----------------------------------------------------------------x +// +-----------------------------------------------------------------+ #ifndef __KITE_NEGOCIATE_WINDOW__