Katana::runTest to setup net symmetry for gmChamla nets.
This commit is contained in:
parent
fe14547b62
commit
086e40ec7d
|
@ -50,8 +50,10 @@ namespace Hurricane {
|
|||
{
|
||||
Record* record = new Record ( "<NetRoutingState " + _getString() + " >" );
|
||||
if (record != NULL) {
|
||||
record->add( getSlot("_net" , _net ) );
|
||||
record->add( getSlot("_flags", _flags ) );
|
||||
record->add( getSlot("_net" , _net ) );
|
||||
record->add( getSlot("_symNet", _symNet) );
|
||||
record->add( getSlot("_flags" , _flags ) );
|
||||
record->add( DbU::getValueSlot("_axis" ,&_axis ) );
|
||||
}
|
||||
return record;
|
||||
}
|
||||
|
|
|
@ -44,10 +44,10 @@ namespace Hurricane {
|
|||
, ManualGlobalRoute = (1<< 3)
|
||||
, AutomaticGlobalRoute = (1<< 4)
|
||||
, MixedPreRoute = Fixed|ManualGlobalRoute
|
||||
, Horizontal = (1<< 4)
|
||||
, Vertical = (1<< 5)
|
||||
, Symmetric = (1<< 6)
|
||||
, SymmetricMaster = (1<< 7)
|
||||
, Horizontal = (1<< 5)
|
||||
, Vertical = (1<< 6)
|
||||
, Symmetric = (1<< 7)
|
||||
, SymmetricMaster = (1<< 8)
|
||||
};
|
||||
public:
|
||||
inline bool isExcluded () const;
|
||||
|
|
|
@ -269,7 +269,14 @@ namespace Katana {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
void GraphicKatanaEngine::_runTest ()
|
||||
{
|
||||
KatanaEngine* katana = getForFramework( NoFlags );
|
||||
if (katana) katana->runTest();
|
||||
}
|
||||
|
||||
|
||||
void GraphicKatanaEngine::_dumpMeasures ()
|
||||
{
|
||||
KatanaEngine* katana = getForFramework( NoFlags );
|
||||
|
@ -374,6 +381,11 @@ namespace Katana {
|
|||
, "Save routed design (temporary hack)"
|
||||
, std::bind(&GraphicKatanaEngine::_save,this)
|
||||
);
|
||||
_viewer->addToMenu( "placeAndRoute.katana.stepByStep.runTest"
|
||||
, "Katana - Run &Test"
|
||||
, "Run Test Program (symmetric routing of gmChamla)"
|
||||
, std::bind(&GraphicKatanaEngine::_runTest,this)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -45,6 +45,66 @@
|
|||
#include "katana/PyKatanaEngine.h"
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
using namespace std;
|
||||
using Hurricane::Error;
|
||||
using Hurricane::NetRoutingState;
|
||||
using Hurricane::NetRoutingExtension;
|
||||
using Hurricane::Net;
|
||||
using Hurricane::Cell;
|
||||
|
||||
|
||||
void setSymmetricSelf ( Cell* cell, string name )
|
||||
{
|
||||
Net* net = cell->getNet( name );
|
||||
if (not net)
|
||||
throw Error( "::setSymmetricSelf() Net \"%s\" not found." , name.c_str() );
|
||||
|
||||
NetRoutingState* state = NetRoutingExtension::get( net );
|
||||
if (not state) state = NetRoutingExtension::create( net );
|
||||
|
||||
state->setFlags ( NetRoutingState::AutomaticGlobalRoute
|
||||
| NetRoutingState::Symmetric
|
||||
| NetRoutingState::Vertical );
|
||||
state->setSymAxis( cell->getAbutmentBox().getCenter().getX() );
|
||||
}
|
||||
|
||||
|
||||
void setSymmetricPair ( Cell* cell, string masterName, string slaveName )
|
||||
{
|
||||
Net* masterNet = cell->getNet( masterName );
|
||||
if (not masterNet)
|
||||
throw Error( "::setSymmetricPair() Net \"%s\" not found." , masterName.c_str() );
|
||||
|
||||
NetRoutingState* masterState = NetRoutingExtension::get( masterNet );
|
||||
if (not masterState) masterState = NetRoutingExtension::create( masterNet );
|
||||
|
||||
masterState->setFlags ( NetRoutingState::AutomaticGlobalRoute
|
||||
| NetRoutingState::Symmetric
|
||||
| NetRoutingState::SymmetricMaster
|
||||
| NetRoutingState::Vertical );
|
||||
masterState->setSymAxis( cell->getAbutmentBox().getCenter().getX() );
|
||||
|
||||
Net* slaveNet = cell->getNet( slaveName );
|
||||
if (not slaveNet)
|
||||
throw Error( "KatanaEngine::runTest() Net \"%s\" not found." , slaveName.c_str() );
|
||||
|
||||
NetRoutingState* slaveState = NetRoutingExtension::get( slaveNet );
|
||||
if (not slaveState) slaveState = NetRoutingExtension::create( slaveNet );
|
||||
|
||||
slaveState ->setFlags ( NetRoutingState::AutomaticGlobalRoute
|
||||
| NetRoutingState::Symmetric
|
||||
| NetRoutingState::Vertical );
|
||||
slaveState ->setSymAxis(cell->getAbutmentBox().getCenter().getX() );
|
||||
slaveState ->setSymNet ( masterNet );
|
||||
masterState->setSymNet ( slaveNet );
|
||||
}
|
||||
|
||||
|
||||
} // Anonymous namespace.
|
||||
|
||||
|
||||
namespace Katana {
|
||||
|
||||
using std::cout;
|
||||
|
@ -73,6 +133,7 @@ namespace Katana {
|
|||
using Hurricane::Layer;
|
||||
using Hurricane::Horizontal;
|
||||
using Hurricane::Vertical;
|
||||
using Hurricane::NetRoutingState;
|
||||
using Hurricane::NetRoutingExtension;
|
||||
using Hurricane::Cell;
|
||||
using CRL::System;
|
||||
|
@ -376,6 +437,24 @@ namespace Katana {
|
|||
}
|
||||
|
||||
|
||||
void KatanaEngine::runTest ()
|
||||
{
|
||||
if (getCell()->getName() != "gmchamla")
|
||||
throw Error( "KatanaEngine::runTest() Work only on \"gmchamla\" (loaded:\"%s\")."
|
||||
, getString(getCell()->getName()).c_str()
|
||||
);
|
||||
|
||||
setSymmetricSelf( getCell(), "Vc" );
|
||||
setSymmetricSelf( getCell(), "vb5" );
|
||||
setSymmetricSelf( getCell(), "vb7" );
|
||||
setSymmetricPair( getCell(), "ampp_73", "ampn_72" );
|
||||
setSymmetricPair( getCell(), "ampp_71", "ampn_71" );
|
||||
setSymmetricPair( getCell(), "m2n_in" , "m2p_in" );
|
||||
setSymmetricPair( getCell(), "ampp_4" , "ampn_4" );
|
||||
setSymmetricPair( getCell(), "ampp_2" , "ampn_2" );
|
||||
setSymmetricPair( getCell(), "ampp_1" , "ampn_1" );
|
||||
}
|
||||
|
||||
void KatanaEngine::printCompletion () const
|
||||
{
|
||||
size_t routeds = 0;
|
||||
|
|
|
@ -94,6 +94,7 @@ namespace Katana {
|
|||
void _detailRoute ();
|
||||
void _finalize ();
|
||||
void _save ();
|
||||
void _runTest ();
|
||||
void _dumpMeasures ();
|
||||
};
|
||||
|
||||
|
|
|
@ -110,6 +110,7 @@ namespace Katana {
|
|||
void analogInit ();
|
||||
void runNegociate ( unsigned int flags=Flags::NoFlags );
|
||||
void runGlobalRouter ();
|
||||
void runTest ();
|
||||
virtual void finalizeLayout ();
|
||||
void _runKatanaInit ();
|
||||
void _gutKatana ();
|
||||
|
|
Loading…
Reference in New Issue