# Hurricane VLSI Database

Pin.h
1 // ****************************************************************************************************
2 // File: ./hurricane/Pin.h
3 // Authors: C. Alexandre
4 // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
5 //
6 // This file is part of Hurricane.
7 //
8 // Hurricane is free software: you can redistribute it and/or modify it under the terms of the GNU
9 // Lesser General Public License as 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 WITHOUT ANY WARRANTY; without even
13 // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU
14 // General Public License for more details.
15 //
16 // You should have received a copy of the Lesser GNU General Public License along with Hurricane. If
17 // not, see <http://www.gnu.org/licenses/>.
18 // ****************************************************************************************************
19
20 #ifndef HURRICANE_PIN
21 #define HURRICANE_PIN
22
23 #include "hurricane/Contact.h"
24 #include "hurricane/Pins.h"
25
26 namespace Hurricane {
27
28
29
30 // ****************************************************************************************************
31 // Pin declaration
32 // ****************************************************************************************************
33
34 class Pin : public Contact {
35 // ***********************
36
37 // Types
38 // *****
39
40 public: typedef Contact Inherit;
41
42 public: class AccessDirection {
43 // **************************
44
45 public: enum Code {UNDEFINED=0, NORTH=1, SOUTH=2, EAST=3, WEST=4};
46
47 private: Code _code;
48
49 public: AccessDirection(const Code& code = UNDEFINED);
50 public: AccessDirection(const AccessDirection& accessDirection);
51
52 public: AccessDirection& operator=(const AccessDirection& accessDirection);
53
54 public: operator const Code&() const {return _code;};
55
56 public: const Code& getCode() const {return _code;};
57
58 public: string _getTypeName() const { return _TName("Pin::AccessDirection"); };
59 public: string _getString() const;
60 public: Record* _getRecord() const;
61
62 };
63
64 public: class PlacementStatus {
65 // **************************
66
67 public: enum Code {UNPLACED=0, PLACED=1, FIXED=2};
68
69 private: Code _code;
70
71 public: PlacementStatus(const Code& code = UNPLACED);
72 public: PlacementStatus(const PlacementStatus& placementstatus);
73
74 public: PlacementStatus& operator=(const PlacementStatus& placementstatus);
75
76 public: operator const Code&() const {return _code;};
77
78 public: const Code& getCode() const {return _code;};
79
80 public: string _getTypeName() const { return _TName("Pin::PlacementStatus"); };
81 public: string _getString() const;
82 public: Record* _getRecord() const;
83
84 };
85
86 // Attributes
87 // **********
88
89 private: Name _name;
90 private: AccessDirection _accessDirection;
91 private: PlacementStatus _placementStatus;
92 private: Pin* _nextOfCellPinMap;
93
94 // Constructors
95 // ************
96
97 protected: Pin( Net* net
98 , const Name& name
99 , const AccessDirection& accessDirection
100 , const PlacementStatus& placementStatus
101 , const Layer* layer
102 , const DbU::Unit& x
103 , const DbU::Unit& y
104 , const DbU::Unit& width = 0
105 , const DbU::Unit& height = 0
106 );
107 public: static Pin* create( Net* net
108 , const Name& name
109 , const AccessDirection& accessDirection
110 , const PlacementStatus& placementStatus
111 , const Layer* layer
112 , const DbU::Unit& x
113 , const DbU::Unit& y
114 , const DbU::Unit& width = 0
115 , const DbU::Unit& height = 0
116 );
117
118 // Accessors
119 // *********
120
121 public: const Name& getName() const {return _name;};
122 public: const AccessDirection& getAccessDirection() const {return _accessDirection;};
123 public: const PlacementStatus& getPlacementStatus() const {return _placementStatus;};
124
125 // Predicates
126 // **********
127
128 public: bool isUnplaced() const {return _placementStatus == PlacementStatus::UNPLACED;};
129 public: bool isPlaced() const {return _placementStatus == PlacementStatus::PLACED;};
130 public: bool isFixed() const {return _placementStatus == PlacementStatus::FIXED;};
131
132 // Updators
133 // ********
134
135 public: void setPlacementStatus(const PlacementStatus& placementstatus);
136
137 // Others
138 // ******
139
140 protected: virtual void _postCreate();
141
142 protected: virtual void _preDestroy();
143
144 public: virtual string _getTypeName() const {return _TName("Pin");};
145 public: virtual string _getString() const;
146 public: virtual Record* _getRecord() const;
147
148 public: Pin* _getNextOfCellPinMap() const {return _nextOfCellPinMap;};
149
150 public: void _setNextOfCellPinMap(Pin* pin) {_nextOfCellPinMap = pin;};
151
152 };
153
154
155 } // End of Hurricane namespace.
156
157
158 INSPECTOR_P_SUPPORT(Hurricane::Pin);
159 INSPECTOR_PR_SUPPORT(Hurricane::Pin::AccessDirection);
160 INSPECTOR_PR_SUPPORT(Hurricane::Pin::PlacementStatus);
161
162
163 #endif // HURRICANE_PIN
164
165 // ****************************************************************************************************
166 // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
167 // ****************************************************************************************************
Hurricane::Pin
Pin description (API)
Definition: Pin.h:34
Hurricane::Name
Name description (API)
Definition: Name.h:35
Hurricane::Contact
Contact description (API)
Definition: Contact.h:33
Hurricane::DbU::Unit
std::int64_t Unit
Definition: DbU.h:70
Hurricane::DBo
DataBase object root class (API).
Definition: DBo.h:47
Hurricane::Layer
Layer description (API)
Definition: Layer.h:52
Hurricane
The namespace dedicated to Hurricane.
Definition: Generalities.dox:5
Hurricane::Net
Net description (API)
Definition: Net.h:48

Generated by doxygen 1.8.14 on Tue Jul 21 2020 | Return to top of page

Hurricane VLSI Database | Copyright © 2000-2016 Bull S.A. All rights reserved