Seabreeze : Elmore's delay calculation checked, it should be good (?)
This commit is contained in:
parent
7267951683
commit
0cd9cd7ddb
|
@ -280,7 +280,7 @@ namespace Seabreeze {
|
|||
return _tree;
|
||||
}
|
||||
|
||||
int Elmore::delayElmore ( RoutingPad* rp )
|
||||
double Elmore::delayElmore ( RoutingPad* rp )
|
||||
{
|
||||
return _tree->Delay_Elmore(rp);
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@ namespace Seabreeze {
|
|||
Tree* getTree ();
|
||||
inline const set<Contact*>& get_conts () const;
|
||||
inline Configuration* getConfig ();
|
||||
int delayElmore ( RoutingPad* rp );
|
||||
double delayElmore ( RoutingPad* rp );
|
||||
void toTREE ( ostream& ) const;
|
||||
private:
|
||||
Configuration* _config;
|
||||
|
|
|
@ -26,7 +26,7 @@ class Tree {
|
|||
void add_node ( Node* node );
|
||||
void After_i ( Node* ni );
|
||||
set<Node*> Branch_i ( Contact* ct );
|
||||
int Delay_Elmore ( RoutingPad* rp );
|
||||
double Delay_Elmore ( RoutingPad* rp );
|
||||
void print ( ostream& out );
|
||||
void clear ();
|
||||
private:
|
||||
|
|
|
@ -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<Plug*>(rp->getPlugOccurrence().getEntity());
|
||||
if ( p->getMasterNet()->getDirection() & Net::Direction::DirOut ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
cerr << "Elmore's delay : " << elm->delayElmore(rp) << endl;
|
||||
}
|
||||
DebugSession::close();
|
||||
}
|
||||
|
||||
|
|
|
@ -65,7 +65,7 @@ set<Node*> Tree::Branch_i ( Contact* ct )
|
|||
{
|
||||
set<Node*> 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<Node*> 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<Contact*>(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<Node*> 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 ) {
|
||||
|
|
Loading…
Reference in New Issue