# Hurricane VLSI Database

BasicLayer.h
1
2 // -*- C++ -*-
3 //
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
9 // it under the terms of the GNU Lesser General Public License as
10 // published by the Free Software Foundation, either version 3 of the
11 // License, or (at your option) any later version.
12 //
13 // Hurricane is distributed in the hope that it will be useful, but
14 // WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-
15 // TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU
16 // General Public License for more details.
17 //
18 // You should have received a copy of the Lesser GNU General Public
19 // License along with Hurricane. If not, see
20 // <http://www.gnu.org/licenses/>.
21 //
22 // +-----------------------------------------------------------------+
23 // | H U R R I C A N E |
24 // | V L S I B a c k e n d D a t a - B a s e |
25 // | |
26 // | Author : Remy Escassut |
27 // | E-mail : Jean-Paul.Chaput@lip6.fr |
28 // | =============================================================== |
29 // | C++ Header : "./hurricane/BasicLayer.h" |
30 // +-----------------------------------------------------------------+
31
32
33 # ifndef HURRICANE_BASIC_LAYER_H
34 # define HURRICANE_BASIC_LAYER_H
35
36 # include "hurricane/Layer.h"
37 # include "hurricane/BasicLayers.h"
38 # include "hurricane/Box.h"
39
40
41 namespace Hurricane {
42
43
44 class BasicLayer : public Layer {
45 public:
46 typedef Layer Super;
47
48 public:
49 // Subclass: Material.
50 class Material {
51 // Enum: Code.
52 public:
53 enum Code { nWell =0
54 , pWell
55 , nImplant
56 , pImplant
57 , active
58 , poly
59 , cut
60 , metal
61 , blockage
62 , info
63 , other
64 };
65 // Constructors.
66 Material ( const Code& code = other );
67 Material ( const Material& material );
68 // Methods.
69 Material& operator= ( const Material& material );
70 inline operator const Code& () const;
71 inline const Code& getCode () const;
72 static Material fromString ( const string& );
73 inline string _getTypeName () const;
74 string _getString () const;
75 Record* _getRecord () const;
76
77 // Internal: Attributes.
78 private:
79 Code _code;
80 };
81
82 public:
83 // Constructor.
84 static BasicLayer* create ( Technology* technology
85 , const Name& name
86 , const Material& material
87 , unsigned gds2Layer
88 , unsigned gds2Datatype
89 , const DbU::Unit& minimalSize = 0
90 , const DbU::Unit& minimalSpacing = 0
91 );
92 // Accessors.
93 inline const Material& getMaterial () const;
94 inline unsigned getGds2Layer () const;
95 inline unsigned getGds2Datatype () const;
96 virtual BasicLayers getBasicLayers () const;
97 virtual BasicLayer* getBlockageLayer () const;
98 inline const Name& getRealName () const;
99 // Updators
100 inline void setBlockageLayer ( BasicLayer* layer);
101 inline void setGds2Layer ( unsigned int );
102 inline void setGds2Datatype ( unsigned int );
103 inline void setRealName ( const char* realName);
104 // Hurricane Managment.
105 virtual void _toJson ( JsonWriter* writer ) const;
106 virtual BasicLayer* _getSymbolicBasicLayer ();
107 virtual string _getTypeName () const;
108 virtual string _getString () const;
109 virtual Record* _getRecord () const;
110
111 private:
112 // Internal: Attributes
113 Material _material;
114 unsigned _gds2Layer;
115 unsigned _gds2Datatype;
116 BasicLayer* _blockageLayer;
117 Name _realName;
118
119 protected:
120 // Internal: Constructors & Destructors.
121 BasicLayer ( Technology* technology
122 , const Name& name
123 , const Material& material
124 , unsigned gds2Layer
125 , unsigned gds2Datatype
126 , const DbU::Unit& minimalSize = 0
127 , const DbU::Unit& minimalSpacing = 0
128 );
129 virtual void _postCreate ();
130 virtual void _preDestroy ();
131 };
132
133
134 // Inline Functions.
135 inline BasicLayer::Material::operator const Code& () const { return _code; }
136 inline const BasicLayer::Material::Code&
137 BasicLayer::Material::getCode () const { return _code; }
138 inline string BasicLayer::Material::_getTypeName () const { return _TName("BasicLayer::Material"); }
139 inline const BasicLayer::Material&
140 BasicLayer::getMaterial () const { return _material; }
141 inline unsigned BasicLayer::getGds2Layer () const { return _gds2Layer; }
142 inline unsigned BasicLayer::getGds2Datatype () const { return _gds2Datatype; }
143 inline const Name& BasicLayer::getRealName () const { return _realName; }
144 inline void BasicLayer::setBlockageLayer ( BasicLayer* layer) { _blockageLayer = layer; layer->setBlockage(true); }
145 inline void BasicLayer::setGds2Layer ( unsigned int number ) { _gds2Layer=number; }
146 inline void BasicLayer::setGds2Datatype ( unsigned int number ) { _gds2Datatype=number; }
147 inline void BasicLayer::setRealName ( const char* realName) { _realName = realName; }
148
149
150 // -------------------------------------------------------------------
151 // Class : "Hurricane::JsonBasicLayer".
152
153 class JsonBasicLayer : public JsonLayer {
154 public:
155 static void initialize ();
156 JsonBasicLayer ( unsigned long flags );
157 ~JsonBasicLayer ();
158 virtual string getTypeName () const;
159 virtual JsonBasicLayer* clone ( unsigned long ) const;
160 virtual void toData ( JsonStack& );
161 };
162
163
164 } // End of Hurricane namespace.
165
166
167 // -------------------------------------------------------------------
168 // Inspector Support for : BasicLayer::Material::Code.
169
170
171 template<>
172 inline std::string getString<const Hurricane::BasicLayer::Material::Code*>
173 ( const Hurricane::BasicLayer::Material::Code* object )
174 {
175 switch ( *object ) {
176 case Hurricane::BasicLayer::Material::nWell: return "nWell";
177 case Hurricane::BasicLayer::Material::pWell: return "pWell";
178 case Hurricane::BasicLayer::Material::nImplant: return "nImplant";
179 case Hurricane::BasicLayer::Material::pImplant: return "pImplant";
180 case Hurricane::BasicLayer::Material::active: return "active";
181 case Hurricane::BasicLayer::Material::poly: return "poly";
182 case Hurricane::BasicLayer::Material::cut: return "cut";
183 case Hurricane::BasicLayer::Material::metal: return "metal";
184 case Hurricane::BasicLayer::Material::blockage: return "blockage";
185 case Hurricane::BasicLayer::Material::info: return "info";
186 case Hurricane::BasicLayer::Material::other: return "other";
187 }
188 return "undefined";
189 }
190
191
192 template<>
193 inline Hurricane::Record* getRecord<const Hurricane::BasicLayer::Material::Code*>
194 ( const Hurricane::BasicLayer::Material::Code* object )
195 {
196 Hurricane::Record* record = new Hurricane::Record(getString(object));
197 record->add(getSlot("Code", (unsigned int*)object));
198 return record;
199 }
200
201
202 INSPECTOR_P_SUPPORT(Hurricane::BasicLayer);
203 INSPECTOR_P_SUPPORT(Hurricane::BasicLayer::Material);
204 IOSTREAM_POINTER_SUPPORT(Hurricane::BasicLayer::Material::Code);
205
206
207 # endif
Hurricane::BasicLayer::Material::blockage
Definition: BasicLayer.h:61
Hurricane::BasicLayer::Material::cut
Definition: BasicLayer.h:59
Hurricane::BasicLayer::create
static BasicLayer * create(Technology *technology, const Name &name, const Material &material, unsigned gds2Layer, unsigned gds2Datatype, const DbU::Unit &minimalSize=0, const DbU::Unit &minimalSpacing=0)
Hurricane::BasicLayer
BasicLayer description (API)
Definition: BasicLayer.h:44
Hurricane::BasicLayer::Material::poly
Definition: BasicLayer.h:58
Hurricane::BasicLayer::Material::pImplant
Definition: BasicLayer.h:56
Hurricane::BasicLayer::Material::Code
Code
Definition: BasicLayer.h:53
Hurricane::Name
Name description (API)
Definition: Name.h:36
Hurricane::DbU::Unit
std::int64_t Unit
Definition: DbU.h:70
Hurricane::DBo
DataBase object root class (API).
Definition: DBo.h:47
Hurricane::BasicLayer::getMaterial
const Material & getMaterial() const
Definition: BasicLayer.h:140
Hurricane::JsonStack
JSON Parser Stack.
Definition: JsonObject.h:249
Hurricane::BasicLayer::Material::pWell
Definition: BasicLayer.h:54
Hurricane::BasicLayer::getRealName
const Name & getRealName() const
Definition: BasicLayer.h:143
Hurricane::BasicLayer::setRealName
void setRealName(const char *realName)
Definition: BasicLayer.h:147
Hurricane::BasicLayer::Material::nImplant
Definition: BasicLayer.h:55
Hurricane::BasicLayer::Material::other
Definition: BasicLayer.h:63
Hurricane::BasicLayer::Material::nWell
Definition: BasicLayer.h:53
Hurricane::Layer
Layer description (API)
Definition: Layer.h:52
Hurricane::BasicLayer::Material
Definition: BasicLayer.h:50
Hurricane::BasicLayer::Material::metal
Definition: BasicLayer.h:60
Hurricane
The namespace dedicated to Hurricane.
Definition: Generalities.dox:5
Hurricane::BasicLayer::setBlockageLayer
void setBlockageLayer(BasicLayer *layer)
Definition: BasicLayer.h:144
Hurricane::BasicLayer::Material::active
Definition: BasicLayer.h:57
Hurricane::Technology
Technological rules description (API).
Definition: Technology.h:66

Generated by doxygen 1.8.14 on Sun Mar 8 2020 | Return to top of page

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