diff --git a/Seabreeze/src/Seabreeze.cpp b/Seabreeze/src/Seabreeze.cpp index 00124442..3c67f3ce 100644 --- a/Seabreeze/src/Seabreeze.cpp +++ b/Seabreeze/src/Seabreeze.cpp @@ -280,7 +280,7 @@ namespace Seabreeze { return _tree; } - int Elmore::delayElmore ( RoutingPad* rp ) + double Elmore::delayElmore ( RoutingPad* rp ) { return _tree->Delay_Elmore(rp); } diff --git a/Seabreeze/src/Seabreeze/Seabreeze.h b/Seabreeze/src/Seabreeze/Seabreeze.h index d8252c1c..d6df5a8d 100644 --- a/Seabreeze/src/Seabreeze/Seabreeze.h +++ b/Seabreeze/src/Seabreeze/Seabreeze.h @@ -43,7 +43,7 @@ namespace Seabreeze { Tree* getTree (); inline const set& get_conts () const; inline Configuration* getConfig (); - int delayElmore ( RoutingPad* rp ); + double delayElmore ( RoutingPad* rp ); void toTREE ( ostream& ) const; private: Configuration* _config; diff --git a/Seabreeze/src/Seabreeze/Tree.h b/Seabreeze/src/Seabreeze/Tree.h index e9d8822e..88161663 100644 --- a/Seabreeze/src/Seabreeze/Tree.h +++ b/Seabreeze/src/Seabreeze/Tree.h @@ -26,7 +26,7 @@ class Tree { void add_node ( Node* node ); void After_i ( Node* ni ); set Branch_i ( Contact* ct ); - int Delay_Elmore ( RoutingPad* rp ); + double Delay_Elmore ( RoutingPad* rp ); void print ( ostream& out ); void clear (); private: diff --git a/Seabreeze/src/SeabreezeEngine.cpp b/Seabreeze/src/SeabreezeEngine.cpp index 34eb6b55..dc75e330 100644 --- a/Seabreeze/src/SeabreezeEngine.cpp +++ b/Seabreeze/src/SeabreezeEngine.cpp @@ -95,7 +95,7 @@ namespace Seabreeze { { cerr << "SeabreezeEngine::runTool() has been called." << endl; - DebugSession::addToTrace(net); +// DebugSession::addToTrace(net); DebugSession::open(net, 190, 200); RoutingPad* driver= nullptr; @@ -119,6 +119,14 @@ namespace Seabreeze { cdebug_log(199,0) << endl; elm->buildTree(driver); + for ( RoutingPad* rp : net->getRoutingPads() ) { + Plug* p = static_cast(rp->getPlugOccurrence().getEntity()); + if ( p->getMasterNet()->getDirection() & Net::Direction::DirOut ) { + continue; + } + + cerr << "Elmore's delay : " << elm->delayElmore(rp) << endl; + } DebugSession::close(); } diff --git a/Seabreeze/src/Tree.cpp b/Seabreeze/src/Tree.cpp index 0e7236cc..0259894e 100644 --- a/Seabreeze/src/Tree.cpp +++ b/Seabreeze/src/Tree.cpp @@ -65,7 +65,7 @@ set Tree::Branch_i ( Contact* ct ) { set ln; Node *ni = get_node(ct); - while ( ni != nullptr ) { + while ( ni->Np != nullptr ) { ln.insert(ni->Np); ni = ni->Np; } @@ -73,7 +73,7 @@ set Tree::Branch_i ( Contact* ct ) return ln; } -int Tree::Delay_Elmore ( RoutingPad* rp ) +double Tree::Delay_Elmore ( RoutingPad* rp ) { if ( rp == nullptr ) { cerr << "Input RoutingPad is NULL. Please select a RoutingPad !" << endl; @@ -84,29 +84,29 @@ int Tree::Delay_Elmore ( RoutingPad* rp ) for ( Component* c : rp->getSlaveComponents() ) { Contact* cont = dynamic_cast(c); - if ( ct ) { + if ( cont ) { ct = cont; break; } } - if ( ct == nullptr ) { cerr << "No contact found" << endl; return -1; } - int t = 0; + double t = 0; +//--------------------------------------------------------------------------------------- + cerr << "Contact to be calculated : " << ct->getId() << endl; +//--------------------------------------------------------------------------------------- set br = Branch_i(ct); - Node *ni = get_node(ct); After_i(ni); ni->ap = 0; - // Compute Rt of all nodes for ( size_t k = 0; k < nodes.size(); k++ ) { if ( k == 0 ) - nodes[k]->Rt = 0; + nodes[k]->Rt = nodes[k]->R; else{ if ( nodes[k]->ap == 0 ) { if ( br.count(nodes[k]) > 0 ) {