Hurricane VLSI Database


RoutingPad.h
1 // -*- C++ -*-
2 //
3 // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
4 //
5 // This file is part of Hurricane.
6 //
7 // Hurricane is free software: you can redistribute it and/or modify
8 // it under the terms of the GNU Lesser General Public License as
9 // published by the Free Software Foundation, either version 3 of the
10 // License, or (at your option) any later version.
11 //
12 // Hurricane is distributed in the hope that it will be useful, but
13 // WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-
14 // TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU
15 // General Public License for more details.
16 //
17 // You should have received a copy of the Lesser GNU General Public
18 // License along with Hurricane. If not, see
19 // <http://www.gnu.org/licenses/>.
20 //
21 // +-----------------------------------------------------------------+
22 // | H U R R I C A N E |
23 // | V L S I B a c k e n d D a t a - B a s e |
24 // | |
25 // | Authors : Hugo Clement & Marek Sroka |
26 // | E-mail : Jean-Paul.Chaput@lip6.fr |
27 // | =============================================================== |
28 // | C++ Header : "./hurricane/RoutingPad.h" |
29 // +-----------------------------------------------------------------+
30 
31 
32 #ifndef HURRICANE_ROUTINGPAD_H
33 #define HURRICANE_ROUTINGPAD_H
34 
35 #include "hurricane/Component.h"
36 #include "hurricane/Occurrence.h"
37 #include "hurricane/Pin.h"
38 
39 
40 namespace Hurricane {
41 
42  class Segment;
43 
44 
45 // -------------------------------------------------------------------
46 // Class : "RoutingPad".
47 
48  class RoutingPad : public Component {
49  public:
50  typedef Component Inherit;
51  enum Flags { BiggestArea = (1 << 0)
52  , HighestLayer = (1 << 1)
53  , LowestLayer = (1 << 2)
55  , ShowWarning = (1 << 4)
56  };
57  public:
58  static RoutingPad* create ( Net*, Occurrence, unsigned int flags=0 );
59  static RoutingPad* create ( Pin* );
60  public:
61  // Accessors.
62  bool isPlacedOccurrence ( unsigned int flags ) const;
63  inline bool isAtTopLevel () const;
64  inline Occurrence getOccurrence () const;
66  virtual const Layer* getLayer () const;
67  virtual DbU::Unit getX () const;
68  virtual DbU::Unit getY () const;
69  virtual Box getBoundingBox () const;
70  virtual Box getBoundingBox ( const BasicLayer* ) const;
71  virtual Point getCenter () const;
72  virtual Point getPosition () const;
79  // Mutators.
80  virtual void translate ( const DbU::Unit& dx, const DbU::Unit& dy );
82  Component* setOnBestComponent ( unsigned int flags );
84  // Miscellaeous.
85  Component* _getEntityAsComponent () const;
86  Segment* _getEntityAsSegment () const;
87  virtual void _toJson ( JsonWriter* ) const;
88  virtual std::string _getTypeName () const {return _TName("RoutingPad");};
89  virtual std::string _getString () const;
90  virtual Record* _getRecord () const;
91  protected:
92  virtual void _postCreate ();
93  virtual void _preDestroy ();
94  private:
95  RoutingPad ( Net*, Occurrence occurrence=Occurrence() );
96  private:
97  // Attributes.
98  Occurrence _occurrence;
99  };
100 
101 
102  inline bool RoutingPad::isAtTopLevel () const { return _occurrence.getPath().isEmpty(); }
103  inline Occurrence RoutingPad::getOccurrence () const { return _occurrence; };
104 
105 
106 // -------------------------------------------------------------------
107 // Class : "JsonRoutingPad".
108 
109  class JsonRoutingPad : public JsonComponent {
110  public:
111  static void initialize ();
112  JsonRoutingPad ( unsigned long flags );
113  virtual std::string getTypeName () const;
114  virtual JsonRoutingPad* clone ( unsigned long flags ) const;
115  virtual void toData ( JsonStack& );
116  };
117 
118 } // End of Hurricane namespace.
119 
120 
121 INSPECTOR_P_SUPPORT(Hurricane::RoutingPad);
122 
123 #endif // HURRICANE_ROUTINGPAD_H
BasicLayer description (API)
Definition: BasicLayer.h:44
Box description (API)
Definition: Box.h:31
Component description (API)
Definition: Component.h:42
std::int64_t Unit
Definition: DbU.h:67
JSON Parser Stack.
Definition: JsonObject.h:249
Layer description (API)
Definition: Layer.h:52
Net description (API)
Definition: Net.h:48
Occurrence description (API)
Definition: Occurrence.h:39
Path getPath() const
Definition: Occurrence.h:69
bool isEmpty() const
Pin description (API)
Definition: Pin.h:41
Point description (API)
Definition: Point.h:32
RoutingPad description (API)
Definition: RoutingPad.h:48
static RoutingPad * create(Pin *)
Occurrence getOccurrence() const
Definition: RoutingPad.h:103
virtual Box getBoundingBox() const
Occurrence getPlugOccurrence()
DbU::Unit getTargetX() const
bool isPlacedOccurrence(unsigned int flags) const
Component * setOnBestComponent(unsigned int flags)
DbU::Unit getTargetY() const
virtual void translate(const DbU::Unit &dx, const DbU::Unit &dy)
Component Inherit
Definition: RoutingPad.h:50
virtual DbU::Unit getX() const
Flags
Definition: RoutingPad.h:51
@ LowestLayer
Definition: RoutingPad.h:53
@ HighestLayer
Definition: RoutingPad.h:52
@ ShowWarning
Definition: RoutingPad.h:55
@ ComponentSelection
Definition: RoutingPad.h:54
@ BiggestArea
Definition: RoutingPad.h:51
DbU::Unit getSourceY() const
virtual const Layer * getLayer() const
static RoutingPad * create(Net *, Occurrence, unsigned int flags=0)
Point getTargetPosition() const
void setExternalComponent(Component *)
Point getSourcePosition() const
virtual Point getCenter() const
DbU::Unit getSourceX() const
virtual DbU::Unit getY() const
Segment description (API)
Definition: Segment.h:33
The namespace dedicated to Hurricane.
Definition: Generalities.dox:5


Generated by doxygen 1.9.1 on Thu Aug 11 2022 Return to top of page
Hurricane VLSI Database Copyright © 2000-2020 Bull S.A. All rights reserved