Various bug fixes for Analog P&R. OK for GM/Chamla & OTA/Miller.
* Change: In CRL::RoutingLayerGauge::getHorizontalGauge(), when selecting the default gauge, try, if possible to avoid the PinOnly one. Same goes for the vertical one. * Bug: In Katana::TrackCost CTOR, symmetric track axis position was wrong, was using the reference instead of the symmetric. * Bug: In BoraEngine::updatePlacement(), set up the Dijkstra search halo to one pitch so it can use immediately neighboring channels. * New: In BoraEngine, added python startup hook like in Katana. Mainly to setup debug nets.
This commit is contained in:
parent
1e4b8b4647
commit
f130417232
|
@ -31,5 +31,6 @@
|
|||
find_package(Doxygen)
|
||||
|
||||
add_subdirectory(src)
|
||||
add_subdirectory(python)
|
||||
#add_subdirectory(cmake_modules)
|
||||
#add_subdirectory(doc)
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
|
||||
install ( FILES boraInit.py DESTINATION ${PYTHON_SITE_PACKAGES}/bora )
|
|
@ -0,0 +1,29 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
try:
|
||||
import sys
|
||||
import os.path
|
||||
import helpers.io
|
||||
from helpers.io import ErrorMessage
|
||||
from helpers.io import WarningMessage
|
||||
import Viewer
|
||||
except Exception, e:
|
||||
helpers.io.catch( e )
|
||||
sys.exit( 1 )
|
||||
|
||||
|
||||
def boraHook ( **kw ):
|
||||
bora = None
|
||||
if kw.has_key('bora'):
|
||||
bora = kw['bora']
|
||||
else:
|
||||
print ErrorMessage( 3, 'boraHook(): Must be run from a BoraEngine.' )
|
||||
return
|
||||
|
||||
try:
|
||||
userInit = os.path.join( os.getcwd(), 'coriolis2/bora.py' )
|
||||
if (os.path.exists(userInit)):
|
||||
execfile( userInit )
|
||||
except Exception, e:
|
||||
helpers.io.catch( e )
|
||||
return
|
|
@ -14,6 +14,7 @@
|
|||
// +-----------------------------------------------------------------+
|
||||
|
||||
|
||||
#include <Python.h>
|
||||
#include <sstream>
|
||||
#include <QAction>
|
||||
#include <QMenu>
|
||||
|
@ -30,6 +31,7 @@
|
|||
#include "hurricane/Library.h"
|
||||
#include "hurricane/viewer/HApplication.h"
|
||||
#include "hurricane/viewer/ExceptionWidget.h"
|
||||
#include "hurricane/viewer/Script.h"
|
||||
#include "hurricane/UpdateSession.h"
|
||||
#include "hurricane/analog/AnalogCellExtension.h"
|
||||
#include "hurricane/analog/LayoutGenerator.h"
|
||||
|
@ -42,12 +44,16 @@
|
|||
#include "bora/SlicingDataWidget.h"
|
||||
#include "bora/AnalogDistance.h"
|
||||
#include "bora/BoraEngine.h"
|
||||
#include "bora/PyBoraEngine.h"
|
||||
|
||||
|
||||
namespace Bora {
|
||||
|
||||
using namespace std;
|
||||
using Hurricane::dbo_ptr;
|
||||
using Hurricane::Error;
|
||||
using Hurricane::Warning;
|
||||
using Hurricane::Breakpoint;
|
||||
using Hurricane::DebugSession;
|
||||
using Hurricane::NetRoutingState;
|
||||
using Hurricane::NetRoutingExtension;
|
||||
|
@ -58,6 +64,7 @@ namespace Bora {
|
|||
using Hurricane::UpdateSession;
|
||||
using Analog::AnalogCellExtension;
|
||||
using Analog::Device;
|
||||
using CRL::System;
|
||||
using CRL::GdsDriver;
|
||||
|
||||
|
||||
|
@ -87,6 +94,7 @@ namespace Bora {
|
|||
void BoraEngine::_postCreate ()
|
||||
{
|
||||
Super::_postCreate();
|
||||
_runBoraInit();
|
||||
}
|
||||
|
||||
|
||||
|
@ -100,6 +108,27 @@ namespace Bora {
|
|||
}
|
||||
|
||||
|
||||
void BoraEngine::_runBoraInit ()
|
||||
{
|
||||
Utilities::Path pythonSitePackages = System::getPath("pythonSitePackages");
|
||||
Utilities::Path systemConfDir = pythonSitePackages / "bora";
|
||||
Utilities::Path systemConfFile = systemConfDir / "boraInit.py";
|
||||
|
||||
if (systemConfFile.exists()) {
|
||||
Isobar::Script::addPath( systemConfDir.toString() );
|
||||
|
||||
dbo_ptr<Isobar::Script> script = Isobar::Script::create( systemConfFile.stem().toString() );
|
||||
script->addKwArgument( "bora" , (PyObject*)PyBoraEngine_Link(this) );
|
||||
script->runFunction ( "boraHook", getCell() );
|
||||
|
||||
Isobar::Script::removePath( systemConfDir.toString() );
|
||||
} else {
|
||||
cerr << Warning( "Bora system configuration file:\n <%s> not found."
|
||||
, systemConfFile.toString().c_str() ) << endl;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
BoraEngine::~BoraEngine ()
|
||||
{ }
|
||||
|
||||
|
@ -221,6 +250,7 @@ namespace Bora {
|
|||
Anabatic::Dijkstra* dijkstra = new Anabatic::Dijkstra( katana );
|
||||
AnalogDistance distance = AnalogDistance( cell, hpitch, vpitch );
|
||||
dijkstra->setDistance ( distance );
|
||||
dijkstra->setSearchAreaHalo( std::max(hpitch,vpitch) );
|
||||
|
||||
for ( Net* net : cell->getNets() ) {
|
||||
distance.setNet( net );
|
||||
|
|
|
@ -308,7 +308,7 @@ namespace Bora {
|
|||
cerr << Warning( "DBoxSet::create(): The height of device \"%s\" (%s) is not pitched on 2*%s (adjusted)."
|
||||
, getString(cell->getName()).c_str()
|
||||
, DbU::getValueString(abHeight ).c_str()
|
||||
, DbU::getValueString(h2pitch ).c_str()
|
||||
, DbU::getValueString(h2pitch/2).c_str()
|
||||
) << endl;
|
||||
abHeight += h2pitch - (abHeight % h2pitch);
|
||||
}
|
||||
|
@ -316,7 +316,7 @@ namespace Bora {
|
|||
cerr << Warning( "DBoxSet::create(): The width of device \"%s\" (%s) is not pitched on 2*%s (adjusted)."
|
||||
, getString(cell->getName()).c_str()
|
||||
, DbU::getValueString(abWidth ).c_str()
|
||||
, DbU::getValueString(v2pitch).c_str()
|
||||
, DbU::getValueString(v2pitch/2).c_str()
|
||||
) << endl;
|
||||
abWidth += v2pitch - (abWidth % v2pitch);
|
||||
}
|
||||
|
|
|
@ -67,6 +67,7 @@ namespace Bora {
|
|||
virtual ~BoraEngine ();
|
||||
virtual void _postCreate ();
|
||||
virtual void _preDestroy ();
|
||||
virtual void _runBoraInit ();
|
||||
|
||||
private:
|
||||
static Hurricane::Name _toolName;
|
||||
|
|
|
@ -122,23 +122,31 @@ namespace CRL {
|
|||
|
||||
RoutingLayerGauge* RoutingGauge::getHorizontalGauge () const
|
||||
{
|
||||
RoutingLayerGauge* pinOnly = NULL;
|
||||
for ( RoutingLayerGauge* gauge : _layerGauges ) {
|
||||
//if ( (gauge->getType() != Constant::LayerGaugeType::PinOnly) and gauge->isHorizontal() )
|
||||
if (gauge->isHorizontal())
|
||||
if (gauge->isHorizontal()) {
|
||||
if (gauge->getType() != Constant::LayerGaugeType::PinOnly)
|
||||
return gauge;
|
||||
else if (not pinOnly)
|
||||
pinOnly = gauge;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
return pinOnly;
|
||||
}
|
||||
|
||||
|
||||
RoutingLayerGauge* RoutingGauge::getVerticalGauge () const
|
||||
{
|
||||
RoutingLayerGauge* pinOnly = NULL;
|
||||
for ( RoutingLayerGauge* gauge : _layerGauges ) {
|
||||
//if ( (gauge->getType() != Constant::LayerGaugeType::PinOnly) and gauge->isVertical() )
|
||||
if (gauge->isVertical())
|
||||
if (gauge->isVertical()) {
|
||||
if (gauge->getType() != Constant::LayerGaugeType::PinOnly)
|
||||
return gauge;
|
||||
else if (not pinOnly)
|
||||
pinOnly = gauge;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
return pinOnly;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -779,7 +779,7 @@ namespace Katana {
|
|||
_event2->setEventLevel( 0 );
|
||||
_event2->setProcessed( true );
|
||||
|
||||
cdebug_log(9000,0) << "Deter| addInsertEvent() @" << getTrack1(i) << endl;
|
||||
cdebug_log(9000,0) << "Deter| addInsertEvent() @" << getTrack2(i) << endl;
|
||||
Session::addInsertEvent( getSegment2(), getTrack2(i), getCandidateAxis2(i) );
|
||||
}
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ namespace Katana {
|
|||
: _flags ((symSegment) ? Symmetric : NoFlags)
|
||||
, _span (refSegment->getTrackSpan())
|
||||
, _refCandidateAxis(refCandidateAxis)
|
||||
, _symCandidateAxis(refCandidateAxis)
|
||||
, _symCandidateAxis(symCandidateAxis)
|
||||
, _tracks ( _span * ((symSegment) ? 2 : 1)
|
||||
, std::tuple<Track*,size_t,size_t>(NULL,Track::npos,Track::npos) )
|
||||
, _segment1 (refSegment)
|
||||
|
@ -83,6 +83,8 @@ namespace Katana {
|
|||
_segment1->addOverlapCost( *this );
|
||||
|
||||
if (symTrack) {
|
||||
cdebug_log(159,0) << " _tracks.size(): " << _tracks.size() << " _span:" << _span << endl;
|
||||
|
||||
std::get<0>( _tracks[_span] ) = symTrack;
|
||||
select( 0, Symmetric );
|
||||
_segment2->addOverlapCost( *this );
|
||||
|
|
Loading…
Reference in New Issue