Coriolis Core (CRL) Documentation


RoutingGauge.h
1 // -*- C++ -*-
2 //
3 // This file is part of the Coriolis Software.
4 // Copyright (c) Sorbonne Université 2008-2022, 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 #pragma once
18 #include <string>
19 #include <vector>
20 #include "hurricane/Name.h"
21 #include "hurricane/Slot.h"
22 
23 namespace Hurricane {
24  class Layer;
25  class Technology;
26 }
27 
28 #include "crlcore/RoutingLayerGauge.h"
29 
30 namespace CRL {
31 
32  using std::string;
33  using std::vector;
37  using Hurricane::Name;
38  using Hurricane::Record;
39  using Hurricane::Layer;
41 
42 
43 // -------------------------------------------------------------------
44 // Class : "RoutingGauge".
45 
46  class RoutingGauge {
47 
48  public:
49  // Constants.
50  static const size_t nlayerdepth;
51  // Constructors & Destructors.
52  static RoutingGauge* create ( const char* name );
53  virtual void destroy ();
54  // Predicates.
55  inline bool isSymbolic () const;
56  inline bool isTwoMetals () const;
57  inline bool isSuperPitched () const;
58  inline bool isHV () const;
59  inline bool isVH () const;
60  inline bool hasPowerSupply () const;
61  bool hasLayer ( const Layer* ) const;
62  // Accessors.
64  inline const Name getName () const;
65  inline Technology* getTechnology () const;
66  inline size_t getDepth () const;
67  inline size_t getUsableLayers () const;
68  inline size_t getFirstRoutingLayer () const;
69  inline size_t toRoutingDepth ( size_t depth ) const;
70  inline DbU::Unit getHorizontalPitch () const;
71  inline DbU::Unit getVerticalPitch () const;
72  RoutingLayerGauge* getFirstRoutingGauge () const;
73  RoutingLayerGauge* getHorizontalGauge () const;
74  RoutingLayerGauge* getVerticalGauge () const;
75  RoutingLayerGauge* getPowerSupplyGauge () const;
77  bool isUsable ( const Layer* ) const;
78  size_t getViaDepth ( const Layer* ) const;
79  size_t getLayerDepth ( const Layer* ) const;
80  unsigned int getLayerType ( const Layer* ) const;
81  unsigned int getLayerDirection ( const Layer* ) const;
82  DbU::Unit getPitch ( const Layer* ) const;
83  DbU::Unit getOffset ( const Layer* ) const;
84  DbU::Unit getWireWidth ( const Layer* ) const;
85  DbU::Unit getPWireWidth ( const Layer* ) const;
86  DbU::Unit getViaWidth ( const Layer* ) const;
87  RoutingLayerGauge* getLayerGauge ( size_t depth ) const;
88  const Layer* getRoutingLayer ( size_t depth ) const;
89  Layer* getContactLayer ( size_t depth ) const;
90  inline bool isUsable ( size_t depth ) const;
91  inline unsigned int getLayerType ( size_t depth ) const;
92  inline unsigned int getLayerDirection ( size_t depth ) const;
93  inline DbU::Unit getLayerPitch ( size_t depth ) const;
94  inline DbU::Unit getLayerOffset ( size_t depth ) const;
95  inline DbU::Unit getLayerWireWidth ( size_t depth ) const;
96  inline DbU::Unit getLayerPWireWidth ( size_t depth ) const;
97  inline DbU::Unit getViaWidth ( size_t depth ) const;
98  const vector<RoutingLayerGauge*>&
99  getLayerGauges () const;
100  // Methods.
101  void addLayerGauge ( RoutingLayerGauge* layerGauge );
102  void checkConnexity () const;
103  inline void setSymbolic ( bool );
104  // Hurricane Managment.
105  void toJson ( JsonWriter* ) const;
106  virtual Record* _getRecord ( Record* record=NULL ) const;
107  virtual string _getString () const;
108  virtual string _getTypeName () const;
109 
110  protected:
111  // Internal - Attributes.
112  Name _name;
113  vector<RoutingLayerGauge*> _layerGauges;
114  vector<Layer*> _viaLayers;
115  Technology* _technology;
116  bool _isSymbolic;
117  bool _isSuperPitched;
118  size_t _firstRoutingLayer;
119  size_t _usableLayers;
120 
121  // Internal - Constructors & Destructors.
122  RoutingGauge ( const char* name );
123  RoutingGauge ( const RoutingGauge& );
124  virtual ~RoutingGauge ();
125  virtual void _preDestroy ();
126  RoutingGauge& operator= ( const RoutingGauge& );
127  };
128 
129 
130  inline bool RoutingGauge::isSymbolic () const { return _isSymbolic; }
131  inline bool RoutingGauge::isSuperPitched () const { return _isSuperPitched; }
132  inline bool RoutingGauge::isTwoMetals () const { return (_usableLayers < 3); }
133  inline bool RoutingGauge::isHV () const { return getFirstRoutingGauge()->isHorizontal(); }
134  inline bool RoutingGauge::isVH () const { return getFirstRoutingGauge()->isVertical(); }
135  inline bool RoutingGauge::hasPowerSupply () const { return (getPowerSupplyGauge() != NULL); }
136  inline const Name RoutingGauge::getName () const { return _name; }
137  inline Technology* RoutingGauge::getTechnology () const { return _technology; }
138  inline size_t RoutingGauge::getFirstRoutingLayer () const { return _firstRoutingLayer; }
139  inline size_t RoutingGauge::getUsableLayers () const { return _usableLayers; }
140  inline size_t RoutingGauge::toRoutingDepth ( size_t depth ) const { return _firstRoutingLayer+depth; }
141  inline DbU::Unit RoutingGauge::getHorizontalPitch () const { return getHorizontalGauge()->getPitch(); }
142  inline DbU::Unit RoutingGauge::getVerticalPitch () const { return getVerticalGauge ()->getPitch(); }
143  inline size_t RoutingGauge::getDepth () const { return _layerGauges.size(); }
144  inline DbU::Unit RoutingGauge::getViaWidth ( size_t depth ) const { return getLayerGauge(depth)->getViaWidth(); }
145  inline bool RoutingGauge::isUsable ( size_t depth ) const { return getLayerGauge(depth)->isUsable(); }
146  inline unsigned int RoutingGauge::getLayerType ( size_t depth ) const { return getLayerGauge(depth)->getType(); }
147  inline unsigned int RoutingGauge::getLayerDirection ( size_t depth ) const { return getLayerGauge(depth)->getDirection(); }
148  inline DbU::Unit RoutingGauge::getLayerPitch ( size_t depth ) const { return getLayerGauge(depth)->getPitch(); }
149  inline DbU::Unit RoutingGauge::getLayerOffset ( size_t depth ) const { return getLayerGauge(depth)->getOffset(); }
150  inline DbU::Unit RoutingGauge::getLayerWireWidth ( size_t depth ) const { return getLayerGauge(depth)->getWireWidth(); }
151  inline DbU::Unit RoutingGauge::getLayerPWireWidth ( size_t depth ) const { return getLayerGauge(depth)->getPWireWidth(); }
152  inline void RoutingGauge::setSymbolic ( bool state ) { _isSymbolic=state; }
153 
154 
155 // -------------------------------------------------------------------
156 // Class : "JsonRoutingGauge".
157 
158  class JsonRoutingGauge : public JsonObject {
159  public:
160  static void initialize ();
161  JsonRoutingGauge ( unsigned long flags );
162  virtual string getTypeName () const;
163  virtual JsonRoutingGauge* clone ( unsigned long flags ) const;
164  virtual void toData ( JsonStack& );
165  };
166 
167 
168 } // CRL namespace.
169 
170 INSPECTOR_P_SUPPORT(CRL::RoutingGauge);
Gauge for the detailed routing.
Definition: RoutingGauge.h:46
RoutingLayerGauge * getLayerGauge(size_t depth) const
RoutingGauge * getClone() const
void addLayerGauge(RoutingLayerGauge *layerGauge)
Technology * getTechnology() const
Definition: RoutingGauge.h:137
virtual void destroy()
Layer * getContactLayer(size_t depth) const
const Layer * getRoutingLayer(size_t depth) const
static RoutingGauge * create(const char *name)
const Name getName() const
Definition: RoutingGauge.h:136
RoutingLayerGauge * getLayerGauge(const Layer *) const
size_t getLayerDepth(const Layer *) const
unsigned int getLayerDirection(const Layer *) const
void checkConnexity() const
const vector< RoutingLayerGauge * > & getLayerGauges() const
size_t getDepth() const
Definition: RoutingGauge.h:143
Gauge of a Layer for the detailed routing.
Definition: RoutingLayerGauge.h:79
Constant::Direction getDirection() const
Definition: RoutingLayerGauge.h:188
DbU::Unit getOffset() const
Definition: RoutingLayerGauge.h:191
DbU::Unit getPitch() const
Definition: RoutingLayerGauge.h:192
Constant::LayerGaugeType getType() const
Definition: RoutingLayerGauge.h:189
DbU::Unit getWireWidth() const
Definition: RoutingLayerGauge.h:194
DbU::Unit getViaWidth() const
Definition: RoutingLayerGauge.h:197
std::int64_t Unit
The namespace of Coriolis Core.
Definition: AcmSigda.h:28


Generated by doxygen 1.9.1 on Wed Nov 20 2024 Return to top of page
Coriolis Core (CRL) Copyright © 2008-2020 Sorbonne Universite, All rights reserved