Ophidian
 All Classes Namespaces Functions
elmore.h
1 /*
2  * Copyright 2016 Ophidian
3 Licensed to the Apache Software Foundation (ASF) under one
4 or more contributor license agreements. See the NOTICE file
5 distributed with this work for additional information
6 regarding copyright ownership. The ASF licenses this file
7 to you under the Apache License, Version 2.0 (the
8 "License"); you may not use this file except in compliance
9 with the License. You may obtain a copy of the License at
10 
11  http://www.apache.org/licenses/LICENSE-2.0
12 
13 Unless required by applicable law or agreed to in writing,
14 software distributed under the License is distributed on an
15 "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 KIND, either express or implied. See the License for the
17 specific language governing permissions and limitations
18 under the License.
19  */
20 
21 #ifndef SRC_TIMING_ELMORE_H_
22 #define SRC_TIMING_ELMORE_H_
23 
24 #include "../interconnection/rc_tree.h"
25 #include <lemon/maps.h>
26 namespace ophidian {
27 namespace timing {
28 
29 class elmore {
30 
31  const interconnection::rc_tree& m_tree;
32  lemon::ListGraph::NodeMap< boost::units::quantity< boost::units::si::time > > m_elmore_delay;
33  lemon::ListGraph::NodeMap< boost::units::quantity< boost::units::si::capacitance > > m_downstream_capacitance;
34  lemon::ListGraph::NodeMap< std::pair<interconnection::rc_tree::capacitor_id, interconnection::rc_tree::resistor_id> > m_pred;
35  std::vector< interconnection::rc_tree::capacitor_id > m_order;
36  interconnection::rc_tree::capacitor_id m_source;
37 public:
38  elmore(const interconnection::rc_tree& tree, interconnection::rc_tree::capacitor_id source);
39  virtual ~elmore();
40 
41  void update();
42 
43  boost::units::quantity<boost::units::si::time> at(interconnection::rc_tree::capacitor_id capacitor) const {
44  return m_elmore_delay[capacitor];
45  }
46 
47  const lemon::ListGraph::NodeMap< std::pair<interconnection::rc_tree::capacitor_id, interconnection::rc_tree::resistor_id> > & pred() const {
48  return m_pred;
49  }
50  const std::vector< interconnection::rc_tree::capacitor_id > & order() const {
51  return m_order;
52  }
53 };
54 
56  const interconnection::packed_rc_tree * m_tree;
57  std::vector<boost::units::quantity< boost::units::si::time > > m_delays;
58 public:
59  packed_elmore();
60  virtual ~packed_elmore();
61  void tree(const interconnection::packed_rc_tree & tree);
62 
63  const boost::units::quantity< boost::units::si::time >& at(std::size_t i) const {
64  return m_delays.at(i);
65  }
66  void run();
67 };
68 
69 
70 } /* namespace timing */
71 } /* namespace ophidian */
72 
73 #endif /* SRC_TIMING_ELMORE_H_ */
Definition: elmore.h:29
Packed RC Tree Class.
Definition: rc_tree.h:39
Definition: elmore.h:55
RC Tree Class.
Definition: rc_tree.h:78