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 #pragma once
18 #include <string>
19 #include "hurricane/DbU.h"
20 #include "hurricane/Torus.h"
21 namespace Hurricane {
22  class Cell;
23  class Instance;
24 }
25 
26 
27 namespace Katabatic {
28 
29  using Hurricane::Record;
30  using Hurricane::DbU;
31  using Hurricane::Box;
32  using Hurricane::Torus;
33  using Hurricane::Cell;
34  using Hurricane::Instance;
35 
36 
37  class ChipTools {
38  public:
39  ChipTools ( Cell* );
40  inline bool isChip () const;
41  inline Cell* getCell () const;
42  inline Instance* getCore () const;
43  inline Cell* getReferencePad () const;
44  inline DbU::Unit getPadWidth () const;
45  inline DbU::Unit getPadHeight () const;
46  inline DbU::Unit getPadPowerWidth () const;
47  inline DbU::Unit getPadClockWidth () const;
48  inline const Box& getChipBb () const;
49  inline const Box& getLeftPadsBb () const;
50  inline const Box& getRightPadsBb () const;
51  inline const Box& getTopPadsBb () const;
52  inline const Box& getBottomPadsBb () const;
53  inline const Torus& getCorona () const;
54  inline const Box& getCoronaBb () const;
55  inline bool intersectVPads ( const Box& ) const;
56  inline bool intersectHPads ( const Box& ) const;
57  inline bool vPadsEnclosed ( const Box& ) const;
58  inline bool hPadsEnclosed ( const Box& ) const;
59  public:
60  Record* _getRecord () const;
61  std::string _getString () const;
62  inline std::string _getTypeName () const;
63  private:
64  Cell* _cell;
65  Instance* _core;
66  Cell* _referencePad;
67  bool _isChip;
68  Box _chipBb;
69  Box _leftPadsBb;
70  Box _rightPadsBb;
71  Box _topPadsBb;
72  Box _bottomPadsBb;
73  Torus _chipCorona;
74  DbU::Unit _padWidth;
75  DbU::Unit _padHeight;
76  DbU::Unit _padPowerWidth;
77  DbU::Unit _padClockWidth;
78  };
79 
80 
81 // Inline Functions.
82  inline bool ChipTools::isChip () const { return _isChip; }
83  inline Cell* ChipTools::getCell () const { return _cell; }
84  inline Instance* ChipTools::getCore () const { return _core; }
85  inline Cell* ChipTools::getReferencePad () const { return _referencePad; }
86  inline DbU::Unit ChipTools::getPadWidth () const { return _padWidth; }
87  inline DbU::Unit ChipTools::getPadHeight () const { return _padHeight; }
88  inline DbU::Unit ChipTools::getPadPowerWidth () const { return _padPowerWidth; }
89  inline DbU::Unit ChipTools::getPadClockWidth () const { return _padClockWidth; }
90  inline const Box& ChipTools::getChipBb () const { return _chipBb; }
91  inline const Box& ChipTools::getLeftPadsBb () const { return _leftPadsBb; };
92  inline const Box& ChipTools::getRightPadsBb () const { return _rightPadsBb; };
93  inline const Box& ChipTools::getTopPadsBb () const { return _topPadsBb; };
94  inline const Box& ChipTools::getBottomPadsBb () const { return _bottomPadsBb; };
95  inline const Torus& ChipTools::getCorona () const { return _chipCorona; };
96  inline const Box& ChipTools::getCoronaBb () const { return _chipCorona.getOuterBox(); }
97  inline std::string ChipTools::_getTypeName () const { return "ChipTools"; }
98 
99  inline bool ChipTools::intersectVPads ( const Box& box ) const
100  { return _leftPadsBb.intersect(box) or _rightPadsBb.intersect(box); }
101 
102  inline bool ChipTools::intersectHPads ( const Box& box ) const
103  { return _topPadsBb.intersect(box) or _bottomPadsBb.intersect(box); }
104 
105  inline bool ChipTools::vPadsEnclosed ( const Box& box ) const
106  { return _leftPadsBb.contains(box) or _rightPadsBb.contains(box); }
107 
108  inline bool ChipTools::hPadsEnclosed ( const Box& box ) const
109  { return _topPadsBb.contains(box) or _bottomPadsBb.contains(box); }
110 
111 
112 } // Katabatic namespace.
113 
114 INSPECTOR_PR_SUPPORT(Katabatic::ChipTools);
bool intersectVPads(const Box &) const
Definition: ChipTools.h:99
bool intersectHPads(const Box &) const
Definition: ChipTools.h:102
bool contains(const DbU::Unit &x, const DbU::Unit &y) const
const Box & getBottomPadsBb() const
Definition: ChipTools.h:94
std::int64_t Unit
const Box & getRightPadsBb() const
Definition: ChipTools.h:92
bool isChip() const
Definition: ChipTools.h:82
const Torus & getCorona() const
Definition: ChipTools.h:95
The namespace dedicated to Katabatic.
Definition: Katabatic.dox:13
const Box & getLeftPadsBb() const
Definition: ChipTools.h:91
ChipTools(Cell *)
Definition: ChipTools.cpp:211
const Box & getChipBb() const
Definition: ChipTools.h:90
Utilities for Chip Level Design.
Definition: ChipTools.h:37
bool intersect(const Box &box) const
const Box & getTopPadsBb() const
Definition: ChipTools.h:93
Instance * getCore() const
Definition: ChipTools.h:84
Cell * getCell() const
Definition: ChipTools.h:83


Generated by doxygen 1.8.14 on Fri Oct 1 2021 Return to top of page
Katabatic - Routing Toolbox Copyright © 2008-2020 Sorbonne Universite. All rights reserved