Seabreeze : some changes
This commit is contained in:
parent
336b0ad015
commit
a6bfbdf825
|
@ -132,7 +132,7 @@ namespace Seabreeze {
|
|||
cerr << Error( "Elmore::buildFromNode(): rootNode has no contact, aborting." ) << endl;
|
||||
return;
|
||||
}
|
||||
_tree->add_node( rootNode );
|
||||
_tree->addNode( rootNode );
|
||||
|
||||
cdebug_log(199,1) << "Elmore::buildFromNode()" << endl;
|
||||
cdebug_log(199,0) << "rootNode->_contact=" << rootNode->contact() << endl;
|
||||
|
@ -167,7 +167,7 @@ namespace Seabreeze {
|
|||
cdebug_log(199,0) << "Node's contact has : " << count << " segments" << endl;
|
||||
|
||||
if (count == 1) {
|
||||
_tree->add_node( node );
|
||||
_tree->addNode( node );
|
||||
} else if (count > 2) {
|
||||
for ( Component* component : opposite->getSlaveComponents() ) {
|
||||
Segment* segment = dynamic_cast<Segment*>( component );
|
||||
|
@ -288,7 +288,7 @@ namespace Seabreeze {
|
|||
|
||||
|
||||
double Elmore::delayElmore ( RoutingPad* rp )
|
||||
{ return _tree->Delay_Elmore( rp ); }
|
||||
{ return _tree->computeElmoreDelay( rp ); }
|
||||
|
||||
|
||||
void Elmore::toTree ( ostream& os ) const
|
||||
|
|
|
@ -143,9 +143,19 @@ namespace Seabreeze {
|
|||
if (plug->getMasterNet()->getDirection() & Net::Direction::DirOut) {
|
||||
continue;
|
||||
}
|
||||
cdebug_log(199,0) << "| Elmore's delay: " << elmore->delayElmore(rp) << " " << rp << endl;
|
||||
cdebug_log(199,0) << "| Elmore's delay: " << elmore->delayElmore(rp) << " " << rp << endl;
|
||||
/*
|
||||
Contact* ct = nullptr;
|
||||
for ( Component* comp : rp->getSlaveComponents() ) {
|
||||
Contact* cont = dynamic_cast<Contact*>(comp);
|
||||
if (cont) {
|
||||
ct = cont;
|
||||
break;
|
||||
}
|
||||
}
|
||||
cerr << "| Elmore's delay: " << elmore->delayElmore(rp) << " " << ct << endl;
|
||||
}
|
||||
|
||||
*/
|
||||
cdebug_tabw(199,-1);
|
||||
DebugSession::close();
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@ namespace Seabreeze {
|
|||
}
|
||||
|
||||
|
||||
Node* Tree::get_node ( Contact* contact )
|
||||
Node* Tree::getNode ( Contact* contact )
|
||||
{
|
||||
for ( Node* n : _nodes ) {
|
||||
if (n->contact() == contact) return n;
|
||||
|
@ -52,11 +52,11 @@ namespace Seabreeze {
|
|||
}
|
||||
|
||||
|
||||
void Tree::new_node ()
|
||||
void Tree::newNode ()
|
||||
{ _nodes.push_back( new Node() ); }
|
||||
|
||||
|
||||
void Tree::add_node ( Node* node )
|
||||
void Tree::addNode ( Node* node )
|
||||
{
|
||||
node->setLabel( _nodes.size() );
|
||||
if (find(_nodes.begin(), _nodes.end(), node) == _nodes.end())
|
||||
|
@ -64,20 +64,20 @@ namespace Seabreeze {
|
|||
}
|
||||
|
||||
|
||||
void Tree::After_i ( Node *ni )
|
||||
void Tree::markNodeAfter ( Node *ni )
|
||||
{
|
||||
if (not ni) return;
|
||||
ni->setAp( 1 );
|
||||
for ( Node* child : ni->childs() ) {
|
||||
After_i( child );
|
||||
markNodeAfter( child );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
set<Node*> Tree::Branch_i ( Contact* contact )
|
||||
set<Node*> Tree::getParents ( Contact* contact )
|
||||
{
|
||||
set<Node*> parents;
|
||||
Node *ni = get_node( contact );
|
||||
Node *ni = getNode( contact );
|
||||
while ( ni->parent() ) {
|
||||
parents.insert( ni->parent() );
|
||||
ni = ni->parent();
|
||||
|
@ -86,7 +86,7 @@ namespace Seabreeze {
|
|||
}
|
||||
|
||||
|
||||
double Tree::Delay_Elmore ( RoutingPad* rp )
|
||||
double Tree::computeElmoreDelay ( RoutingPad* rp )
|
||||
{
|
||||
if (not rp) {
|
||||
cerr << Error( "Tree::computeDelay(): Sink RoutingPad argument is NULL." ) << endl;
|
||||
|
@ -113,9 +113,9 @@ namespace Seabreeze {
|
|||
cdebug_log(199,0) << " rp=" << rp << endl;
|
||||
cdebug_log(199,0) << " sink=" << sink << endl;
|
||||
|
||||
set<Node*> br = Branch_i( sink );
|
||||
Node* ni = get_node( sink );
|
||||
After_i( ni );
|
||||
set<Node*> br = getParents( sink );
|
||||
Node* ni = getNode( sink );
|
||||
markNodeAfter( ni );
|
||||
ni->setAp( 0 );
|
||||
|
||||
// Compute Rt of all nodes
|
||||
|
|
|
@ -36,7 +36,7 @@ namespace Seabreeze {
|
|||
public :
|
||||
Configuration ();
|
||||
Configuration ( const Configuration& );
|
||||
~Configuration ();
|
||||
virtual ~Configuration ();
|
||||
virtual Configuration* clone () const;
|
||||
inline double getRct () const;
|
||||
inline double getRsm () const;
|
||||
|
|
|
@ -82,7 +82,7 @@ namespace Seabreeze {
|
|||
|
||||
class ElmoreProperty : public Hurricane::PrivateProperty {
|
||||
friend class ElmoreExtension;
|
||||
public:
|
||||
private:
|
||||
static Name _name;
|
||||
public:
|
||||
static ElmoreProperty* create ( Net* net );
|
||||
|
|
|
@ -36,26 +36,26 @@ namespace Seabreeze {
|
|||
|
||||
class Tree {
|
||||
public:
|
||||
Tree ();
|
||||
~Tree ();
|
||||
inline size_t get_N ();
|
||||
Node* get_node ( Contact* );
|
||||
inline const std::vector<Node*>& get_node_list () const;
|
||||
void new_node ();
|
||||
void add_node ( Node* );
|
||||
void After_i ( Node* );
|
||||
std::set<Node*> Branch_i ( Contact* );
|
||||
double Delay_Elmore ( RoutingPad* );
|
||||
void printNode ( std::ostream& , Node* , size_t depth );
|
||||
void print ( std::ostream& );
|
||||
void clear ();
|
||||
Tree ();
|
||||
~Tree ();
|
||||
inline size_t getN ();
|
||||
Node* getNode ( Contact* );
|
||||
inline const std::vector<Node*>& getNodeList () const;
|
||||
void newNode ();
|
||||
void addNode ( Node* );
|
||||
void markNodeAfter ( Node* );
|
||||
std::set<Node*> getParents ( Contact* );
|
||||
double computeElmoreDelay ( RoutingPad* );
|
||||
void printNode ( std::ostream& , Node* , size_t depth );
|
||||
void print ( std::ostream& );
|
||||
void clear ();
|
||||
private:
|
||||
std::vector<Node*> _nodes;
|
||||
};
|
||||
|
||||
|
||||
inline size_t Tree::get_N () { return _nodes.size(); }
|
||||
inline const std::vector<Node*>& Tree::get_node_list () const { return _nodes; }
|
||||
inline size_t Tree::getN () { return _nodes.size(); }
|
||||
inline const std::vector<Node*>& Tree::getNodeList () const { return _nodes; }
|
||||
|
||||
|
||||
} // Seabreeze namespace.
|
||||
|
|
Loading…
Reference in New Issue