# Coriolis Core (CRLCore) Documentation

# 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;
36 using Hurricane::JsonObject;
37 using Hurricane::JsonStack;
38 using Hurricane::Initializer;
39 using Hurricane::Name;
40 using Hurricane::Record;
41 using Hurricane::Layer;
42 using Hurricane::Technology;
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 bool hasLayer ( const Layer* ) const;
62 // Accessors.
63 RoutingGauge* getClone () const;
64 inline const Name getName () const;
65 inline Technology* getTechnology () const;
66 inline size_t getDepth () const;
67 inline DbU::Unit getHorizontalPitch () const;
68 inline DbU::Unit getVerticalPitch () const;
69 RoutingLayerGauge* getHorizontalGauge () const;
70 RoutingLayerGauge* getVerticalGauge () const;
71 RoutingLayerGauge* getLayerGauge ( const Layer* ) const;
72 size_t getViaDepth ( const Layer* ) const;
73 size_t getLayerDepth ( const Layer* ) const;
74 unsigned int getLayerType ( const Layer* ) const;
75 unsigned int getLayerDirection ( const Layer* ) const;
76 DbU::Unit getPitch ( const Layer* ) const;
77 DbU::Unit getOffset ( const Layer* ) const;
78 DbU::Unit getWireWidth ( const Layer* ) const;
79 DbU::Unit getViaWidth ( const Layer* ) const;
80 RoutingLayerGauge* getLayerGauge ( size_t depth ) const;
81 inline unsigned int getLayerDirection ( size_t depth ) const;
82 inline unsigned int getLayerType ( size_t depth ) const;
83 inline DbU::Unit getLayerPitch ( size_t depth ) const;
84 inline DbU::Unit getLayerOffset ( size_t depth ) const;
85 inline DbU::Unit getLayerWireWidth ( size_t depth ) const;
86 inline DbU::Unit getViaWidth ( size_t depth ) const;
87 const Layer* getRoutingLayer ( size_t depth ) const;
88 Layer* getContactLayer ( size_t depth ) const;
89 const vector<RoutingLayerGauge*>&
90 getLayerGauges () const;
91 // Methods.
92 void addLayerGauge ( RoutingLayerGauge* layerGauge );
93 void checkConnexity () const;
94 inline void setSymbolic ( bool );
95 // Hurricane Managment.
96 void toJson ( JsonWriter* ) const;
97 virtual Record* _getRecord ( Record* record=NULL ) const;
98 virtual string _getString () const;
99 virtual string _getTypeName () const;
100
101 protected:
102 // Internal - Attributes.
103 Name _name;
104 vector<RoutingLayerGauge*> _layerGauges;
105 vector<Layer*> _viaLayers;
106 Technology* _technology;
107 bool _isSymbolic;
108
109 // Internal - Constructors & Destructors.
110 RoutingGauge ( const char* name );
111 RoutingGauge ( const RoutingGauge& );
112 virtual ~RoutingGauge ();
113 virtual void _preDestroy ();
114 RoutingGauge& operator= ( const RoutingGauge& );
115 };
116
117
118 inline bool RoutingGauge::isSymbolic () const { return _isSymbolic; }
119 inline bool RoutingGauge::isTwoMetals () const { return (getDepth() < 3); }
120 inline bool RoutingGauge::isHV () const { return not isTwoMetals() and (getLayerGauge(1)->isHorizontal()); }
121 inline bool RoutingGauge::isVH () const { return not isTwoMetals() and (getLayerGauge(1)->isVertical()); }
122 inline const Name RoutingGauge::getName () const { return _name; }
123 inline size_t RoutingGauge::getDepth () const { return _layerGauges.size(); }
124 inline Technology* RoutingGauge::getTechnology () const { return _technology; }
125 inline DbU::Unit RoutingGauge::getHorizontalPitch () const { return getHorizontalGauge()->getPitch(); }
126 inline DbU::Unit RoutingGauge::getVerticalPitch () const { return getVerticalGauge ()->getPitch(); }
127 inline unsigned int RoutingGauge::getLayerType ( size_t depth ) const { return getLayerGauge(depth)->getType(); }
128 inline unsigned int RoutingGauge::getLayerDirection ( size_t depth ) const { return getLayerGauge(depth)->getDirection(); }
129 inline DbU::Unit RoutingGauge::getLayerPitch ( size_t depth ) const { return getLayerGauge(depth)->getPitch(); }
130 inline DbU::Unit RoutingGauge::getLayerOffset ( size_t depth ) const { return getLayerGauge(depth)->getOffset(); }
131 inline DbU::Unit RoutingGauge::getLayerWireWidth ( size_t depth ) const { return getLayerGauge(depth)->getWireWidth(); }
132 inline DbU::Unit RoutingGauge::getViaWidth ( size_t depth ) const { return getLayerGauge(depth)->getViaWidth(); }
133 inline void RoutingGauge::setSymbolic ( bool state ) { _isSymbolic=state; }
134
135
136 // -------------------------------------------------------------------
137 // Class : "JsonRoutingGauge".
138
139 class JsonRoutingGauge : public JsonObject {
140 public:
141 static void initialize ();
142 JsonRoutingGauge ( unsigned long flags );
143 virtual string getTypeName () const;
144 virtual JsonRoutingGauge* clone ( unsigned long flags ) const;
145 virtual void toData ( JsonStack& );
146 };
147
148
149 } // CRL namespace.
150
151 INSPECTOR_P_SUPPORT(CRL::RoutingGauge);
152
153 #endif
CRL::RoutingLayerGauge::getViaWidth
DbU::Unit getViaWidth() const
Definition: RoutingLayerGauge.h:182
CRL::RoutingLayerGauge::getPitch
DbU::Unit getPitch() const
Definition: RoutingLayerGauge.h:178
Hurricane::JsonObject
Hurricane::Name
CRL::RoutingLayerGauge::getWireWidth
DbU::Unit getWireWidth() const
Definition: RoutingLayerGauge.h:180
Hurricane::DbU::Unit
std::int64_t Unit
CRL::RoutingGauge::destroy
virtual void destroy()
CRL::RoutingGauge
Gauge for the detailed routing.
Definition: RoutingGauge.h:48
CRL::RoutingGauge::getClone
RoutingGauge * getClone() const
CRL::RoutingLayerGauge::getDirection
Constant::Direction getDirection() const
Definition: RoutingLayerGauge.h:173
CRL::RoutingGauge::getTechnology
Technology * getTechnology() const
Definition: RoutingGauge.h:124
Hurricane::JsonStack
CRL::RoutingGauge::getName
const Name getName() const
Definition: RoutingGauge.h:122
CRL::RoutingLayerGauge::getOffset
DbU::Unit getOffset() const
Definition: RoutingLayerGauge.h:177
CRL::RoutingGauge::getDepth
size_t getDepth() const
Definition: RoutingGauge.h:123
CRL::RoutingLayerGauge::getType
Constant::LayerGaugeType getType() const
Definition: RoutingLayerGauge.h:174
CRL::RoutingGauge::getLayerGauge
RoutingLayerGauge * getLayerGauge(const Layer *) const
CRL::RoutingGauge::addLayerGauge
void addLayerGauge(RoutingLayerGauge *layerGauge)
CRL::RoutingGauge::create
static RoutingGauge * create(const char *name)
CRL::RoutingGauge::getLayerGauges
const vector< RoutingLayerGauge * > & getLayerGauges() const
Hurricane::Layer
CRL::RoutingGauge::getContactLayer
Layer * getContactLayer(size_t depth) const
CRL::RoutingGauge::getRoutingLayer
const Layer * getRoutingLayer(size_t depth) const
Hurricane
CRL::RoutingGauge::checkConnexity
void checkConnexity() const
CRL::RoutingGauge::getLayerDepth
size_t getLayerDepth(const Layer *) const
Hurricane::Technology
CRL::RoutingLayerGauge
Gauge of a Layer for the detailed routing.
Definition: RoutingLayerGauge.h:77
Hurricane::Initializer
CRL::RoutingGauge::getLayerDirection
unsigned int getLayerDirection(const Layer *) const
CRL
The namespace of Coriolis Core.
Definition: Environment.h:24