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 
45  public:
46  class AccessDirection {
47  public:
48  enum Code { UNDEFINED=0, NORTH=1, SOUTH=2, EAST=3, WEST=4 };
49  public:
50  AccessDirection ( Code code=UNDEFINED );
51  AccessDirection ( const AccessDirection& accessDirection );
52  AccessDirection& operator= ( const AccessDirection& accessDirection );
53  operator Code () const { return _code; };
54  Code getCode () const { return _code; };
55  std::string _getTypeName () const { return _TName("Pin::AccessDirection"); };
56  std::string _getString () const;
57  Record* _getRecord () const;
58  private:
59  Code _code;
60  };
61 
62  public:
63  class PlacementStatus {
64  public:
65  enum Code { UNPLACED=0, PLACED=1, FIXED=2 };
66  public:
67  PlacementStatus ( Code code=UNPLACED);
68  PlacementStatus ( const PlacementStatus& placementstatus );
69  PlacementStatus& operator= ( const PlacementStatus& placementstatus );
70  operator Code () const { return _code; };
71  Code getCode () const { return _code; };
72  std::string _getTypeName () const { return _TName("Pin::PlacementStatus"); };
73  std::string _getString () const;
74  Record* _getRecord () const;
75  private:
76  Code _code;
77  };
78 
79  protected:
80  Pin ( Net*
81  , const Name&
82  , const AccessDirection&
83  , const PlacementStatus&
84  , const Layer*
85  , DbU::Unit x
86  , DbU::Unit y
87  , DbU::Unit width
88  , DbU::Unit height
89  );
90  public:
91  static Pin* create ( Net*
92  , const Name&
93  , const AccessDirection&
94  , const PlacementStatus&
95  , const Layer*
96  , DbU::Unit x
97  , DbU::Unit y
98  , DbU::Unit width =0
99  , DbU::Unit height=0
100  );
101  public:
102  const Name& getName () const { return _name; };
103  const AccessDirection& getAccessDirection () const { return _accessDirection; };
104  const PlacementStatus& getPlacementStatus () const { return _placementStatus; };
105  bool isUnplaced () const { return _placementStatus == PlacementStatus::UNPLACED; };
106  bool isPlaced () const { return _placementStatus == PlacementStatus::PLACED; };
107  bool isFixed () const { return _placementStatus == PlacementStatus::FIXED; };
108  void setPlacementStatus ( const PlacementStatus& );
109  protected:
110  virtual void _postCreate ();
111  virtual void _preDestroy ();
112  private:
113  bool _postCheck ();
114  public:
115  virtual std::string _getTypeName () const {return _TName("Pin");};
116  virtual std::string _getString () const;
117  virtual Record* _getRecord () const;
118  Pin* _getNextOfCellPinMap () const { return _nextOfCellPinMap; };
119  void _setNextOfCellPinMap ( Pin* pin ) { _nextOfCellPinMap = pin; };
120  private:
121  Name _name;
122  AccessDirection _accessDirection;
123  PlacementStatus _placementStatus;
124  Pin* _nextOfCellPinMap;
125  };
126 
127 
128 } // Hurricane namespace.
129 
130 
131 INSPECTOR_P_SUPPORT(Hurricane::Pin);
132 INSPECTOR_PR_SUPPORT(Hurricane::Pin::AccessDirection);
133 INSPECTOR_PR_SUPPORT(Hurricane::Pin::PlacementStatus);
Contact description (API)
Definition: Contact.h:43
DataBase object root class (API).
Definition: DBo.h:45
std::int64_t Unit
Definition: DbU.h:67
Layer description (API)
Definition: Layer.h:52
Name description (API)
Definition: Name.h:35
Net description (API)
Definition: Net.h:48
Pin description (API)
Definition: Pin.h:41
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