Hurricane VLSI Database


Pin.h
1 // -*- C++ -*-
2 //
3 // Copyright (c) BULL S.A. 2000-2020, 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 // | Author : Christophe Alexandre |
26 // | E-mail : Jean-Paul.Chaput@lip6.fr |
27 // | =============================================================== |
28 // | C++ Header : "./hurricane/Commons.h" |
29 // +-----------------------------------------------------------------+
30 
31 #pragma once
32 #include "hurricane/Contact.h"
33 #include "hurricane/Pins.h"
34 
35 namespace Hurricane {
36 
37 
38 // -------------------------------------------------------------------
39 // Class : "Hurricane::Pin".
40 
41  class Pin : public Contact {
42  public:
43  typedef Contact Inherit;
44  private:
45  static FastRTTI _fastRTTI;
46  public:
47  static inline const FastRTTI& fastRTTI ();
48  virtual const FastRTTI& vfastRTTI () const;
49 
50  public:
51  class AccessDirection {
52  public:
53  enum Code { UNDEFINED=0, NORTH=1, SOUTH=2, EAST=3, WEST=4 };
54  public:
55  AccessDirection ( Code code=UNDEFINED );
56  AccessDirection ( const AccessDirection& accessDirection );
57  AccessDirection& operator= ( const AccessDirection& accessDirection );
58  operator Code () const { return _code; };
59  Code getCode () const { return _code; };
60  std::string _getTypeName () const { return _TName("Pin::AccessDirection"); };
61  std::string _getString () const;
62  Record* _getRecord () const;
63  private:
64  Code _code;
65  };
66 
67  public:
68  class PlacementStatus {
69  public:
70  enum Code { UNPLACED=0, PLACED=1, FIXED=2 };
71  public:
72  PlacementStatus ( Code code=UNPLACED);
73  PlacementStatus ( const PlacementStatus& placementstatus );
74  PlacementStatus& operator= ( const PlacementStatus& placementstatus );
75  operator Code () const { return _code; };
76  Code getCode () const { return _code; };
77  std::string _getTypeName () const { return _TName("Pin::PlacementStatus"); };
78  std::string _getString () const;
79  Record* _getRecord () const;
80  private:
81  Code _code;
82  };
83 
84  protected:
85  Pin ( Net*
86  , const Name&
87  , const AccessDirection&
88  , const PlacementStatus&
89  , const Layer*
90  , DbU::Unit x
91  , DbU::Unit y
92  , DbU::Unit width
93  , DbU::Unit height
94  );
95  public:
96  static Pin* create ( Net*
97  , const Name&
98  , const AccessDirection&
99  , const PlacementStatus&
100  , const Layer*
101  , DbU::Unit x
102  , DbU::Unit y
103  , DbU::Unit width =0
104  , DbU::Unit height=0
105  );
106  public:
107  const Name& getName () const { return _name; };
108  const AccessDirection& getAccessDirection () const { return _accessDirection; };
109  const PlacementStatus& getPlacementStatus () const { return _placementStatus; };
110  bool isUnplaced () const { return _placementStatus == PlacementStatus::UNPLACED; };
111  bool isPlaced () const { return _placementStatus == PlacementStatus::PLACED; };
112  bool isFixed () const { return _placementStatus == PlacementStatus::FIXED; };
113  void setPlacementStatus ( const PlacementStatus& );
114  protected:
115  virtual void _postCreate ();
116  virtual void _preDestroy ();
117  private:
118  bool _postCheck ();
119  public:
120  virtual std::string _getTypeName () const {return _TName("Pin");};
121  virtual std::string _getString () const;
122  virtual Record* _getRecord () const;
123  Pin* _getNextOfCellPinMap () const { return _nextOfCellPinMap; };
124  void _setNextOfCellPinMap ( Pin* pin ) { _nextOfCellPinMap = pin; };
125  private:
126  Name _name;
127  AccessDirection _accessDirection;
128  PlacementStatus _placementStatus;
129  Pin* _nextOfCellPinMap;
130  };
131 
132 
133  inline const FastRTTI& Pin::fastRTTI () { return _fastRTTI; }
134 
135 
136 } // Hurricane namespace.
137 
138 
139 INSPECTOR_P_SUPPORT(Hurricane::Pin);
140 INSPECTOR_PR_SUPPORT(Hurricane::Pin::AccessDirection);
141 INSPECTOR_PR_SUPPORT(Hurricane::Pin::PlacementStatus);
Contact description (API)
Definition: Contact.h:43
std::int64_t Unit
Definition: DbU.h:67
Go description (API)
Definition: Go.h:34
Layer description (API)
Definition: Layer.h:120
Name description (API)
Definition: Name.h:35
Net description (API)
Definition: Net.h:46
Pin description (API)
Definition: Pin.h:41
Contains Almost Everything.
Definition: BasicLayer.h:39


Generated by doxygen 1.9.1 on Sun Dec 14 2025 Return to top of page
Hurricane VLSI Database Copyright © 2000-2020 Bull S.A. All rights reserved