Introduce flags for placement callbacks in Etesian
This commit is contained in:
parent
d27cc8b956
commit
339ed4f9ff
|
@ -40,6 +40,7 @@ namespace Katana {
|
|||
const Hurricane::BaseFlags Flags::ShowOverloadedGCells = (1L << 36);
|
||||
const Hurricane::BaseFlags Flags::ShowBloatedInstances = (1L << 37);
|
||||
const Hurricane::BaseFlags Flags::ProtectSelf = (1L << 38);
|
||||
const Hurricane::BaseFlags Flags::PlacementCallback = (1L << 39);
|
||||
|
||||
|
||||
} // Anabatic namespace.
|
||||
|
|
|
@ -380,12 +380,15 @@ namespace Katana {
|
|||
}
|
||||
|
||||
|
||||
void KatanaEngine::setupGlobalGraph ( uint32_t mode )
|
||||
void KatanaEngine::setupGlobalGraph ( Flags flags )
|
||||
{
|
||||
Cell* cell = getCell();
|
||||
|
||||
cell->flattenNets( Cell::Flags::BuildRings|Cell::Flags::WarnOnUnplacedInstances );
|
||||
cell->createRoutingPadRings( Cell::Flags::BuildRings );
|
||||
|
||||
if (!(flags & Flags::PlacementCallback)) {
|
||||
cell->createRoutingPadRings( Cell::Flags::BuildRings );
|
||||
}
|
||||
|
||||
startMeasures();
|
||||
|
||||
|
@ -500,6 +503,15 @@ namespace Katana {
|
|||
if (flags & Flags::ShowBloatedInstances) selectBloatedInstances( this );
|
||||
Breakpoint::stop( 100, "Bloated cells from previous placement iteration." );
|
||||
|
||||
if (not isChannelStyle()) {
|
||||
if (!(flags & Flags::PlacementCallback)) {
|
||||
setupPowerRails();
|
||||
Flags protectFlags = (getConfiguration()->getNetBuilderStyle() == "VH,2RL")
|
||||
? Flags::ProtectSelf : Flags::NoFlags;
|
||||
protectRoutingPads( protectFlags );
|
||||
}
|
||||
}
|
||||
|
||||
startMeasures();
|
||||
cmess1 << " o Running global routing." << endl;
|
||||
|
||||
|
@ -708,8 +720,11 @@ namespace Katana {
|
|||
Session::close();
|
||||
if (isChannelStyle()) {
|
||||
setupRoutingPlanes();
|
||||
setupPowerRails();
|
||||
protectRoutingPads();
|
||||
|
||||
if (!(flags & Flags::PlacementCallback)) {
|
||||
setupPowerRails();
|
||||
protectRoutingPads();
|
||||
}
|
||||
}
|
||||
|
||||
setState( EngineState::EngineGlobalLoaded );
|
||||
|
|
|
@ -240,7 +240,7 @@ namespace Katana {
|
|||
}
|
||||
|
||||
|
||||
void KatanaEngine::digitalInit ()
|
||||
void KatanaEngine::digitalInit ( Flags flags )
|
||||
{
|
||||
cdebug_log(155,1) << "KatanaEngine::_initDataBase()" << endl;
|
||||
_runKatanaInit();
|
||||
|
@ -250,7 +250,7 @@ namespace Katana {
|
|||
Super::chipPrep();
|
||||
|
||||
setupChannelMode();
|
||||
setupGlobalGraph( 0 );
|
||||
setupGlobalGraph( flags );
|
||||
if (not isChannelStyle()) {
|
||||
setupRoutingPlanes();
|
||||
}
|
||||
|
@ -258,15 +258,16 @@ namespace Katana {
|
|||
if (not setupPreRouteds()) {
|
||||
setState( Anabatic::EngineDriving );
|
||||
throw Error( "KatanaEngine::digitalInit(): All nets are already routed, doing nothing." );
|
||||
} else {
|
||||
if (not isChannelStyle()) {
|
||||
setupPowerRails();
|
||||
Flags flags = (getConfiguration()->getNetBuilderStyle() == "VH,2RL")
|
||||
? Flags::ProtectSelf : Flags::NoFlags;
|
||||
protectRoutingPads( flags );
|
||||
}
|
||||
}
|
||||
|
||||
if (not isChannelStyle()) {
|
||||
if (!(flags & Flags::PlacementCallback)) {
|
||||
setupPowerRails();
|
||||
Flags protectFlags = (getConfiguration()->getNetBuilderStyle() == "VH,2RL")
|
||||
? Flags::ProtectSelf : Flags::NoFlags;
|
||||
protectRoutingPads( protectFlags );
|
||||
}
|
||||
}
|
||||
cdebug_tabw(155,-1);
|
||||
}
|
||||
|
||||
|
|
|
@ -153,19 +153,25 @@ extern "C" {
|
|||
}
|
||||
|
||||
|
||||
PyObject* PyKatanaEngine_digitalInit ( PyKatanaEngine* self )
|
||||
PyObject* PyKatanaEngine_digitalInit ( PyKatanaEngine* self, PyObject* args )
|
||||
{
|
||||
cdebug_log(40,0) << "PyKatanaEngine_digitalInit()" << endl;
|
||||
|
||||
HTRY
|
||||
METHOD_HEAD("KatanaEngine.digitalInit()")
|
||||
if (katana->getViewer()) {
|
||||
if (ExceptionWidget::catchAllWrapper( std::bind(&KatanaEngine::digitalInit,katana) )) {
|
||||
PyErr_SetString( HurricaneError, "KatanaEngine::digitalInit() has thrown an exception (C++)." );
|
||||
return NULL;
|
||||
uint64_t flags = 0;
|
||||
if (PyArg_ParseTuple(args,"|L:KatanaEngine.digitalInit", &flags)) {
|
||||
if (katana->getViewer()) {
|
||||
if (ExceptionWidget::catchAllWrapper( std::bind(&KatanaEngine::digitalInit,katana, flags) )) {
|
||||
PyErr_SetString( HurricaneError, "KatanaEngine::digitalInit() has thrown an exception (C++)." );
|
||||
return NULL;
|
||||
}
|
||||
} else {
|
||||
katana->digitalInit( flags );
|
||||
}
|
||||
} else {
|
||||
katana->digitalInit();
|
||||
PyErr_SetString(ConstructorError, "KatanaEngine.digitalInit(): Invalid number/bad type of parameter.");
|
||||
return NULL;
|
||||
}
|
||||
HCATCH
|
||||
|
||||
|
@ -203,7 +209,7 @@ extern "C" {
|
|||
HTRY
|
||||
METHOD_HEAD("KatanaEngine.runGlobalRouter()")
|
||||
uint64_t flags = 0;
|
||||
if (PyArg_ParseTuple(args,"L:KatanaEngine.runGlobalRouter", &flags)) {
|
||||
if (PyArg_ParseTuple(args,"|L:KatanaEngine.runGlobalRouter", &flags)) {
|
||||
if (katana->getViewer()) {
|
||||
if (ExceptionWidget::catchAllWrapper( std::bind(&KatanaEngine::runGlobalRouter,katana,flags) )) {
|
||||
PyErr_SetString( HurricaneError, "KatanaEngine::runGlobalrouter() has thrown an exception (C++)." );
|
||||
|
@ -344,7 +350,7 @@ extern "C" {
|
|||
, "Create a Katana engine on this cell." }
|
||||
, { "setViewer" , (PyCFunction)PyKatanaEngine_setViewer , METH_VARARGS
|
||||
, "Associate a Viewer to this KatanaEngine." }
|
||||
, { "digitalInit" , (PyCFunction)PyKatanaEngine_digitalInit , METH_NOARGS
|
||||
, { "digitalInit" , (PyCFunction)PyKatanaEngine_digitalInit , METH_VARARGS
|
||||
, "Setup Katana for digital routing." }
|
||||
, { "exclude" , (PyCFunction)PyKatanaEngine_exclude , METH_VARARGS
|
||||
, "Exclude a net from routing." }
|
||||
|
|
|
@ -49,6 +49,7 @@ namespace Katana {
|
|||
static const Hurricane::BaseFlags ShowOverloadedGCells;
|
||||
static const Hurricane::BaseFlags ShowBloatedInstances;
|
||||
static const Hurricane::BaseFlags ProtectSelf;
|
||||
static const Hurricane::BaseFlags PlacementCallback;
|
||||
public:
|
||||
inline Flags ( uint64_t );
|
||||
inline Flags ( const Super& );
|
||||
|
|
|
@ -126,10 +126,10 @@ namespace Katana {
|
|||
void setInterrupt ( bool );
|
||||
void createChannels ();
|
||||
void setupRoutingPlanes ();
|
||||
void setupGlobalGraph ( uint32_t mode );
|
||||
void setupGlobalGraph ( Flags flags=Flags::NoFlags );
|
||||
void annotateGlobalGraph ();
|
||||
void setFixedPreRouted ();
|
||||
void digitalInit ();
|
||||
void digitalInit ( Flags flags=Flags::NoFlags );
|
||||
void analogInit ();
|
||||
void pairSymmetrics ();
|
||||
void updateEstimateDensity ( NetData*, double weight );
|
||||
|
|
Loading…
Reference in New Issue