Katabatic - Routing Toolbox


ChipTools.h
1 // -*- C++ -*-
2 //
3 // This file is part of the Coriolis Software.
4 // Copyright (c) UPMC/LIP6 2008-2018, All Rights Reserved
5 //
6 // +-----------------------------------------------------------------+
7 // | C O R I O L I S |
8 // | K a t a b a t i c - Routing Toolbox |
9 // | |
10 // | Author : Jean-Paul CHAPUT |
11 // | E-mail : Jean-Paul.Chaput@lip6.fr |
12 // | =============================================================== |
13 // | C++ Header : "./katabatic/ChipTools.h" |
14 // +-----------------------------------------------------------------+
15 
16 
17 #ifndef KATABATIC_CHIP_TOOLS_H
18 #define KATABATIC_CHIP_TOOLS_H
19 
20 #include <string>
21 #include "hurricane/DbU.h"
22 #include "hurricane/Torus.h"
23 namespace Hurricane {
24  class Cell;
25  class Instance;
26 }
27 
28 
29 namespace Katabatic {
30 
31  using Hurricane::Record;
32  using Hurricane::DbU;
33  using Hurricane::Box;
34  using Hurricane::Torus;
35  using Hurricane::Cell;
36  using Hurricane::Instance;
37 
38 
39  class ChipTools {
40  public:
41  ChipTools ( Cell* );
42  inline bool isChip () const;
43  inline Cell* getCell () const;
44  inline Instance* getCore () const;
45  inline Cell* getReferencePad () const;
46  inline DbU::Unit getPadWidth () const;
47  inline DbU::Unit getPadHeight () const;
48  inline DbU::Unit getPadPowerWidth () const;
49  inline DbU::Unit getPadClockWidth () const;
50  inline const Box& getChipBb () const;
51  inline const Box& getLeftPadsBb () const;
52  inline const Box& getRightPadsBb () const;
53  inline const Box& getTopPadsBb () const;
54  inline const Box& getBottomPadsBb () const;
55  inline const Torus& getCorona () const;
56  inline const Box& getCoronaBb () const;
57  inline bool intersectVPads ( const Box& ) const;
58  inline bool intersectHPads ( const Box& ) const;
59  inline bool vPadsEnclosed ( const Box& ) const;
60  inline bool hPadsEnclosed ( const Box& ) const;
61  public:
62  Record* _getRecord () const;
63  std::string _getString () const;
64  inline std::string _getTypeName () const;
65  private:
66  Cell* _cell;
67  Instance* _core;
68  Cell* _referencePad;
69  bool _isChip;
70  Box _chipBb;
71  Box _leftPadsBb;
72  Box _rightPadsBb;
73  Box _topPadsBb;
74  Box _bottomPadsBb;
75  Torus _chipCorona;
76  DbU::Unit _padWidth;
77  DbU::Unit _padHeight;
78  DbU::Unit _padPowerWidth;
79  DbU::Unit _padClockWidth;
80  };
81 
82 
83 // Inline Functions.
84  inline bool ChipTools::isChip () const { return _isChip; }
85  inline Cell* ChipTools::getCell () const { return _cell; }
86  inline Instance* ChipTools::getCore () const { return _core; }
87  inline Cell* ChipTools::getReferencePad () const { return _referencePad; }
88  inline DbU::Unit ChipTools::getPadWidth () const { return _padWidth; }
89  inline DbU::Unit ChipTools::getPadHeight () const { return _padHeight; }
90  inline DbU::Unit ChipTools::getPadPowerWidth () const { return _padPowerWidth; }
91  inline DbU::Unit ChipTools::getPadClockWidth () const { return _padClockWidth; }
92  inline const Box& ChipTools::getChipBb () const { return _chipBb; }
93  inline const Box& ChipTools::getLeftPadsBb () const { return _leftPadsBb; };
94  inline const Box& ChipTools::getRightPadsBb () const { return _rightPadsBb; };
95  inline const Box& ChipTools::getTopPadsBb () const { return _topPadsBb; };
96  inline const Box& ChipTools::getBottomPadsBb () const { return _bottomPadsBb; };
97  inline const Torus& ChipTools::getCorona () const { return _chipCorona; };
98  inline const Box& ChipTools::getCoronaBb () const { return _chipCorona.getOuterBox(); }
99  inline std::string ChipTools::_getTypeName () const { return "ChipTools"; }
100 
101  inline bool ChipTools::intersectVPads ( const Box& box ) const
102  { return _leftPadsBb.intersect(box) or _rightPadsBb.intersect(box); }
103 
104  inline bool ChipTools::intersectHPads ( const Box& box ) const
105  { return _topPadsBb.intersect(box) or _bottomPadsBb.intersect(box); }
106 
107  inline bool ChipTools::vPadsEnclosed ( const Box& box ) const
108  { return _leftPadsBb.contains(box) or _rightPadsBb.contains(box); }
109 
110  inline bool ChipTools::hPadsEnclosed ( const Box& box ) const
111  { return _topPadsBb.contains(box) or _bottomPadsBb.contains(box); }
112 
113 
114 } // Katabatic namespace.
115 
116 INSPECTOR_PV_SUPPORT(Katabatic::ChipTools);
117 
118 #endif // KATABATIC_CHIP_TOOLS_H
bool intersectVPads(const Box &) const
Definition: ChipTools.h:101
Instance * getCore() const
Definition: ChipTools.h:86
bool contains(const DbU::Unit &x, const DbU::Unit &y) const
std::int64_t Unit
const Box & getBottomPadsBb() const
Definition: ChipTools.h:96
Cell * getCell() const
Definition: ChipTools.h:85
const Torus & getCorona() const
Definition: ChipTools.h:97
bool intersect(const Box &box) const
bool isChip() const
Definition: ChipTools.h:84
const Box & getRightPadsBb() const
Definition: ChipTools.h:94
ChipTools(Cell *)
Definition: ChipTools.cpp:211
Utilities for Chip Level Design.
Definition: ChipTools.h:39
const Box & getChipBb() const
Definition: ChipTools.h:92
bool intersectHPads(const Box &) const
Definition: ChipTools.h:104
const Box & getTopPadsBb() const
Definition: ChipTools.h:95
const Box & getLeftPadsBb() const
Definition: ChipTools.h:93


Generated by doxygen 1.8.5 on Mon Oct 1 2018 Return to top of page
Katabatic - Routing Toolbox Copyright © 2008-2016 UPMC. All rights reserved