2022-07-20 08:14:38 -05:00
|
|
|
// -*- C++ -*-
|
|
|
|
//
|
|
|
|
// This file is part of the Coriolis Software.
|
|
|
|
// Copyright (c) SU 2022-2022, All Rights Reserved
|
|
|
|
//
|
|
|
|
// +-----------------------------------------------------------------+
|
|
|
|
// | C O R I O L I S |
|
|
|
|
// | S e a b r e e z e - Timing Analysis |
|
|
|
|
// | |
|
|
|
|
// | Author : Vu Hoang Anh PHAM |
|
|
|
|
// | E-mail : Jean-Paul.Chaput@lip6.fr |
|
|
|
|
// | =============================================================== |
|
|
|
|
// | C++ Header : "./seabreeze/Tree.h" |
|
|
|
|
// +-----------------------------------------------------------------+
|
|
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
#include <set>
|
|
|
|
#include <vector>
|
|
|
|
#include <iostream>
|
2022-07-21 12:24:42 -05:00
|
|
|
namespace Hurricane {
|
|
|
|
class Contact;
|
|
|
|
class RoutingPad;
|
|
|
|
}
|
2022-07-20 08:14:38 -05:00
|
|
|
|
|
|
|
|
|
|
|
namespace Seabreeze {
|
|
|
|
|
2022-07-21 12:24:42 -05:00
|
|
|
using Hurricane::Record;
|
2022-07-20 08:14:38 -05:00
|
|
|
using Hurricane::Contact;
|
|
|
|
using Hurricane::RoutingPad;
|
2022-07-21 12:24:42 -05:00
|
|
|
class Node;
|
2022-07-20 08:14:38 -05:00
|
|
|
|
|
|
|
|
2022-07-21 04:44:44 -05:00
|
|
|
//---------------------------------------------------------
|
2022-07-20 08:14:38 -05:00
|
|
|
// Class : Seabreeze::Tree.
|
|
|
|
|
|
|
|
class Tree {
|
|
|
|
public:
|
2022-07-20 10:49:43 -05:00
|
|
|
Tree ();
|
|
|
|
~Tree ();
|
|
|
|
inline size_t getN ();
|
|
|
|
Node* getNode ( Contact* );
|
|
|
|
inline const std::vector<Node*>& getNodeList () const;
|
|
|
|
void newNode ();
|
|
|
|
void addNode ( Node* );
|
|
|
|
void markNodeAfter ( Node* );
|
2022-07-21 04:44:44 -05:00
|
|
|
void getBranch ( Contact* );
|
2022-07-20 10:49:43 -05:00
|
|
|
double computeElmoreDelay ( RoutingPad* );
|
|
|
|
void printNode ( std::ostream& , Node* , size_t depth );
|
|
|
|
void print ( std::ostream& );
|
|
|
|
void clear ();
|
2022-07-21 12:24:42 -05:00
|
|
|
Record* _getRecord () const;
|
|
|
|
std::string _getString () const;
|
|
|
|
std::string _getTypeName () const;
|
2022-07-20 08:14:38 -05:00
|
|
|
private:
|
|
|
|
std::vector<Node*> _nodes;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2022-07-21 04:44:44 -05:00
|
|
|
inline size_t Tree::getN () { return _nodes.size(); }
|
2022-07-20 10:49:43 -05:00
|
|
|
inline const std::vector<Node*>& Tree::getNodeList () const { return _nodes; }
|
2022-07-20 08:14:38 -05:00
|
|
|
|
|
|
|
|
|
|
|
} // Seabreeze namespace.
|
2022-07-21 12:24:42 -05:00
|
|
|
|
|
|
|
|
|
|
|
INSPECTOR_P_SUPPORT(Seabreeze::Tree);
|