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;
|
return _tree;
|
||||||
}
|
}
|
||||||
|
|
||||||
int Elmore::delayElmore ( RoutingPad* rp )
|
double Elmore::delayElmore ( RoutingPad* rp )
|
||||||
{
|
{
|
||||||
return _tree->Delay_Elmore(rp);
|
return _tree->Delay_Elmore(rp);
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,7 +43,7 @@ namespace Seabreeze {
|
||||||
Tree* getTree ();
|
Tree* getTree ();
|
||||||
inline const set<Contact*>& get_conts () const;
|
inline const set<Contact*>& get_conts () const;
|
||||||
inline Configuration* getConfig ();
|
inline Configuration* getConfig ();
|
||||||
int delayElmore ( RoutingPad* rp );
|
double delayElmore ( RoutingPad* rp );
|
||||||
void toTREE ( ostream& ) const;
|
void toTREE ( ostream& ) const;
|
||||||
private:
|
private:
|
||||||
Configuration* _config;
|
Configuration* _config;
|
||||||
|
|
|
@ -26,7 +26,7 @@ class Tree {
|
||||||
void add_node ( Node* node );
|
void add_node ( Node* node );
|
||||||
void After_i ( Node* ni );
|
void After_i ( Node* ni );
|
||||||
set<Node*> Branch_i ( Contact* ct );
|
set<Node*> Branch_i ( Contact* ct );
|
||||||
int Delay_Elmore ( RoutingPad* rp );
|
double Delay_Elmore ( RoutingPad* rp );
|
||||||
void print ( ostream& out );
|
void print ( ostream& out );
|
||||||
void clear ();
|
void clear ();
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -95,7 +95,7 @@ namespace Seabreeze {
|
||||||
{
|
{
|
||||||
cerr << "SeabreezeEngine::runTool() has been called." << endl;
|
cerr << "SeabreezeEngine::runTool() has been called." << endl;
|
||||||
|
|
||||||
DebugSession::addToTrace(net);
|
// DebugSession::addToTrace(net);
|
||||||
DebugSession::open(net, 190, 200);
|
DebugSession::open(net, 190, 200);
|
||||||
|
|
||||||
RoutingPad* driver= nullptr;
|
RoutingPad* driver= nullptr;
|
||||||
|
@ -119,6 +119,14 @@ namespace Seabreeze {
|
||||||
cdebug_log(199,0) << endl;
|
cdebug_log(199,0) << endl;
|
||||||
|
|
||||||
elm->buildTree(driver);
|
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();
|
DebugSession::close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -65,7 +65,7 @@ set<Node*> Tree::Branch_i ( Contact* ct )
|
||||||
{
|
{
|
||||||
set<Node*> ln;
|
set<Node*> ln;
|
||||||
Node *ni = get_node(ct);
|
Node *ni = get_node(ct);
|
||||||
while ( ni != nullptr ) {
|
while ( ni->Np != nullptr ) {
|
||||||
ln.insert(ni->Np);
|
ln.insert(ni->Np);
|
||||||
ni = ni->Np;
|
ni = ni->Np;
|
||||||
}
|
}
|
||||||
|
@ -73,7 +73,7 @@ set<Node*> Tree::Branch_i ( Contact* ct )
|
||||||
return ln;
|
return ln;
|
||||||
}
|
}
|
||||||
|
|
||||||
int Tree::Delay_Elmore ( RoutingPad* rp )
|
double Tree::Delay_Elmore ( RoutingPad* rp )
|
||||||
{
|
{
|
||||||
if ( rp == nullptr ) {
|
if ( rp == nullptr ) {
|
||||||
cerr << "Input RoutingPad is NULL. Please select a RoutingPad !" << endl;
|
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() ) {
|
for ( Component* c : rp->getSlaveComponents() ) {
|
||||||
Contact* cont = dynamic_cast<Contact*>(c);
|
Contact* cont = dynamic_cast<Contact*>(c);
|
||||||
|
|
||||||
if ( ct ) {
|
if ( cont ) {
|
||||||
ct = cont;
|
ct = cont;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ct == nullptr ) {
|
if ( ct == nullptr ) {
|
||||||
cerr << "No contact found" << endl;
|
cerr << "No contact found" << endl;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int t = 0;
|
double t = 0;
|
||||||
|
//---------------------------------------------------------------------------------------
|
||||||
|
cerr << "Contact to be calculated : " << ct->getId() << endl;
|
||||||
|
//---------------------------------------------------------------------------------------
|
||||||
|
|
||||||
set<Node*> br = Branch_i(ct);
|
set<Node*> br = Branch_i(ct);
|
||||||
|
|
||||||
Node *ni = get_node(ct);
|
Node *ni = get_node(ct);
|
||||||
After_i(ni);
|
After_i(ni);
|
||||||
ni->ap = 0;
|
ni->ap = 0;
|
||||||
|
|
||||||
// Compute Rt of all nodes
|
// Compute Rt of all nodes
|
||||||
for ( size_t k = 0; k < nodes.size(); k++ ) {
|
for ( size_t k = 0; k < nodes.size(); k++ ) {
|
||||||
if ( k == 0 )
|
if ( k == 0 )
|
||||||
nodes[k]->Rt = 0;
|
nodes[k]->Rt = nodes[k]->R;
|
||||||
else{
|
else{
|
||||||
if ( nodes[k]->ap == 0 ) {
|
if ( nodes[k]->ap == 0 ) {
|
||||||
if ( br.count(nodes[k]) > 0 ) {
|
if ( br.count(nodes[k]) > 0 ) {
|
||||||
|
|
Loading…
Reference in New Issue