Coriolis Core (CRL) Documentation


RoutingGauge.h
1 // -*- C++ -*-
2 //
3 // This file is part of the Coriolis Software.
4 // Copyright (c) UPMC 2008-2018, All Rights Reserved
5 //
6 // +-----------------------------------------------------------------+
7 // | C O R I O L I S |
8 // | Alliance / Hurricane Interface |
9 // | |
10 // | Author : Jean-Paul CHAPUT |
11 // | E-mail : Jean-Paul.Chaput@lip6.fr |
12 // | =============================================================== |
13 // | C++ Header : "./crlcore/RoutingGauge.h" |
14 // +-----------------------------------------------------------------+
15 
16 
17 #ifndef CRL_ROUTING_GAUGE_H
18 #define CRL_ROUTING_GAUGE_H
19 
20 #include <string>
21 #include <vector>
22 #include "hurricane/Name.h"
23 #include "hurricane/Slot.h"
24 
25 namespace Hurricane {
26  class Layer;
27  class Technology;
28 }
29 
30 #include "crlcore/RoutingLayerGauge.h"
31 
32 namespace CRL {
33 
34  using std::string;
35  using std::vector;
39  using Hurricane::Name;
40  using Hurricane::Record;
41  using Hurricane::Layer;
43 
44 
45 // -------------------------------------------------------------------
46 // Class : "RoutingGauge".
47 
48  class RoutingGauge {
49 
50  public:
51  // Constants.
52  static const size_t nlayerdepth;
53  // Constructors & Destructors.
54  static RoutingGauge* create ( const char* name );
55  virtual void destroy ();
56  // Predicates.
57  inline bool isSymbolic () const;
58  inline bool isTwoMetals () const;
59  inline bool isHV () const;
60  inline bool isVH () const;
61  inline bool hasPowerSupply () const;
62  bool hasLayer ( const Layer* ) const;
63  // Accessors.
64  RoutingGauge* getClone () const;
65  inline const Name getName () const;
66  inline Technology* getTechnology () const;
67  inline size_t getDepth () const;
68  inline DbU::Unit getHorizontalPitch () const;
69  inline DbU::Unit getVerticalPitch () const;
70  RoutingLayerGauge* getHorizontalGauge () const;
71  RoutingLayerGauge* getVerticalGauge () const;
72  RoutingLayerGauge* getPowerSupplyGauge () const;
73  RoutingLayerGauge* getLayerGauge ( const Layer* ) const;
74  size_t getViaDepth ( const Layer* ) const;
75  size_t getLayerDepth ( const Layer* ) const;
76  unsigned int getLayerType ( const Layer* ) const;
77  unsigned int getLayerDirection ( const Layer* ) const;
78  DbU::Unit getPitch ( const Layer* ) const;
79  DbU::Unit getOffset ( const Layer* ) const;
80  DbU::Unit getWireWidth ( const Layer* ) const;
81  DbU::Unit getPWireWidth ( const Layer* ) const;
82  DbU::Unit getViaWidth ( const Layer* ) const;
83  RoutingLayerGauge* getLayerGauge ( size_t depth ) const;
84  inline unsigned int getLayerDirection ( size_t depth ) const;
85  inline unsigned int getLayerType ( size_t depth ) const;
86  inline DbU::Unit getLayerPitch ( size_t depth ) const;
87  inline DbU::Unit getLayerOffset ( size_t depth ) const;
88  inline DbU::Unit getLayerWireWidth ( size_t depth ) const;
89  inline DbU::Unit getLayerPWireWidth ( size_t depth ) const;
90  inline DbU::Unit getViaWidth ( size_t depth ) const;
91  const Layer* getRoutingLayer ( size_t depth ) const;
92  Layer* getContactLayer ( size_t depth ) const;
93  const vector<RoutingLayerGauge*>&
94  getLayerGauges () const;
95  // Methods.
96  void addLayerGauge ( RoutingLayerGauge* layerGauge );
97  void checkConnexity () const;
98  inline void setSymbolic ( bool );
99  // Hurricane Managment.
100  void toJson ( JsonWriter* ) const;
101  virtual Record* _getRecord ( Record* record=NULL ) const;
102  virtual string _getString () const;
103  virtual string _getTypeName () const;
104 
105  protected:
106  // Internal - Attributes.
107  Name _name;
108  vector<RoutingLayerGauge*> _layerGauges;
109  vector<Layer*> _viaLayers;
110  Technology* _technology;
111  bool _isSymbolic;
112 
113  // Internal - Constructors & Destructors.
114  RoutingGauge ( const char* name );
115  RoutingGauge ( const RoutingGauge& );
116  virtual ~RoutingGauge ();
117  virtual void _preDestroy ();
118  RoutingGauge& operator= ( const RoutingGauge& );
119  };
120 
121 
122  inline bool RoutingGauge::isSymbolic () const { return _isSymbolic; }
123  inline bool RoutingGauge::isTwoMetals () const { return (getDepth() < 3); }
124  inline bool RoutingGauge::isHV () const { return not isTwoMetals() and (getLayerGauge(1)->isHorizontal()); }
125  inline bool RoutingGauge::isVH () const { return not isTwoMetals() and (getLayerGauge(1)->isVertical()); }
126  inline bool RoutingGauge::hasPowerSupply () const { return (getPowerSupplyGauge() != NULL); }
127  inline const Name RoutingGauge::getName () const { return _name; }
128  inline size_t RoutingGauge::getDepth () const { return _layerGauges.size(); }
129  inline Technology* RoutingGauge::getTechnology () const { return _technology; }
130  inline DbU::Unit RoutingGauge::getHorizontalPitch () const { return getHorizontalGauge()->getPitch(); }
131  inline DbU::Unit RoutingGauge::getVerticalPitch () const { return getVerticalGauge ()->getPitch(); }
132  inline unsigned int RoutingGauge::getLayerType ( size_t depth ) const { return getLayerGauge(depth)->getType(); }
133  inline unsigned int RoutingGauge::getLayerDirection ( size_t depth ) const { return getLayerGauge(depth)->getDirection(); }
134  inline DbU::Unit RoutingGauge::getLayerPitch ( size_t depth ) const { return getLayerGauge(depth)->getPitch(); }
135  inline DbU::Unit RoutingGauge::getLayerOffset ( size_t depth ) const { return getLayerGauge(depth)->getOffset(); }
136  inline DbU::Unit RoutingGauge::getLayerWireWidth ( size_t depth ) const { return getLayerGauge(depth)->getWireWidth(); }
137  inline DbU::Unit RoutingGauge::getLayerPWireWidth ( size_t depth ) const { return getLayerGauge(depth)->getPWireWidth(); }
138  inline DbU::Unit RoutingGauge::getViaWidth ( size_t depth ) const { return getLayerGauge(depth)->getViaWidth(); }
139  inline void RoutingGauge::setSymbolic ( bool state ) { _isSymbolic=state; }
140 
141 
142 // -------------------------------------------------------------------
143 // Class : "JsonRoutingGauge".
144 
145  class JsonRoutingGauge : public JsonObject {
146  public:
147  static void initialize ();
148  JsonRoutingGauge ( unsigned long flags );
149  virtual string getTypeName () const;
150  virtual JsonRoutingGauge* clone ( unsigned long flags ) const;
151  virtual void toData ( JsonStack& );
152  };
153 
154 
155 } // CRL namespace.
156 
157 INSPECTOR_P_SUPPORT(CRL::RoutingGauge);
158 
159 #endif
DbU::Unit getViaWidth() const
Definition: RoutingLayerGauge.h:188
DbU::Unit getPitch() const
Definition: RoutingLayerGauge.h:183
DbU::Unit getWireWidth() const
Definition: RoutingLayerGauge.h:185
std::int64_t Unit
virtual void destroy()
Gauge for the detailed routing.
Definition: RoutingGauge.h:48
RoutingGauge * getClone() const
Constant::Direction getDirection() const
Definition: RoutingLayerGauge.h:178
Technology * getTechnology() const
Definition: RoutingGauge.h:129
const Name getName() const
Definition: RoutingGauge.h:127
DbU::Unit getOffset() const
Definition: RoutingLayerGauge.h:182
size_t getDepth() const
Definition: RoutingGauge.h:128
Constant::LayerGaugeType getType() const
Definition: RoutingLayerGauge.h:179
RoutingLayerGauge * getLayerGauge(const Layer *) const
void addLayerGauge(RoutingLayerGauge *layerGauge)
static RoutingGauge * create(const char *name)
const vector< RoutingLayerGauge * > & getLayerGauges() const
Layer * getContactLayer(size_t depth) const
const Layer * getRoutingLayer(size_t depth) const
void checkConnexity() const
size_t getLayerDepth(const Layer *) const
Gauge of a Layer for the detailed routing.
Definition: RoutingLayerGauge.h:75
unsigned int getLayerDirection(const Layer *) const
The namespace of Coriolis Core.
Definition: Environment.h:24


Generated by doxygen 1.8.14 on Sun Nov 21 2021 Return to top of page
Coriolis Core (CRL) Copyright © 2008-2020 Sorbonne Universite, All rights reserved