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

Generated by doxygen 1.8.14 on Mon Apr 27 2020 | Return to top of page

Coriolis Core (CRL) | Copyright © 2008-2016 UPMC All rights reserved