OpenROAD's Doxygen Pages
Compilation of detailed documentation for OpenROAD modules
Loading...
Searching...
No Matches
db.h
Go to the documentation of this file.
1// SPDX-License-Identifier: BSD-3-Clause
2// Copyright (c) 2019-2025, The OpenROAD Authors
3
4#pragma once
5
6#include <cstdint>
7#include <cstdio>
8#include <fstream>
9#include <functional>
10#include <iostream>
11#include <list>
12#include <map>
13#include <optional>
14#include <set>
15#include <string>
16#include <string_view>
17#include <tuple>
18#include <utility>
19#include <variant>
20#include <vector>
21
22#include "odb/PtrSetMap.h"
23#include "odb/dbDatabaseObserver.h"
24#include "odb/dbMatrix.h"
25#include "odb/dbObject.h"
26#include "odb/dbSet.h"
27#include "odb/dbTypes.h"
28#include "odb/dbViaParams.h"
29#include "odb/geom.h"
30#include "odb/isotropy.h"
31
32inline constexpr int ADS_MAX_CORNER = 10;
33inline constexpr const char* kDefaultBufBaseName{"buf"};
34inline constexpr const char* kDefaultNetBaseName{"net"};
35
36namespace utl {
37class Logger;
38}
39
40namespace odb {
41
42class dbShape;
43class dbViaParams;
44class dbTransform;
45
46template <class T>
47class dbId;
48
49// Forward declarations of all database objects
50class dbBox;
51class dbJournalEntry;
52
53// Property objects
54class dbBoolProperty;
56class dbIntProperty;
58
59// Design objects
60class dbBlock;
61class dbBTerm;
62class dbNet;
63class dbInst;
64class dbITerm;
65class dbVia;
66class dbTrackGrid;
67class dbObstruction;
68class dbBlockage;
69class dbWire;
70class dbSWire;
71class dbSBox;
72class dbCapNode;
73class dbRSeg;
74class dbCCSeg;
75class dbBlockSearch;
76class dbRow;
77class dbFill;
79class dbBlockCallBackObj;
80class dbRegion;
81class dbBPin;
82
83// Lib objects
84class dbLib;
85class dbSite;
86class dbMaster;
87class dbMTerm;
88class dbMPin;
89class dbGDSLib;
90
91// Tech objects
92class dbTech;
93class dbTechVia;
94class dbTechViaRule;
98class dbTechLayerRule;
101class dbTechMinCutRule;
102class dbTechMinEncRule;
105class dbViaParams;
106
107// Generator Code Begin ClassDeclarations
108class dbAccessPoint;
110class dbBusPort;
112class dbChip;
113class dbChipBump;
114class dbChipBumpInst;
115class dbChipCapNode;
116class dbChipConn;
117class dbChipInst;
118class dbChipNet;
119class dbChipPath;
120class dbChipRegion;
121class dbChipRegionInst;
122class dbChipRSeg;
123class dbDatabase;
124class dbDft;
125class dbGCellGrid;
126class dbGDSARef;
127class dbGDSBoundary;
128class dbGDSBox;
129class dbGDSPath;
130class dbGDSSRef;
131class dbGDSStructure;
132class dbGDSText;
133class dbGlobalConnect;
134class dbGroup;
135class dbGuide;
136class dbIsolation;
137class dbLevelShifter;
138class dbLogicPort;
139class dbMarker;
140class dbMarkerCategory;
141class dbMasterEdgeType;
143class dbModBTerm;
144class dbModInst;
145class dbModITerm;
146class dbModNet;
147class dbModule;
148class dbNetTrack;
149class dbPolygon;
150class dbPowerDomain;
151class dbPowerSwitch;
152class dbProperty;
153class dbScanChain;
154class dbScanInst;
155class dbScanList;
156class dbScanPartition;
157class dbScanPin;
158class dbTechLayer;
189// Generator Code End ClassDeclarations
190
191// Extraction Objects
192class dbExtControl;
193
194// Custom iterators
195class dbModuleBusPortModBTermItr;
196
202class dbBox : public dbObject
203{
204 public:
208 int xMin() const;
209
213 int yMin() const;
214
218 int xMax() const;
219
223 int yMax() const;
224
228 bool isVia() const;
229
235
241
245 Point getViaXY() const;
246
250 Rect getBox() const;
251
255 void getViaBoxes(std::vector<dbShape>& shapes) const;
256
260 void getViaLayerBoxes(dbTechLayer* layer, std::vector<dbShape>& shapes) const;
261
265 Orientation2D getDir() const;
266
270 uint32_t getDX() const;
271
273
275
276 int getMinSpacing() const;
277
278 void setMinSpacing(int);
279
283 uint32_t getDY() const;
284
288 void setSoft(bool value);
289 bool isSoft() const;
290
294 dbObject* getBoxOwner() const;
295
299 dbBoxOwner getOwnerType() const;
300
314
319 uint32_t getLayerMask() const;
320
324 void setLayerMask(uint32_t mask);
325
330 static dbBox* create(dbBPin* bpin,
331 dbTechLayer* layer,
332 int x1,
333 int y1,
334 int x2,
335 int y2,
336 uint32_t mask = 0);
337
341 static dbBox* create(dbBPin* bpin,
342 dbTechLayer* layer,
343 const Rect& rect,
344 uint32_t mask = 0);
345
349 static dbBox* create(dbVia* via,
350 dbTechLayer* layer,
351 int x1,
352 int y1,
353 int x2,
354 int y2);
355
359 static dbBox* create(dbVia* via, dbTechLayer* layer, const Rect& rect);
360
364 static dbBox* create(dbMaster* master,
365 dbTechLayer* layer,
366 int x1,
367 int y1,
368 int x2,
369 int y2);
370
374 static dbBox* create(dbMaster* master, dbTechLayer* layer, const Rect& rect);
375
380 static dbBox* create(dbMaster* master, dbTechVia* via, int x, int y);
381
385 static dbBox* create(dbMPin* pin,
386 dbTechLayer* layer,
387 int x1,
388 int y1,
389 int x2,
390 int y2);
391
395 static dbBox* create(dbMPin* pin, dbTechLayer* layer, const Rect& rect);
396
400 static dbBox* create(dbPolygon* pbox, int x1, int y1, int x2, int y2);
401
405 static dbBox* create(dbPolygon* pbox, const Rect& rect);
406
411 static dbBox* create(dbMPin* pin, dbTechVia* via, int x, int y);
412
416 static dbBox* create(dbTechVia* via,
417 dbTechLayer* layer,
418 int x1,
419 int y1,
420 int x2,
421 int y2);
422
426 static dbBox* create(dbTechVia* via, dbTechLayer* layer, const Rect& rect);
427
431 static dbBox* create(dbRegion* region, int x1, int y1, int x2, int y2);
432
436 static dbBox* create(dbRegion* region, const Rect& rect);
437
441 static dbBox* create(dbInst* inst, int x1, int y1, int x2, int y2);
442
446 static dbBox* create(dbInst* inst, const Rect& rect);
447
448 // Destroy box
449 static void destroy(dbBox* box);
450
455 static dbBox* getBox(dbBlock* block, uint32_t oid);
456
460 static dbBox* getBox(dbTech* tech, uint32_t oid);
461
466 static dbBox* getBox(dbMaster* master, uint32_t oid);
467};
468
474class dbSBox : public dbBox
475{
476 public:
485
489 dbWireShapeType getWireShapeType() const;
490
495
500
504 Oct getOct() const;
505
509 uint32_t getViaBottomLayerMask() const;
510
514 uint32_t getViaCutLayerMask() const;
515
519 uint32_t getViaTopLayerMask() const;
520
524 void setViaLayerMask(uint32_t bottom, uint32_t cut, uint32_t top);
525
529 bool hasViaLayerMasks() const;
530
534 std::vector<dbSBox*> smashVia();
535
553 static dbSBox* create(dbSWire* swire,
554 dbTechLayer* layer,
555 int x1,
556 int y1,
557 int x2,
558 int y2,
559 dbWireShapeType type,
560 Direction dir = UNDEFINED,
561 int width = 0);
562
566 static dbSBox* create(dbSWire* swire,
567 dbTechLayer* layer,
568 const Rect& rect,
569 dbWireShapeType type,
570 Direction dir = UNDEFINED,
571 int width = 0);
572
577 static dbSBox* create(dbSWire* swire,
578 dbVia* via,
579 int x,
580 int y,
581 dbWireShapeType type);
582
587 static dbSBox* create(dbSWire* swire,
588 dbTechVia* via,
589 int x,
590 int y,
591 dbWireShapeType type);
592
597 static dbSBox* getSBox(dbBlock* block, uint32_t oid);
598
602 static void destroy(dbSBox* box);
603};
604
612class dbBlock : public dbObject
613{
614 public:
616 {
617 std::vector<dbBTerm*> bterms;
618 bool order = false;
619 };
620
622 {
623 // The single top-most routing layer of the placement grid.
624 dbTechLayer* layer = nullptr;
625 // The distance between each valid position on the grid in the x- and
626 // y-directions, respectively.
627 int x_step = 0;
628 int y_step = 0;
629 // The region of the placement grid.
630 Polygon region;
631 // The width and height of the pins assigned to this grid. The centers of
632 // the pins are placed on the grid positions.
633 int pin_width = 0;
634 int pin_height = 0;
635 // The boundary around existing routing obstructions that the pins should
636 // avoid.
637 int keepout = 0;
638 };
639
643 std::string getName() const;
644
648 const char* getConstName() const;
649
653 dbBox* getBBox() const;
654
658 dbChip* getChip() const;
659
664
668 dbTech* getTech() const;
669
675
680
685
689 dbSet<dbBlock> getChildren() const;
690
695 dbBlock* findChild(const char* name) const;
696
700 dbSet<dbBTerm> getBTerms() const;
701
706 dbBTerm* findBTerm(const char* name) const;
707
711 std::vector<dbBTermGroup> getBTermGroups() const;
712
717 void addBTermGroup(const std::vector<dbBTerm*>& bterms, bool order);
718
722 void setBTermTopLayerGrid(const dbBTermTopLayerGrid& top_layer_grid);
723
727 std::optional<dbBTermTopLayerGrid> getBTermTopLayerGrid() const;
728
733
738 Rect findConstraintRegion(const Direction2D& edge, int begin, int end) const;
739
743 void addBTermConstraintByDirection(dbIoType direction,
744 const Rect& constraint_region);
745
749 void addBTermsToConstraint(const std::vector<dbBTerm*>& bterms,
750 const Rect& constraint_region);
751
755 dbSet<dbITerm> getITerms() const;
756
760 dbSet<dbInst> getInsts() const;
761
765 dbSet<dbModule> getModules() const;
766
770 dbSet<dbModInst> getModInsts() const;
771 dbSet<dbModNet> getModNets() const;
772 dbSet<dbModBTerm> getModBTerms() const;
773 dbSet<dbModITerm> getModITerms() const;
774
778 dbSet<dbPowerDomain> getPowerDomains() const;
779
783 dbSet<dbLogicPort> getLogicPorts() const;
784
788 dbSet<dbPowerSwitch> getPowerSwitches() const;
789
793 dbSet<dbIsolation> getIsolations() const;
794
798 dbSet<dbLevelShifter> getLevelShifters() const;
799
803 dbSet<dbGroup> getGroups() const;
804
808 dbSet<dbAccessPoint> getAccessPoints() const;
809
813 dbSet<dbGlobalConnect> getGlobalConnects() const;
814
820 int globalConnect(bool force, bool verbose);
821 int globalConnect(dbGlobalConnect* gc, bool force, bool verbose);
823 const char* instPattern,
824 const char* pinPattern,
825 dbNet* net,
826 bool do_connect);
829
833 std::vector<dbTechLayer*> getComponentMaskShift() const;
834
838 void setComponentMaskShift(const std::vector<dbTechLayer*>& layers);
839
844 dbInst* findInst(const char* name) const;
845
850 dbModule* findModule(const char* name) const;
851
857 dbModInst* findModInst(const char* path) const;
858
864 dbModITerm* findModITerm(const char* hierarchical_name) const;
865
871 dbModBTerm* findModBTerm(const char* hierarchical_name) const;
872
877 dbPowerDomain* findPowerDomain(const char* name) const;
878
883 dbLogicPort* findLogicPort(const char* name) const;
884
889 dbPowerSwitch* findPowerSwitch(const char* name) const;
890
895 dbIsolation* findIsolation(const char* name) const;
896
901 dbLevelShifter* findLevelShifter(const char* name) const;
902
907 dbGroup* findGroup(const char* name) const;
908
918 dbITerm* findITerm(const char* name) const;
919
923 dbSet<dbObstruction> getObstructions() const;
924
928 dbSet<dbBlockage> getBlockages() const;
929
933 dbSet<dbNet> getNets() const;
934
938 dbSet<dbCapNode> getCapNodes() const;
939
943 dbSet<dbRSeg> getRSegs() const;
944
949 dbNet* findNet(const char* name) const;
950
955 dbModNet* findModNet(const char* hierarchical_name) const;
956
957 //
958 // Utility to write db file
959 //
960 // void dbBlock::writeDb(char *filename, int allNode=0);
961 void writeDb(char* filename, int allNode = 0);
962
963 //
964 // Utility to write guides file
965 //
966 void writeGuides(const char* filename) const;
967
972 dbVia* findVia(const char* name) const;
973
977 dbSet<dbVia> getVias() const;
978
984
988 int getDefUnits() const;
989
993 void setDefUnits(int units);
994
999
1003 double dbuToMicrons(int dbu) const;
1004 double dbuToMicrons(unsigned int dbu) const;
1005 double dbuToMicrons(int64_t dbu) const;
1006 double dbuToMicrons(double dbu) const;
1007
1011 double dbuAreaToMicrons(int64_t dbu_area) const;
1012
1016 int micronsToDbu(double microns) const;
1017
1021 int64_t micronsAreaToDbu(double micronsArea) const;
1022
1030
1034 void setBusDelimiters(char left, char right);
1035
1041 void getBusDelimiters(char& left, char& right) const;
1042
1046 void getExtCount(int& numOfNet,
1047 int& numOfRSeg,
1048 int& numOfCapNode,
1049 int& numOfCCSeg) const;
1050
1054 void copyExtDb(uint32_t fr,
1055 uint32_t to,
1056 uint32_t extDbCnt,
1057 double resFactor,
1058 double ccFactor,
1059 double gndcFactor);
1060
1064 void adjustRC(double resFactor, double ccFactor, double gndcFactor);
1065
1069 bool groundCC(float gndFactor);
1070
1074 bool adjustCC(float adjFactor,
1075 double ccThreshHold,
1076 std::vector<dbNet*>& nets,
1077 std::vector<dbNet*>& halonets);
1078
1082 void undoAdjustedCC(std::vector<dbNet*>& nets, std::vector<dbNet*>& halonets);
1083
1087 int getCornerCount() const;
1088
1093
1097 int getExtDbCount() const;
1098
1102 std::string getExtCornerName(int corner) const;
1103
1107 int getExtCornerIndex(const char* cornerName) const;
1108
1112 void setCornerNameList(const char* name_list);
1113
1117 char* getCornerNameList() const;
1118
1124 void setCornerCount(int cornerCnt, int extDbCnt, const char* name_list);
1125 void setCornerCount(int cnt);
1126
1131
1135 dbSet<dbTrackGrid> getTrackGrids() const;
1136
1142
1146 dbSet<dbRow> getRows() const;
1147
1151 dbSet<dbFill> getFills() const;
1152
1156 void getMasters(std::vector<dbMaster*>& masters) const;
1157
1163 void setDieArea(const Rect& new_rect);
1164
1168 void setDieArea(const Polygon& new_area);
1169
1173 Rect getDieArea() const;
1174
1178 Polygon getDieAreaPolygon() const;
1179
1183 odb::Polygon computeCoreArea() const;
1184
1188 void setCoreArea(const Rect& new_area);
1189
1193 void setCoreArea(const Polygon& new_area);
1194
1198 Rect getCoreArea() const;
1199
1203 Polygon getCoreAreaPolygon() const;
1204
1208 void addBlockedRegionForPins(const Rect& region);
1209
1213 const std::vector<Rect>& getBlockedRegionsForPins() const;
1214
1218 void setExtmi(void* ext);
1219
1223 void* getExtmi() const;
1224
1228 dbExtControl* getExtControl() const;
1229
1233 dbDft* getDft() const;
1234
1239
1243 void setMinRoutingLayer(int min_routing_layer);
1244
1249
1253 void setMaxRoutingLayer(int max_routing_layer);
1254
1259
1263 void setMinLayerForClock(int min_layer_for_clock);
1264
1269
1273 void setMaxLayerForClock(int max_layer_for_clock);
1274
1278 int getGCellTileSize() const;
1279
1283 void getExtCornerNames(std::list<std::string>& ecl) const;
1284
1288 dbSet<dbCCSeg> getCCSegs() const;
1289
1293 // uint32_t makeInstSearchDB();
1294
1298 dbBlockSearch* getSearchDb() const;
1299
1303 void destroyCCs(std::vector<dbNet*>& nets);
1304
1308 void destroyRSegs(std::vector<dbNet*>& nets);
1309
1313 void destroyCNs(std::vector<dbNet*>& nets, bool cleanExtid);
1314
1318 void destroyParasitics(std::vector<dbNet*>& nets);
1319 void destroyCornerParasitics(std::vector<dbNet*>& nets);
1320
1324 void getCcHaloNets(std::vector<dbNet*>& changedNets,
1325 std::vector<dbNet*>& ccHaloNets) const;
1326
1330 void preExttreeMergeRC(double max_cap, uint32_t corner) const;
1331
1335 bool designIsRouted(bool verbose) const;
1336
1341
1345 void clear();
1346
1360 std::string makeNewNetName(const dbModule* parent = nullptr,
1361 const char* base_name = "net",
1362 const dbNameUniquifyType& uniquify
1363 = dbNameUniquifyType::ALWAYS,
1364 dbNet* corresponding_flat_net = nullptr,
1365 const dbBTerm* associated_bterm = nullptr);
1366 std::string makeNewInstName(dbModInst* parent = nullptr,
1367 const char* base_name = "inst",
1368 const dbNameUniquifyType& uniquify
1369 = dbNameUniquifyType::ALWAYS);
1370
1371 const char* getBaseName(const char* full_name) const;
1372
1388 void getPathSegments(const char* full_name,
1389 std::vector<std::string_view>& segments) const;
1390
1394 dbSet<dbRegion> getRegions() const;
1395
1399 dbRegion* findRegion(const char* name) const;
1400
1405
1409 dbSet<dbTechNonDefaultRule> getNonDefaultRules() const;
1410
1414 dbSet<dbMarkerCategory> getMarkerCategories() const;
1415
1419 dbMarkerCategory* findMarkerCategory(const char* name) const;
1420
1421 //
1422 // Write marker information to file
1423 //
1424 void writeMarkerCategories(const std::string& file);
1425 void writeMarkerCategories(std::ofstream& reports);
1426
1430
1432
1437
1438 public:
1444 static dbBlock* create(dbChip* chip,
1445 const char* name,
1446 char hier_delimiter = '/');
1447
1453 static dbBlock* create(dbBlock* block,
1454 const char* name,
1455 char hier_delimiter = '/');
1456
1460 static dbBlock* getBlock(dbChip* chip, uint32_t oid);
1461
1465 static dbBlock* getBlock(dbBlock* block, uint32_t oid);
1466
1470 static void destroy(dbBlock* block);
1471
1475 static dbSet<dbBlock>::iterator destroy(dbSet<dbBlock>::iterator& itr);
1476
1477 //
1478 // For debugging only. Print block content to an ostream.
1479 //
1480 void debugPrintContent(std::ostream& str_db) const;
1482};
1483
1490class dbBTerm : public dbObject
1491{
1492 public:
1496 std::string getName() const;
1497
1501 const char* getConstName() const;
1502
1508 bool rename(const char* name);
1509
1513 Rect getBBox() const;
1514
1518 void setSigType(dbSigType type);
1519
1523 dbSigType getSigType() const;
1524
1528 void setIoType(dbIoType type);
1529
1533 dbIoType getIoType() const;
1534
1538 void setSpefMark(uint32_t v);
1539
1543 bool isSetSpefMark() const;
1544
1548 void setMark(uint32_t v);
1549
1553 bool isSetMark() const;
1554
1558 void setExtId(uint32_t v);
1559
1563 uint32_t getExtId() const;
1564
1568 bool isSpecial() const;
1569
1574
1578 dbNet* getNet() const;
1579
1584
1588 // Fine level apis to control which net removed from pin.
1593
1596 void connect(dbNet* db_net, dbModNet* modnet);
1597 void connect(dbNet* net);
1598 void connect(dbModNet* mod_net);
1599
1604
1610
1643
1647 dbSet<dbBPin> getBPins() const;
1648
1653 bool getFirstPin(dbShape& shape) const;
1654
1659 //
1660 bool getFirstPinLocation(int& x, int& y) const;
1661
1666 dbPlacementStatus getFirstPinPlacementStatus() const;
1667
1672
1677
1682
1687
1692 static dbBTerm* create(dbNet* net, const char* name);
1693
1697 static void destroy(dbBTerm* bterm);
1698
1701
1702 static dbSet<dbBTerm>::iterator destroy(dbSet<dbBTerm>::iterator& itr);
1703
1707 static dbBTerm* getBTerm(dbBlock* block, uint32_t oid);
1708
1709 uint32_t staVertexId() const;
1710 void staSetVertexId(uint32_t id);
1711
1715 void setConstraintRegion(const Rect& constraint_region);
1716
1720 std::optional<Rect> getConstraintRegion() const;
1721
1726
1730 void setMirroredBTerm(dbBTerm* mirrored_bterm);
1731
1736
1740 bool hasMirroredBTerm() const;
1741
1745 bool isMirrored() const;
1746};
1747
1754
1755class dbBPin : public dbObject
1756{
1757 public:
1761 dbPlacementStatus getPlacementStatus() const;
1762
1766 void setPlacementStatus(dbPlacementStatus status);
1767
1772
1776 dbSet<dbBox> getBoxes() const;
1777
1781 Rect getBBox() const;
1782
1786 bool hasEffectiveWidth() const;
1787
1792
1797
1801 bool hasMinSpacing() const;
1802
1806 void setMinSpacing(int w);
1807
1811 int getMinSpacing() const;
1812
1813 std::vector<dbAccessPoint*> getAccessPoints() const;
1814
1818 static dbBPin* create(dbBTerm* bterm);
1819
1823 static void destroy(dbBPin* bpin);
1824
1827 static dbSet<dbBPin>::iterator destroy(dbSet<dbBPin>::iterator& itr);
1828
1832 static dbBPin* getBPin(dbBlock* block, uint32_t oid);
1833};
1834
1840class dbNet : public dbObject
1841{
1842 public:
1846 std::string getName() const;
1847
1851 const char* getConstName() const;
1852
1856 void printNetName(FILE* fp, bool idFlag = true, bool newLine = true) const;
1857
1863 bool rename(const char* name);
1864
1867 void swapNetNames(dbNet* source, bool journal = true);
1868
1872 bool isRCDisconnected() const;
1873
1877 void setRCDisconnected(bool value);
1878
1883 int getWeight() const;
1884
1888 void setWeight(int weight);
1889
1893 dbSourceType getSourceType() const;
1894
1898 void setSourceType(dbSourceType type);
1899
1904 int getXTalkClass() const;
1905
1909 void setXTalkClass(int value);
1910
1914 void setDrivingITerm(const dbITerm* iterm);
1915
1920
1924 bool hasFixedBump() const;
1925
1929 void setFixedBump(bool value);
1930
1934 dbWireType getWireType() const;
1935
1939 void setWireType(dbWireType wire_type);
1940
1944 dbSigType getSigType() const;
1945
1949 void setSigType(dbSigType sig_type);
1950
1954 bool isEnclosed(Rect* bbox);
1955
1960 bool isMarked() const;
1961
1966 bool isMark_1ed() const;
1967
1971 void setMark(bool value);
1972
1976 void setMark_1(bool value);
1977
1982 bool isSelect() const;
1983
1987 void setSelect(bool value);
1988
1992 void setRCgraph(bool value);
1993 bool isRCgraph() const;
1994
1998 void setExtracted(bool value);
1999 bool isExtracted() const;
2000
2004 void setSpef(bool value);
2005 bool isSpef() const;
2006
2015 void setDoNotTouch(bool v);
2016
2020 bool isDoNotTouch() const;
2021
2026
2030 dbSet<dbITerm> getITerms() const;
2031
2036
2041
2045 dbObject* getFirstDriverTerm() const;
2046
2051
2056
2060 dbSet<dbBTerm> getBTerms() const;
2061
2066
2070 dbSet<dbSWire> getSWires() const;
2071
2076 dbWire* getWire() const;
2077
2083
2089
2094 bool isSpecial() const;
2095
2100
2105
2109 bool isConnected(const dbNet* other) const;
2110
2114 bool isConnected(const dbModNet* other) const;
2115
2120
2127
2130 bool isIO() const;
2131
2135 bool isWildConnected() const;
2136
2141
2146
2150 float getGndcCalibFactor() const;
2151
2155 void setGndcCalibFactor(float gndcCalib);
2156
2161
2166
2171 void calibrateCouplingCap(int corner);
2172
2176 float getCcCalibFactor() const;
2177
2181 void setCcCalibFactor(float ccCalib);
2182
2186 void adjustNetRes(float factor);
2187
2191 void adjustNetRes(float factor, uint32_t corner);
2192
2196 void adjustNetGndCap(float factor);
2197
2201 void adjustNetGndCap(uint32_t corner, float factor);
2202
2206 float getCcAdjustFactor() const;
2207
2211 void setCcAdjustFactor(float factor);
2212
2216 uint32_t getCcAdjustOrder() const;
2217
2221 void setCcAdjustOrder(uint32_t order);
2222
2226 bool adjustCC(uint32_t adjOrder,
2227 float adjFactor,
2228 double ccThreshHold,
2229 std::vector<dbCCSeg*>& adjustedCC,
2230 std::vector<dbNet*>& halonets);
2231
2235 void undoAdjustedCC(std::vector<dbCCSeg*>& adjustedCC,
2236 std::vector<dbNet*>& halonets);
2237
2241 bool groundCC(float gndFactor);
2242
2246 void addDbCc(float cap);
2247
2251 float getDbCc() const;
2252
2256 void setDbCc(float cap);
2257
2261 float getRefCc() const;
2262
2266 void setRefCc(float cap);
2267
2271 float getCcMatchRatio() const;
2272
2276 void setCcMatchRatio(float ratio);
2277
2281 void getGndTotalCap(double* gndcap,
2282 double* totalcap,
2283 double miller_mult) const;
2284
2288 void preExttreeMergeRC(double max_cap, uint32_t corner) const;
2289
2293 dbCapNode* findCapNode(uint32_t nodeId) const;
2294
2298 dbSet<dbCapNode> getCapNodes() const;
2299
2303 void destroyCapNodes(bool cleanExtid);
2304
2309
2313 void set1stRSegId(uint32_t rseg_id);
2314
2319
2323 uint32_t get1stRSegId() const;
2324
2328 dbRSeg* findRSeg(uint32_t srcn, uint32_t tgtn) const;
2329
2333 void set1stCapNodeId(uint32_t capn_id);
2334
2338 uint32_t get1stCapNodeId() const;
2339
2343 void setTermExtIds(int capId);
2344
2348 uint32_t getRSegCount() const;
2349
2353 dbSet<dbRSeg> getRSegs() const;
2354
2358 void collapseInternalCapNum(FILE* cap_node_map);
2359
2363 uint32_t maxInternalCapNum() const;
2364
2368 uint32_t getCapNodeCount() const;
2369
2373 uint32_t getCcCount() const;
2374
2379
2384
2388 void getSrcCCSegs(std::vector<dbCCSeg*>& segs) const;
2389
2393 void getTgtCCSegs(std::vector<dbCCSeg*>& segs) const;
2394
2398 void getCouplingNets(uint32_t corner,
2399 double ccThreshold,
2400 odb::PtrSet<dbNet>& cnets) const;
2401
2406
2411
2415 double getTotalCapacitance(uint32_t corner = 0, bool cc = false) const;
2416
2420 double getTotalCouplingCap(uint32_t corner = 0) const;
2421
2425 double getTotalResistance(uint32_t corner = 0) const;
2426
2431
2437
2441 void getNetStats(uint32_t& wireCnt,
2442 uint32_t& viaCnt,
2443 uint32_t& len,
2444 uint32_t& layerCnt,
2445 uint32_t* levelTable) const;
2446
2450 void getWireCount(uint32_t& wireCnt, uint32_t& viaCnt) const;
2451
2455 void getSignalWireCount(uint32_t& wireCnt, uint32_t& viaCnt) const;
2456
2460 void getPowerWireCount(uint32_t& wireCnt, uint32_t& viaCnt) const;
2461
2465 uint32_t getTermCount() const;
2466
2470 uint32_t getITermCount() const;
2471
2475 uint32_t getBTermCount() const;
2476
2477 //
2478 // Get the bounding box of the iterms and bterms.
2479 //
2480 Rect getTermBBox() const;
2481
2486
2491 static dbNet* create(dbBlock* block,
2492 const char* name,
2493 bool skipExistingCheck = false);
2494
2495 static dbNet* create(dbBlock* block,
2496 const char* base_name,
2497 const dbNameUniquifyType& uniquify,
2498 dbModule* parent_module = nullptr);
2499
2503 static void destroy(dbNet* net);
2504
2508 static void markNets(std::vector<dbNet*>& nets, dbBlock* block, bool mk);
2509
2513 static dbSet<dbNet>::iterator destroy(dbSet<dbNet>::iterator& itr);
2514
2518 static dbNet* getNet(dbBlock* block, uint32_t oid);
2519
2523 static dbNet* getValidNet(dbBlock* block, uint32_t oid);
2524
2528 bool canMergeNet(dbNet* in_net) const;
2529
2533 void mergeNet(dbNet* in_net);
2534
2542
2548
2549 dbSet<dbGuide> getGuides() const;
2550
2552
2553 dbSet<dbNetTrack> getTracks() const;
2554
2556
2557 bool hasJumpers() const;
2558
2559 void setJumpers(bool has_jumpers);
2560
2568
2569 void setAutoTaper(bool enable = true);
2570
2576 bool isDeeperThan(const dbNet* net) const;
2577
2586 bool findRelatedModNets(odb::PtrSet<dbModNet>& modnet_set) const;
2587
2592
2598
2607 bool isInternalTo(const dbModule* module) const;
2608
2612 void checkSanity() const;
2613
2617 void dump(bool show_modnets = false) const;
2618
2624 //
2626
2632
2636 void dumpConnectivity(int level = 1) const;
2637
2645 dbObject* load_input_term,
2646 const dbMaster* buffer_master,
2647 const Point* loc = nullptr,
2648 const char* new_buf_base_name = kDefaultBufBaseName,
2649 const char* new_net_base_name = kDefaultNetBaseName,
2650 const dbNameUniquifyType& uniquify = dbNameUniquifyType::ALWAYS);
2651
2659 dbObject* drvr_output_term,
2660 const dbMaster* buffer_master,
2661 const Point* loc = nullptr,
2662 const char* new_buf_base_name = kDefaultBufBaseName,
2663 const char* new_net_base_name = kDefaultNetBaseName,
2664 const dbNameUniquifyType& uniquify = dbNameUniquifyType::ALWAYS);
2665
2679 const odb::PtrSet<dbObject>& load_pins,
2680 const dbMaster* buffer_master,
2681 const Point* loc = nullptr,
2682 const char* new_buf_base_name = kDefaultBufBaseName,
2683 const char* new_net_base_name = kDefaultNetBaseName,
2684 const dbNameUniquifyType& uniquify = dbNameUniquifyType::ALWAYS,
2685 bool loads_on_diff_nets = false);
2686
2691 const std::vector<dbObject*>& load_pins,
2692 const dbMaster* buffer_master,
2693 const Point* loc = nullptr,
2694 const char* new_buf_base_name = kDefaultBufBaseName,
2695 const char* new_net_base_name = kDefaultNetBaseName,
2696 const dbNameUniquifyType& uniquify = dbNameUniquifyType::ALWAYS,
2697 bool loads_on_diff_nets = false);
2698
2703 void hierarchicalConnect(dbObject* driver, dbObject* load);
2704};
2705
2712class dbInst : public dbObject
2713{
2714 public:
2718 std::string getName() const;
2719
2723 const char* getConstName() const;
2724
2728 bool isNamed(const char* name) const;
2729
2735 bool rename(const char* name);
2736
2833
2837 Point getOrigin() const;
2838
2842 void setOrigin(int x, int y);
2843
2847 dbOrientType getOrient() const;
2848
2852 void setOrient(dbOrientType orient);
2853
2858 void getLocation(int& x, int& y) const;
2859
2864 Point getLocation() const;
2865
2870 void setLocation(int x, int y);
2871
2885 void setLocationOrient(dbOrientType orient);
2886
2891 dbTransform getTransform() const;
2892
2897 void setTransform(const dbTransform& t);
2898
2902 void getHierTransform(dbTransform& t) const;
2903
2905
2910 dbBox* getBBox() const;
2911
2915 dbPlacementStatus getPlacementStatus() const;
2916
2920 bool isFixed() { return getPlacementStatus().isFixed(); }
2921
2925 bool isPlaced() { return getPlacementStatus().isPlaced(); }
2926
2930 void setPlacementStatus(dbPlacementStatus status);
2931
2935 bool getEcoCreate() const;
2936 bool getEcoDestroy() const;
2937 bool getEcoModify() const;
2938
2942 void setEcoCreate(bool v);
2943 void setEcoDestroy(bool v);
2944 void setEcoModify(bool v);
2945
2949 bool getUserFlag1() const;
2950
2955
2960
2964 bool getUserFlag2() const;
2965
2970
2975
2979 bool getUserFlag3() const;
2980
2985
2990
3002 void setDoNotTouch(bool v);
3003
3007 bool isDoNotTouch() const;
3008
3013
3018
3023
3027 dbSet<dbITerm> getITerms() const;
3028
3033
3038
3044
3050
3055 dbITerm* findITerm(const char* terminal_name) const;
3056
3060 dbITerm* getITerm(uint32_t mterm_order_id) const;
3061
3067 void getConnectivity(std::vector<dbInst*>& neighbors,
3068 dbSigType::Value value = dbSigType::SIGNAL) const;
3069
3106 bool bindBlock(dbBlock* block, bool force = false);
3107
3113
3114 //
3115 // reset _hierachy to 0; not fully understood and tested!!!
3116 //
3117 bool resetHierarchy(bool verbose);
3123
3129
3133 dbSet<dbInst> getChildren() const;
3134
3138 bool isHierarchical() const;
3139
3143 bool isPhysicalOnly() const;
3144
3149 dbBox* getHalo() const;
3150
3156
3160 void setHalo(int left, int bottom, int right, int top, bool is_soft);
3161
3166 int getWeight() const;
3167
3171 void setWeight(int weight);
3172
3176 dbSourceType getSourceType() const;
3177
3181 void setSourceType(dbSourceType type);
3182
3186 dbITerm* getITerm(dbMTerm* mterm) const;
3187
3197 bool swapMaster(dbMaster* master);
3198
3202 bool isBlock() const;
3203
3207 bool isCore() const;
3208
3212 bool isPad() const;
3213
3217 bool isEndCap() const;
3218
3224
3225 void setPinAccessIdx(uint32_t idx);
3226
3227 uint32_t getPinAccessIdx() const;
3228
3234
3243 static dbInst* create(dbBlock* block,
3244 dbMaster* master,
3245 const char* name,
3246 bool physical_only = false,
3247 dbModule* parent_module = nullptr);
3248
3252 static dbInst* create(dbBlock* block,
3253 dbMaster* master,
3254 const char* base_name,
3255 const dbNameUniquifyType& uniquify,
3256 dbModule* parent_module = nullptr);
3257
3258 static dbInst* create(dbBlock* block,
3259 dbMaster* master,
3260 const char* name,
3261 dbRegion* region,
3262 bool physical_only = false,
3263 dbModule* parent_module = nullptr);
3264
3266 dbMaster* master,
3267 const char* name,
3268 bool physical_only = false,
3269 dbModule* target_module = nullptr);
3270
3277 static dbInst* create(dbBlock* top_block,
3278 dbBlock* child_block,
3279 const char* name);
3280
3284 static void destroy(dbInst* inst);
3285
3289 static dbSet<dbInst>::iterator destroy(dbSet<dbInst>::iterator& itr);
3290
3294 static dbInst* getInst(dbBlock* block, uint32_t oid);
3295
3299 static dbInst* getValidInst(dbBlock* block, uint32_t oid);
3300};
3301
3308class dbITerm : public dbObject
3309{
3310 public:
3314 dbInst* getInst() const;
3315
3321 dbNet* getNet() const;
3322
3324
3329
3334 std::string getName(char separator = '/') const;
3335
3339 Rect getBBox() const;
3340
3345
3349 dbSigType getSigType() const;
3350
3354 dbIoType getIoType() const;
3355
3360 bool isInputSignal(bool io = true) const;
3361
3366 bool isOutputSignal(bool io = true) const;
3367
3371 void setSpef(uint32_t v);
3372
3376 bool isSpef() const;
3377
3381 void setExtId(uint32_t v);
3382
3386 uint32_t getExtId() const;
3387
3392 bool isSpecial() const;
3393
3398
3403
3407 void setClocked(bool v);
3408
3412 bool isClocked() const;
3413
3417 void setMark(uint32_t v);
3418
3422 bool isSetMark() const;
3423
3427 bool isConnected() const;
3428
3433
3438
3470
3474 void connect(dbNet* net);
3475
3476 // connect this iterm to a single dbmodNet
3477
3478 void connect(dbModNet* net);
3479
3480 // simultaneously connect this iterm to both a dbnet and a mod net.
3481 // but do not do a reassociate (that is done by higher level api
3482 // call in dbNetwork::connectPin)
3483 //
3484 void connect(dbNet* db_net, dbModNet* db_mod_net);
3485
3491
3496
3500
3502
3507 bool getAvgXY(int* x, int* y) const;
3508
3513 std::vector<std::pair<dbTechLayer*, Rect>> getGeometries() const;
3514
3516
3521 std::vector<dbAccessPoint*> getPrefAccessPoints() const;
3522
3526 odb::PtrMap<dbMPin, std::vector<dbAccessPoint*>> getAccessPoints() const;
3527
3532
3536 static dbITerm* getITerm(dbBlock* block, uint32_t oid);
3537
3538 uint32_t staVertexId() const;
3539 void staSetVertexId(uint32_t id);
3540};
3541
3548class dbVia : public dbObject
3549{
3550 public:
3554 std::string getName() const;
3555
3559 const char* getConstName() const;
3560
3565 std::string getPattern() const;
3566
3571 void setPattern(const char* pattern);
3572
3577
3582
3586 bool hasParams() const;
3587
3592 void setViaParams(const dbViaParams& params);
3593
3598
3603
3608 dbBox* getBBox() const;
3609
3613 dbSet<dbBox> getBoxes() const;
3614
3620
3626
3632 bool isViaRotated() const;
3633
3637 dbOrientType getOrient() const;
3638
3639 //
3640 // Get the tech-via that this roated via represents.
3642 //
3644
3645 //
3646 // Get the block-via that this roated via represents.
3648 //
3650
3651 void setDefault(bool);
3652
3653 bool isDefault() const;
3654
3659 static dbVia* create(dbBlock* block, const char* name);
3660
3665 static dbVia* create(dbBlock* block,
3666 const char* name,
3667 dbVia* via,
3668 dbOrientType type);
3669
3674 static dbVia* create(dbBlock* block,
3675 const char* name,
3676 dbTechVia* via,
3677 dbOrientType type);
3678
3681 static bool copy(dbBlock* dst, dbBlock* src);
3682
3684 static dbVia* copy(dbBlock* dst, dbVia* src);
3685
3689 static dbVia* getVia(dbBlock* block, uint32_t oid);
3690};
3691
3701class dbWire : public dbObject
3702{
3703 public:
3708
3713 dbNet* getNet() const;
3714
3719 void append(dbWire* wire, bool singleSegmentWire = false);
3720
3724 uint32_t getTermShapeJunctionId(int term_id) const;
3725
3730 void getShape(int shape_id, dbShape& shape) const;
3731
3737 void getSegment(int segment_id, dbShape& shape) const;
3738
3745 void getSegment(int segment_id, dbTechLayer* layer, dbShape& shape) const;
3746
3751 bool getPrevVia(int shape_id, dbShape& shape) const;
3752
3757 bool getNextVia(int shape_id, dbShape& shape) const;
3758
3764 bool getViaBoxes(int via_shape_id, std::vector<dbShape>& shapes) const;
3765
3769 bool isGlobalWire() const;
3770
3775
3779 void setNormalizedConnectivity(bool normalized_connectivity);
3780
3784 std::optional<Rect> getBBox() const;
3785
3789 uint64_t getLength() const;
3790
3794 uint32_t length() const;
3795
3799 uint32_t count() const;
3800
3804 Point getCoord(int jid) const;
3805
3809 bool getProperty(int jid, int& property) const;
3810
3814 bool setProperty(int jid, int property);
3815
3819 int getData(int idx) const;
3820
3824 unsigned char getOpcode(int idx) const;
3825
3832 // the other net.
3834 void attach(dbNet* net);
3835
3839 void detach();
3840
3845 static dbWire* create(dbNet* net, bool global_wire = false);
3846
3850 static dbWire* create(dbBlock* block, bool global_wire = false);
3851
3855 static dbWire* getWire(dbBlock* block, uint32_t oid);
3856
3860 static void destroy(dbWire* wire);
3861
3862 private:
3863 void addOneSeg(unsigned char op,
3864 int value,
3865 uint32_t jj,
3866 int* did,
3867 dbRSeg** new_rsegs);
3868 void addOneSeg(unsigned char op, int value);
3869
3870 friend class dbNet;
3871};
3872
3878class dbSWire : public dbObject
3879{
3880 public:
3885
3889 dbNet* getNet() const;
3890
3894 dbWireType getWireType() const;
3895
3899 void setWireType(dbWireType type);
3900
3905
3909 dbSet<dbSBox> getWires() const;
3910
3914 static dbSWire* create(dbNet* net, dbWireType type, dbNet* shield = nullptr);
3915
3919 static void destroy(dbSWire* swire);
3920
3924 static dbSet<dbSWire>::iterator destroy(dbSet<dbSWire>::iterator& itr);
3925
3929 static dbSWire* getSWire(dbBlock* block, uint32_t oid);
3930};
3931
3938
3944class dbTrackGrid : public dbObject
3945{
3946 public:
3951
3955 void getGridX(std::vector<int>& x_grid) const;
3956 const std::vector<int>& getGridX() const;
3957
3961 void getGridY(std::vector<int>& y_grid) const;
3962 const std::vector<int>& getGridY() const;
3963
3968
3972 void addGridPatternX(int origin_x,
3973 int line_count,
3974 int step,
3975 int first_mask = 0,
3976 bool samemask = false);
3977
3981 void addGridPatternY(int origin_y,
3982 int line_count,
3983 int step,
3984 int first_mask = 0,
3985 bool samemask = false);
3986
3991
3996
4000 void getGridPatternX(int i, int& origin_x, int& line_count, int& step) const;
4002 int& origin_x,
4003 int& line_count,
4004 int& step,
4005 int& first_mask,
4006 bool& samemask) const;
4007
4011 void getGridPatternY(int i, int& origin_y, int& line_count, int& step) const;
4013 int& origin_y,
4014 int& line_count,
4015 int& step,
4016 int& first_mask,
4017 bool& samemask) const;
4022 static dbTrackGrid* create(dbBlock* block, dbTechLayer* layer);
4023
4028 void getAverageTrackSpacing(int& track_step,
4029 int& track_init,
4030 int& num_tracks) const;
4031
4035 static dbTrackGrid* getTrackGrid(dbBlock* block, uint32_t oid);
4036
4040 static void destroy(dbTrackGrid* grid_);
4041};
4042
4049class dbObstruction : public dbObject
4050{
4051 public:
4055 dbBox* getBBox() const;
4056
4062
4067
4071 bool isSlotObstruction() const;
4072
4077
4081 bool isFillObstruction() const;
4082
4087
4092
4097
4101 bool isPushedDown() const;
4105 bool hasEffectiveWidth() const;
4106
4111
4116
4120 bool hasMinSpacing() const;
4121
4125 void setMinSpacing(int w);
4126
4130 int getMinSpacing() const;
4131
4136
4140 static void destroy(dbObstruction* obstruction);
4141
4145 static dbSet<dbObstruction>::iterator destroy(
4146 dbSet<dbObstruction>::iterator& itr);
4147
4156 bool isSystemReserved() const;
4157
4161 void setIsSystemReserved(bool is_system_reserved);
4162
4167 dbTechLayer* layer,
4168 int x1,
4169 int y1,
4170 int x2,
4171 int y2,
4172 dbInst* inst = nullptr);
4173
4178 dbTechLayer* layer,
4179 const Rect& rect,
4180 dbInst* inst = nullptr);
4181
4185 static dbObstruction* getObstruction(dbBlock* block, uint32_t oid);
4186};
4187
4193class dbBlockage : public dbObject
4194{
4195 public:
4199 dbBox* getBBox() const;
4200
4206
4211
4215 bool isPushedDown() const;
4216
4220 void setSoft();
4221
4225 bool isSoft() const;
4226
4235 bool isSystemReserved() const;
4236
4240 void setIsSystemReserved(bool is_system_reserved);
4241
4245 void setMaxDensity(float max_density);
4246
4250 float getMaxDensity() const;
4251
4256
4260 static dbBlockage* create(dbBlock* block,
4261 int x1,
4262 int y1,
4263 int x2,
4264 int y2,
4265 dbInst* inst = nullptr);
4266
4270 static dbBlockage* create(dbBlock* block,
4271 const Rect& rect,
4272 dbInst* inst = nullptr);
4273
4274 static void destroy(dbBlockage* blockage);
4275
4279 static dbSet<dbBlockage>::iterator destroy(dbSet<dbBlockage>::iterator& itr);
4280
4284 static dbBlockage* getBlockage(dbBlock* block, uint32_t oid);
4285};
4286
4296class dbCapNode : public dbObject
4297{
4298 public:
4303
4307 void addGndCap(double* gndcap, double* totalcap);
4308
4311 void addGndTotalCap(double* gndcap, double* totalcap, double miller_mult);
4312
4316 void getGndCap(double* gndcap, double* totalcap) const;
4317
4321 void getGndTotalCap(double* gndcap,
4322 double* totalcap,
4323 double miller_mult) const;
4324
4328 void accAllCcCap(double* totalcap, double miller_mult) const;
4329
4334 void setCapacitance(double cap, int corner = 0);
4335
4340 void addCapacitance(double cap, int corner = 0);
4341
4345 bool groundCC(float gndFactor);
4346
4350 void adjustCapacitance(float factor, uint32_t corner);
4351
4355 void adjustCapacitance(float factor);
4356
4360 bool needAdjustCC(double ccThreshHold) const;
4361
4365 void adjustCC(uint32_t adjOrder,
4366 float adjFactor,
4367 std::vector<dbCCSeg*>& adjustedCC,
4368 std::vector<dbNet*>& halonets);
4369
4374 double getCapacitance(uint32_t corner = 0) const;
4375
4379 uint32_t getNode() const;
4380
4384 uint32_t getShapeId() const;
4385
4389 void setNode(uint32_t nodeid);
4390
4394 // dbCapNode *getNext(dbBlock *block_);
4395
4399 bool isName() const;
4400 bool isITerm() const;
4401 bool isBTerm() const;
4402 bool isInternal() const;
4403 bool isBranch() const;
4404 bool isDangling() const;
4405 bool isForeign() const;
4406 bool isTreeNode() const; // bterm, iterm, branch
4407 // bool isSourceNodeBterm();
4408 bool isSourceTerm(dbBlock* mblock = nullptr) const;
4409 bool isInoutTerm(dbBlock* mblock = nullptr) const;
4410
4415 bool isSelect() const;
4416
4420 void setSelect(bool value);
4421
4426 uint32_t getChildrenCnt() const;
4427 void setChildrenCnt(uint32_t cnt);
4428
4438
4448
4452 uint32_t getSortIndex() const;
4453
4457 void setSortIndex(uint32_t idx);
4458
4462 bool getTermCoords(int& x, int& y, dbBlock* mblock = nullptr) const;
4463
4467 dbITerm* getITerm(dbBlock* mblock = nullptr) const;
4468
4472 dbBTerm* getBTerm(dbBlock* mblock = nullptr) const;
4473
4478
4483
4487 void printCC() const;
4488
4492 bool checkCC() const;
4493
4497 dbSet<dbCCSeg> getCCSegs() const;
4498
4502 dbNet* getNet() const;
4503
4507 void setNet(uint32_t netid);
4508
4512 void setNext(uint32_t nextid);
4513
4518 static dbCapNode* create(dbNet* net, uint32_t node, bool foreign);
4519
4523 void addToNet();
4524
4528 static void destroy(dbCapNode* seg, bool destroyCC = true);
4529
4533 static dbSet<dbCapNode>::iterator destroy(dbSet<dbCapNode>::iterator& itr);
4534
4538 static dbCapNode* getCapNode(dbBlock* block, uint32_t oid);
4539
4540 private:
4545 void getCapTable(double* cap) const;
4546
4547 friend class dbRSeg;
4548};
4549
4559class dbRSeg : public dbObject
4560{
4561 public:
4566
4571
4576 double getResistance(int corner = 0) const;
4577
4581 void getAllRes(double* res) const;
4582
4586 void addAllRes(double* res);
4587
4591 void getGndCap(double* gndcap, double* totalcap) const;
4592
4596 void addGndCap(double* gndcap, double* totalcap);
4597
4601 void getGndTotalCap(double* gndcap,
4602 double* totalcap,
4603 double miller_mult) const;
4604
4608 void addGndTotalCap(double* gndcap, double* totalcap, double miller_mult);
4609
4613 void mergeRCs(std::vector<dbRSeg*>& mrsegs);
4614
4618 void adjustCapacitance(float factor, uint32_t corner);
4619
4624 void adjustSourceCapacitance(float factor, uint32_t corner);
4625
4629 void adjustCapacitance(float factor);
4630
4635 void setCapacitance(double cap, int corner = 0);
4636
4642
4647 double getGroundCapacitance(int corner = 0) const;
4648
4653 double getTotalCapacitance(int corner = 0) const;
4654
4661 double getCapacitance(int corner, double miller_mult) const;
4662
4666 void getCcSegs(std::vector<dbCCSeg*>& ccsegs) const;
4667
4671 void printCcSegs() const;
4672 void printCC() const;
4673 bool checkCC() const;
4674
4678 void getCapTable(double* cap) const;
4679
4684 void setResistance(double res, int corner = 0);
4685
4689 void adjustResistance(float factor, int corner);
4690
4694 void adjustResistance(float factor);
4695
4699 void setNext(uint32_t next_id);
4700
4704 uint32_t getSourceNode() const;
4705
4710
4714 void setSourceNode(uint32_t nodeid);
4715
4719 uint32_t getTargetNode() const;
4720
4725
4729 void setTargetNode(uint32_t nodeid);
4730
4734 uint32_t getShapeId() const;
4735
4739 void setCoords(int x, int y);
4740
4744 void getCoords(int& x, int& y) const;
4745
4749 void updateShapeId(uint32_t nsid);
4750
4754 bool pathLowToHigh() const;
4755
4759 bool allocatedCap() const;
4760
4764 uint32_t getLengthWidth(uint32_t& w) const;
4765
4769 bool addToNet();
4770
4774 dbNet* getNet() const;
4775
4780 static dbRSeg* create(dbNet* net,
4781 int x,
4782 int y,
4783 uint32_t path_dir,
4784 bool allocate_cap);
4785
4789 static void destroy(dbRSeg* seg);
4790 static void destroy(dbRSeg* seg, dbNet* net);
4791
4795 static void destroyS(dbRSeg* seg);
4796
4800 static dbSet<dbRSeg>::iterator destroy(dbSet<dbRSeg>::iterator& itr);
4801
4805 static dbRSeg* getRSeg(dbBlock* block, uint32_t oid);
4806};
4807
4818class dbCCSeg : public dbObject
4819{
4820 public:
4824 void adjustCapacitance(float factor);
4825
4829 void adjustCapacitance(float factor, int corner);
4830
4835 double getCapacitance(int corner = 0) const;
4836
4841 void setCapacitance(double cap, int corner = 0);
4842
4847 void addCapacitance(double cap, int corner = 0);
4848
4852 void accAllCcCap(double* ttcap, double miller_mult) const;
4853
4857 void getAllCcCap(double* ttcap) const;
4858
4862 void setAllCcCap(double* ttcap);
4863
4866
4871
4875 void swapCapnode(dbCapNode* orig, dbCapNode* newn);
4876
4880 dbCapNode* getTheOtherCapn(const dbCapNode* oneCap, uint32_t& cid) const;
4881
4884 uint32_t getSourceNodeNum() const;
4885
4889 // void setSourceNode( uint32_t nodeid );
4890
4894 uint32_t getTargetNodeNum() const;
4895
4899 // void setTargetNode( uint32_t nodeid );
4900
4905
4910
4914 uint32_t getInfileCnt() const;
4915
4920
4925 bool isMarked() const;
4926
4930 void setMark(bool value);
4931
4935 void printCapnCC(uint32_t capn) const;
4936
4940 bool checkCapnCC(uint32_t capn) const;
4941
4946
4950 void Link_cc_seg(dbCapNode* capn, uint32_t cseq);
4951
4956
4957 // static dbCCSeg * relinkTgtCC (dbNet *net_, dbCCSeg *pseg_, uint32_t
4958 // src_cap_node, uint32_t tgt_cap_node);
4959
4963 static dbCCSeg* findCC(dbCapNode* nodeA, dbCapNode* nodeB);
4964
4969 static dbCCSeg* create(dbCapNode* nodeA,
4970 dbCapNode* nodeB,
4971 bool mergeParallel = false);
4972
4976 static void destroy(dbCCSeg* seg);
4977
4981 static void destroyS(dbCCSeg* seg);
4982
4986 static dbSet<dbCCSeg>::iterator destroy(dbSet<dbCCSeg>::iterator& itr);
4987
4991 static dbCCSeg* getCCSeg(dbBlock* block, uint32_t oid);
4992
4996 static void disconnect(dbCCSeg* tcc_);
4997
5001 static void connect(dbCCSeg* tcc_);
5002};
5003
5009class dbRow : public dbObject
5010{
5011 public:
5015 std::string getName() const;
5016
5020 const char* getConstName() const;
5021
5025 dbSite* getSite() const;
5026
5030 Point getOrigin() const;
5031
5035 dbOrientType getOrient() const;
5036
5040 dbRowDir getDirection() const;
5041
5045 int getSiteCount() const;
5046
5051 int getSpacing() const;
5052
5056 Rect getBBox() const;
5057
5062
5066 static dbRow* create(dbBlock* block,
5067 const char* name,
5068 dbSite* site,
5069 int origin_x,
5070 int origin_y,
5071 dbOrientType orient,
5072 dbRowDir direction,
5073 int num_sites,
5074 int spacing);
5075
5079 static void destroy(dbRow* row);
5080
5084 static dbSet<dbRow>::iterator destroy(dbSet<dbRow>::iterator& itr);
5085
5089 static dbRow* getRow(dbBlock* block, uint32_t oid);
5090};
5091
5097class dbFill : public dbObject
5098{
5099 public:
5103 void getRect(Rect& rect) const;
5104
5108 bool needsOPC() const;
5109
5114 uint32_t maskNumber() const;
5115
5120
5124 static dbFill* create(dbBlock* block,
5125 bool needs_opc,
5126 uint32_t mask_number,
5127 dbTechLayer* layer,
5128 int x1,
5129 int y1,
5130 int x2,
5131 int y2);
5132
5136 static dbFill* create(dbBlock* block,
5137 bool needs_opc,
5138 uint32_t mask_number,
5139 dbTechLayer* layer,
5140 const Rect& rect);
5141
5145 static void destroy(dbFill* fill);
5146
5150 static dbSet<dbFill>::iterator destroy(dbSet<dbFill>::iterator& itr);
5151
5155 static dbFill* getFill(dbBlock* block, uint32_t oid);
5156};
5157
5163class dbRegion : public dbObject
5164{
5165 public:
5169 std::string getName() const;
5170
5174 dbRegionType getRegionType() const;
5175
5179 void setRegionType(dbRegionType type);
5180
5184 dbSet<dbInst> getRegionInsts() const;
5185
5187 // Set the value of the invalid flag.
5189 void setInvalid(bool v);
5190
5194 bool isInvalid() const;
5195
5203 dbSet<dbBox> getBoundaries() const;
5204
5208 int64_t getOverlapArea(const Rect& r) const;
5209
5213 void addInst(dbInst* inst);
5214
5218 void removeInst(dbInst* inst);
5219
5223 void removeGroup(dbGroup* group);
5224
5228 void addGroup(dbGroup* group);
5229
5233 dbSet<dbGroup> getGroups() const;
5234
5239
5244 static dbRegion* create(dbBlock* block, const char* name);
5245
5249 static void destroy(dbRegion* region);
5250
5254 static dbSet<dbRegion>::iterator destroy(dbSet<dbRegion>::iterator& itr);
5255
5259 static dbRegion* getRegion(dbBlock* block, uint32_t oid);
5260};
5261
5268class dbLib : public dbObject
5269{
5270 public:
5274 std::string getName() const;
5275
5279 const char* getConstName() const;
5280
5285
5289 dbTech* getTech() const;
5290
5294 dbSet<dbMaster> getMasters() const;
5295
5300 dbMaster* findMaster(const char* name) const;
5301
5305 dbSet<dbSite> getSites() const;
5306
5311 dbSite* findSite(const char* name) const;
5312
5316 int getLefUnits() const;
5317
5321 void setLefUnits(int units);
5322
5330
5334 void setBusDelimiters(char left, char right);
5335
5341 void getBusDelimiters(char& left, char& right) const;
5342
5347 const char* name,
5348 dbTech* tech,
5349 char hierarchy_delimiter = '/');
5350
5354 static dbLib* getLib(dbDatabase* db, uint32_t oid);
5355
5359 static void destroy(dbLib* lib);
5360};
5361
5368class dbSite : public dbObject
5369{
5370 public:
5372 {
5374 dbOrientType orientation;
5375 friend bool operator==(const OrientedSite& lhs, const OrientedSite& rhs);
5376 friend bool operator!=(const OrientedSite& lhs, const OrientedSite& rhs);
5377 };
5378 using RowPattern = std::vector<OrientedSite>;
5379
5383 std::string getName() const;
5384
5388 const char* getConstName() const;
5389
5393 int getWidth() const;
5394
5398 void setWidth(int width);
5399
5403 int getHeight() const;
5404
5408 void setHeight(int height);
5409
5413 dbSiteClass getClass() const;
5414
5418 void setClass(dbSiteClass site_class);
5419
5424
5428 bool getSymmetryX() const;
5429
5434
5438 bool getSymmetryY() const;
5439
5444
5448 bool getSymmetryR90() const;
5449
5453 void setRowPattern(const RowPattern& row_pattern);
5454
5458 bool hasRowPattern() const;
5459
5463 bool isHybrid() const;
5464
5469
5473 dbLib* getLib() const;
5474
5479 static dbSite* create(dbLib* lib, const char* name);
5480
5484 static dbSite* getSite(dbLib* lib, uint32_t oid);
5485};
5486
5492class dbMaster : public dbObject
5493{
5494 public:
5498 std::string getName() const;
5499
5503 const char* getConstName() const;
5504
5508 Point getOrigin() const;
5509
5513 void setOrigin(int x, int y);
5514
5518 uint32_t getWidth() const;
5519
5523 void setWidth(uint32_t width);
5524
5528 uint32_t getHeight() const;
5529
5533 void setHeight(uint32_t height);
5534
5538 int64_t getArea() const;
5539
5543 bool isFiller() const;
5544
5548 dbMasterType getType() const;
5549
5553 bool isBlock() const { return getType().isBlock(); }
5554
5558 bool isCore() const { return getType().isCore(); }
5559
5563 bool isPad() const { return getType().isPad(); }
5564
5568 bool isEndCap() const { return getType().isEndCap(); }
5569
5573 bool isCover() const { return getType().isCover(); };
5574
5580
5584 void setType(dbMasterType type);
5585
5594 void setBacksideBridge(bool is_bridge);
5595
5596 bool isBacksideBridge() const;
5597
5603
5611 void setLEQ(dbMaster* master);
5612
5618
5626 void setEEQ(dbMaster* master);
5627
5632
5636 bool getSymmetryX() const;
5637
5642
5646 bool getSymmetryY() const;
5647
5652
5656 bool getSymmetryR90() const;
5657
5661 dbSet<dbMTerm> getMTerms() const;
5662
5666 dbSet<dbMasterEdgeType> getEdgeTypes() const;
5667
5672 dbMTerm* findMTerm(const char* name) const;
5673 dbMTerm* findMTerm(dbBlock* block, const char* name) const;
5674
5678 dbLib* getLib() const;
5679
5683 dbSet<dbBox> getObstructions(bool include_decomposed_polygons = true) const;
5684
5688 dbSet<dbPolygon> getPolygonObstructions() const;
5689
5693 void getPlacementBoundary(Rect& r) const;
5694
5699 void transform(dbTransform& t);
5700
5706
5710 bool isFrozen() const;
5711
5715 void setSequential(bool v);
5716
5720 bool isSequential() const;
5721
5725 void setMark(uint32_t mark);
5726
5730 uint32_t isMarked() const;
5731
5732 bool isSpecialPower() const;
5733 void setSpecialPower(bool v);
5734
5738 int getMTermCount() const;
5739
5743 void setSite(dbSite* site);
5744
5749 dbSite* getSite() const;
5750
5754 int getMasterId() const;
5755
5759 void clearPinAccess(int pin_access_idx);
5760
5765 static dbMaster* create(dbLib* lib, const char* name);
5766
5770 static void destroy(dbMaster* master);
5771
5775 static dbMaster* getMaster(dbLib* lib, uint32_t oid);
5776
5777 void* staCell() const;
5778 void staSetCell(void* cell);
5779};
5780
5781class dbGDSLib : public dbObject
5782{
5783 public:
5784 void setLibname(std::string libname);
5785
5786 std::string getLibname() const;
5787
5788 void setUnits(double uu_per_dbu, double dbu_per_meter);
5789
5790 std::pair<double, double> getUnits() const;
5791
5792 dbGDSStructure* findGDSStructure(const char* name) const;
5793
5794 dbSet<dbGDSStructure> getGDSStructures() const;
5795
5796 static dbGDSLib* create(dbDatabase* db, const std::string& name);
5797 static void destroy(dbGDSLib* lib);
5798};
5799
5805class dbMTerm : public dbObject
5806{
5807 public:
5811 std::string getName() const;
5812
5816 const char* getConstName() const;
5817
5821 char* getName(dbInst* inst, char* ttname) const;
5822 char* getName(dbBlock* block, dbMaster* master, char* ttname) const;
5823
5827 dbSigType getSigType() const;
5828
5832 void setSigType(dbSigType type);
5833
5837 dbIoType getIoType() const;
5838
5842 dbMTermShapeType getShape() const;
5843
5847 void setMark(uint32_t v);
5848
5852 bool isSetMark() const;
5853
5859
5864
5869
5873 dbSet<dbMPin> getMPins() const;
5874
5878 Rect getBBox() const;
5879
5883 void addPartialMetalAreaEntry(double inval, dbTechLayer* refly = nullptr);
5884 void addPartialMetalSideAreaEntry(double inval, dbTechLayer* refly = nullptr);
5885 void addPartialCutAreaEntry(double inval, dbTechLayer* refly = nullptr);
5886 void addDiffAreaEntry(double inval, dbTechLayer* refly = nullptr);
5887
5893
5902
5903 // From LEF's ANTENNADIFFAREA on the MACRO's PIN
5904 void getDiffArea(std::vector<std::pair<double, dbTechLayer*>>& data) const;
5905
5906 // From LEF's ANTENNAPARTIALMETALAREA on the MACRO's PIN
5908 std::vector<std::pair<double, dbTechLayer*>>& data) const;
5909
5910 // From LEF's ANTENNAPARTIALMETALSIDEAREA on the MACRO's PIN
5912 std::vector<std::pair<double, dbTechLayer*>>& data) const;
5913
5914 // From LEF's ANTENNAPARTIALCUTAREA on the MACRO's PIN
5916 std::vector<std::pair<double, dbTechLayer*>>& data) const;
5917
5918 void* staPort() const;
5919 void staSetPort(void* port);
5920
5925 int getIndex() const;
5926
5931 static dbMTerm* create(dbMaster* master,
5932 const char* name,
5933 dbIoType io_type = dbIoType(),
5934 dbSigType sig_type = dbSigType(),
5935 dbMTermShapeType shape_type = dbMTermShapeType());
5936
5940 static dbMTerm* getMTerm(dbMaster* master, uint32_t oid);
5941};
5942
5948class dbMPin : public dbObject
5949{
5950 public:
5955
5960
5964 dbSet<dbBox> getGeometry(bool include_decomposed_polygons = true) const;
5965
5969 dbSet<dbPolygon> getPolygonGeometry() const;
5970
5974 Rect getBBox() const;
5975
5976 std::vector<std::vector<odb::dbAccessPoint*>> getPinAccess() const;
5977
5978 void clearPinAccess(int pin_access_idx);
5979
5983 static dbMPin* create(dbMTerm* mterm);
5984
5988 static dbMPin* getMPin(dbMaster* master, uint32_t oid);
5989};
5990
5996class dbTech : public dbObject
5997{
5998 public:
6002 std::string getName() const;
6003
6008
6013 dbSet<dbTechLayer> getLayers() const;
6014
6019 dbTechLayer* findLayer(const char* name) const;
6020
6025 dbTechLayer* findLayer(int layer_number) const;
6026
6031 dbTechLayer* findRoutingLayer(int level_number) const;
6032
6039
6047
6051 dbSet<dbTechVia> getVias() const;
6052
6058 PtrMap<dbTechLayer, dbTechVia*> getDefaultVias() const;
6059
6064 dbTechVia* findVia(const char* name) const;
6065
6069 int getLefUnits() const;
6070
6074 void setLefUnits(int units);
6075
6079 double getLefVersion() const;
6080 std::string getLefVersionStr() const;
6081
6085 void setLefVersion(double inver);
6086
6090 bool hasNoWireExtAtPin() const;
6091 dbOnOffType getNoWireExtAtPin() const;
6092 void setNoWireExtAtPin(dbOnOffType intyp);
6093
6097 dbOnOffType getNamesCaseSensitive() const;
6098 void setNamesCaseSensitive(dbOnOffType intyp);
6099
6104 dbClMeasureType getClearanceMeasure() const;
6105 void setClearanceMeasure(dbClMeasureType inmeas);
6106
6111 dbOnOffType getUseMinSpacingObs() const;
6112 void setUseMinSpacingObs(dbOnOffType inval);
6113
6115 dbOnOffType getUseMinSpacingPin() const;
6116 void setUseMinSpacingPin(dbOnOffType inval);
6117
6125 void setManufacturingGrid(int ingrd);
6126
6130 int getLayerCount() const;
6131
6136
6140 int getViaCount() const;
6141
6145 dbSet<dbTechNonDefaultRule> getNonDefaultRules() const;
6146
6150 dbTechNonDefaultRule* findNonDefaultRule(const char* rulename) const;
6151
6157
6161 void getSameNetRules(std::vector<dbTechSameNetRule*>& rules) const;
6162
6166 dbSet<dbTechViaRule> getViaRules() const;
6167
6171 dbSet<dbTechViaGenerateRule> getViaGenerateRules() const;
6172
6176 dbSet<dbMetalWidthViaMap> getMetalWidthViaMap() const;
6177
6181 dbSet<dbCellEdgeSpacing> getCellEdgeSpacingTable() const;
6182
6186 dbTechViaRule* findViaRule(const char* name) const;
6187
6192
6196 void checkLayer(bool typeChk,
6197 bool widthChk,
6198 bool pitchChk,
6199 bool spacingChk) const;
6200
6205 static dbTech* create(dbDatabase* db, const char* name);
6206
6210 static dbTech* getTech(dbDatabase* db, uint32_t oid);
6211
6216 static void destroy(dbTech* tech);
6217};
6218
6225class dbTechVia : public dbObject
6226{
6227 public:
6231 std::string getName() const;
6232
6236 const char* getConstName() const;
6237
6241 bool isDefault() const;
6242
6247
6251 bool isTopOfStack() const;
6252
6257
6261 double getResistance() const;
6262
6266 void setResistance(double res);
6267
6272 void setPattern(const char* pattern);
6273
6278 std::string getPattern() const;
6279
6284
6289
6293 bool hasParams() const;
6294
6299 void setViaParams(const dbViaParams& params);
6300
6305
6309 dbTech* getTech() const;
6310
6315 dbBox* getBBox() const;
6316
6320 dbSet<dbBox> getBoxes() const;
6321
6327
6333
6339
6344 static dbTechVia* create(dbTech* tech, const char* name);
6345
6350 static dbTechVia* create(dbTechNonDefaultRule* rule, const char* name);
6357 dbTechVia* invia_,
6358 const char* new_name);
6359
6363 static dbTechVia* getTechVia(dbTech* tech, uint32_t oid);
6364};
6365
6371class dbTechViaRule : public dbObject
6372{
6373 public:
6377 std::string getName() const;
6378
6382 void addVia(dbTechVia* via);
6383
6387 uint32_t getViaCount() const;
6388
6392 dbTechVia* getVia(uint32_t idx) const;
6393
6397 uint32_t getViaLayerRuleCount() const;
6398
6404
6409 static dbTechViaRule* create(dbTech* tech, const char* name);
6410
6414 static dbTechViaRule* getTechViaRule(dbTech* tech, uint32_t oid);
6415};
6416
6422class dbTechViaLayerRule : public dbObject
6423{
6424 public:
6429
6433 dbTechLayerDir getDirection() const;
6434
6438 void setDirection(dbTechLayerDir dir);
6439
6443 bool hasWidth() const;
6444
6448 void getWidth(int& minWidth, int& maxWidth) const;
6449
6453 void setWidth(int minWidth, int maxWidth);
6454
6458 bool hasEnclosure() const;
6459
6463 void getEnclosure(int& overhang1, int& overhang2) const;
6464
6468 void setEnclosure(int overhang1, int overhang2);
6469
6473 bool hasOverhang() const;
6474
6478 int getOverhang() const;
6479
6483 void setOverhang(int overhang);
6484
6488 bool hasMetalOverhang() const;
6489
6493 int getMetalOverhang() const;
6494
6498 void setMetalOverhang(int overhang);
6499
6503 bool hasRect() const;
6504
6508 void getRect(Rect& r) const;
6509
6513 void setRect(const Rect& r);
6514
6518 bool hasSpacing() const;
6519
6523 void getSpacing(int& x_spacing, int& y_spacing) const;
6524
6528 void setSpacing(int x_spacing, int y_spacing);
6529
6533 bool hasResistance() const;
6534
6538 void setResistance(double r);
6539
6543 double getResistance() const;
6544
6549 dbTechViaRule* rule,
6550 dbTechLayer* layer);
6551
6557 dbTechLayer* layer);
6558
6562 static dbTechViaLayerRule* getTechViaLayerRule(dbTech* tech, uint32_t oid);
6563};
6564
6570class dbTechViaGenerateRule : public dbObject
6571{
6572 public:
6576 std::string getName() const;
6577
6581 bool isDefault() const;
6582
6586 uint32_t getViaLayerRuleCount() const;
6587
6593
6599 const char* name,
6600 bool is_default);
6601
6606 uint32_t oid);
6607};
6608
6616
6617class dbTechLayerSpacingRule : public dbObject
6618{
6619 public:
6621 bool isUnconditional() const;
6622 uint32_t getSpacing() const;
6623 bool getLengthThreshold(uint32_t& threshold) const;
6624 bool getLengthThresholdRange(uint32_t& rmin, uint32_t& rmax) const;
6625 bool getRange(uint32_t& rmin, uint32_t& rmax) const;
6630 bool hasRange() const;
6633 bool getInfluence(uint32_t& influence) const;
6634 bool getInfluenceRange(uint32_t& rmin, uint32_t& rmax) const;
6635 bool getRangeRange(uint32_t& rmin, uint32_t& rmax) const;
6636 bool getAdjacentCuts(uint32_t& numcuts,
6637 uint32_t& within,
6638 uint32_t& spacing,
6639 bool& except_same_pgnet) const;
6641 bool getCutStacking() const;
6643 bool getCutSameNet() const;
6645 int64_t getCutArea() const;
6646
6647 void setSameNetPgOnly(bool pgonly);
6648 bool getSameNetPgOnly() const;
6649 void setLengthThreshold(uint32_t threshold);
6650 void setSpacing(uint32_t spacing);
6651 void setLengthThresholdRange(uint32_t rmin, uint32_t rmax);
6652 void setRange(uint32_t rmin, uint32_t rmax);
6654 void setInfluence(uint32_t influence);
6655 void setInfluenceRange(uint32_t rmin, uint32_t rmax);
6656 void setRangeRange(uint32_t rmin, uint32_t rmax);
6657 void setAdjacentCuts(uint32_t numcuts,
6658 uint32_t within,
6659 uint32_t spacing,
6660 bool except_same_pgnet);
6662 void setCutStacking(bool stacking);
6663 void setCutCenterToCenter(bool c2c);
6664 void setCutSameNet(bool same_net);
6665 void setCutParallelOverlap(bool overlap);
6666 void setCutArea(int64_t area);
6667 void setEol(uint32_t width,
6668 uint32_t within,
6669 bool parallelEdge,
6670 uint32_t parallelSpace,
6671 uint32_t parallelWithin,
6672 bool twoEdges);
6673 bool getEol(uint32_t& width,
6674 uint32_t& within,
6675 bool& parallelEdge,
6676 uint32_t& parallelSpace,
6677 uint32_t& parallelWithin,
6678 bool& twoEdges) const;
6679
6686 uint32_t dbid);
6687};
6688
6698
6699class dbTechMinCutRule : public dbObject
6700{
6701 public:
6702 bool getMinimumCuts(uint32_t& numcuts, uint32_t& width) const;
6703 void setMinimumCuts(uint32_t numcuts,
6704 uint32_t width,
6705 bool above_only,
6706 bool below_only);
6707 bool getCutDistance(uint32_t& cut_distance) const;
6708 void setCutDistance(uint32_t cut_distance);
6709 bool getLengthForCuts(uint32_t& length, uint32_t& distance) const;
6710 void setLengthForCuts(uint32_t length, uint32_t distance);
6711 bool isAboveOnly() const;
6712 bool isBelowOnly() const;
6714 static dbTechMinCutRule* getMinCutRule(dbTechLayer* inly, uint32_t dbid);
6715};
6716
6725
6726class dbTechMinEncRule : public dbObject
6727{
6728 public:
6729 bool getEnclosure(int64_t& area) const;
6730 void setEnclosure(int64_t area);
6731 bool getEnclosureWidth(uint32_t& width) const;
6732 void setEnclosureWidth(uint32_t width);
6733
6735 static void destroy(dbTechMinEncRule* rule);
6736 static dbTechMinEncRule* getMinEncRule(dbTechLayer* inly, uint32_t dbid);
6737};
6738
6748
6749class dbTechV55InfluenceEntry : public dbObject
6750{
6751 public:
6752 bool getV55InfluenceEntry(uint32_t& width,
6753 uint32_t& within,
6754 uint32_t& spacing) const;
6755 void setV55InfluenceEntry(const uint32_t& width,
6756 const uint32_t& within,
6757 const uint32_t& spacing);
6758
6761 uint32_t dbid);
6762};
6763
6769
6770class dbTechLayerAntennaRule : public dbObject
6771{
6772 public:
6773 bool isValid() const;
6774
6775 void setGatePlusDiffFactor(double factor);
6776 void setAreaMinusDiffFactor(double factor);
6777
6778 void setAreaFactor(double factor, bool diffuse = false);
6779 void setSideAreaFactor(double factor, bool diffuse = false);
6780
6781 bool hasAreaFactor() const;
6782 bool hasSideAreaFactor() const;
6783
6784 double getAreaFactor() const;
6785 double getSideAreaFactor() const;
6786
6789
6791 void setAntennaCumRoutingPlusCut(bool value = true);
6792
6793 // If return value is 0 then the value is unset
6794 double getPAR() const;
6795 double getCAR() const;
6796 double getPSR() const;
6797 double getCSR() const;
6800
6801 void setPAR(double ratio);
6802 void setCAR(double ratio);
6803 void setPSR(double ratio);
6804 void setCSR(double ratio);
6805
6806 // if indices.size()==0 then these are unset
6807 // if indices.size()==1 then this is a single value rather than a PWL
6809 {
6810 const std::vector<double>& indices;
6811 const std::vector<double>& ratios;
6812 };
6813
6820
6821 // PWL
6822 void setDiffPAR(const std::vector<double>& diff_idx,
6823 const std::vector<double>& ratios);
6824 void setDiffCAR(const std::vector<double>& diff_idx,
6825 const std::vector<double>& ratios);
6826 void setDiffPSR(const std::vector<double>& diff_idx,
6827 const std::vector<double>& ratios);
6828 void setDiffCSR(const std::vector<double>& diff_idx,
6829 const std::vector<double>& ratios);
6830 void setGatePlusDiffPWL(const std::vector<double>& diff_idx,
6831 const std::vector<double>& ratios);
6832
6833 // Single value
6834 void setDiffPAR(double ratio);
6835 void setDiffCAR(double ratio);
6836 void setDiffPSR(double ratio);
6837 void setDiffCSR(double ratio);
6838
6839 void setAreaDiffReduce(const std::vector<double>& areas,
6840 const std::vector<double>& factors);
6841
6842 static dbTechLayerAntennaRule* getAntennaRule(dbTech* inly, uint32_t dbid);
6843};
6844
6850
6851class dbTechAntennaPinModel : public dbObject
6852{
6853 public:
6854 void addGateAreaEntry(double inval, dbTechLayer* refly = nullptr);
6855 void addMaxAreaCAREntry(double inval, dbTechLayer* refly = nullptr);
6856 void addMaxSideAreaCAREntry(double inval, dbTechLayer* refly = nullptr);
6857 void addMaxCutCAREntry(double inval, dbTechLayer* refly = nullptr);
6858
6859 void getGateArea(std::vector<std::pair<double, dbTechLayer*>>& data) const;
6860 void getMaxAreaCAR(std::vector<std::pair<double, dbTechLayer*>>& data) const;
6862 std::vector<std::pair<double, dbTechLayer*>>& data) const;
6863 void getMaxCutCAR(std::vector<std::pair<double, dbTechLayer*>>& data) const;
6864
6866 uint32_t dbid);
6867};
6868
6875class dbTechNonDefaultRule : public dbObject
6876{
6877 public:
6881 std::string getName() const;
6882
6886 const char* getConstName() const;
6887
6891 bool isBlockRule() const;
6892
6898
6902 void getLayerRules(std::vector<dbTechLayerRule*>& layer_rules) const;
6903
6907 void getVias(std::vector<dbTechVia*>& vias) const;
6908
6914
6918 void getSameNetRules(std::vector<dbTechSameNetRule*>& rules) const;
6919
6921 // 5.6 DEF additions
6923
6927 bool getHardSpacing() const;
6928
6932 void setHardSpacing(bool value);
6933
6938
6942 void getUseVias(std::vector<dbTechVia*>& vias) const;
6943
6948
6952 void getUseViaRules(std::vector<dbTechViaGenerateRule*>& rules) const;
6953
6957 void setMinCuts(dbTechLayer* cut_layer, int count);
6958
6964 bool getMinCuts(dbTechLayer* cut_layer, int& count) const;
6965
6970 static dbTechNonDefaultRule* create(dbTech* tech, const char* name);
6971
6976 static dbTechNonDefaultRule* create(dbBlock* block, const char* name);
6977
6982 uint32_t oid);
6983
6988 uint32_t oid);
6989};
6990
6997class dbTechLayerRule : public dbObject
6998{
6999 public:
7004
7008 bool isBlockRule() const;
7009
7014
7018 int getWidth() const;
7019
7023 void setWidth(int width);
7024
7028 int getSpacing() const;
7029
7033 void setSpacing(int spacing);
7034
7038 double getResistance() const;
7039
7043 void setResistance(double res);
7044
7048 double getCapacitance() const;
7049
7053 void setCapacitance(double cap);
7054
7058 double getEdgeCapacitance() const;
7059
7063 void setEdgeCapacitance(double cap);
7064
7068 uint32_t getWireExtension() const;
7069
7073 void setWireExtension(uint32_t ext);
7074
7080 dbTechLayer* layer);
7081
7085 static dbTechLayerRule* getTechLayerRule(dbTech* tech, uint32_t oid);
7086
7090 static dbTechLayerRule* getTechLayerRule(dbBlock* block, uint32_t oid);
7091};
7092
7098class dbTechSameNetRule : public dbObject
7099{
7100 public:
7105
7110
7114 int getSpacing() const;
7115
7119 void setSpacing(int spacing);
7120
7124 void setAllowStackedVias(bool value);
7125
7130
7141 dbTechLayer* layer1,
7142 dbTechLayer* layer2);
7143
7147 static dbTechSameNetRule* getTechSameNetRule(dbTech* tech, uint32_t oid);
7148};
7149
7150class dbViaParams : private _dbViaParams
7151{
7152 public:
7154 dbViaParams(const dbViaParams& p) = default;
7155
7156 int getXCutSize() const;
7157 int getYCutSize() const;
7158 int getXCutSpacing() const;
7159 int getYCutSpacing() const;
7160 int getXTopEnclosure() const;
7161 int getYTopEnclosure() const;
7164 int getNumCutRows() const;
7165 int getNumCutCols() const;
7166 int getXOrigin() const;
7167 int getYOrigin() const;
7168 int getXTopOffset() const;
7169 int getYTopOffset() const;
7170 int getXBottomOffset() const;
7171 int getYBottomOffset() const;
7175
7176 void setXCutSize(int value);
7177 void setYCutSize(int value);
7178 void setXCutSpacing(int value);
7179 void setYCutSpacing(int value);
7180 void setXTopEnclosure(int value);
7181 void setYTopEnclosure(int value);
7182 void setXBottomEnclosure(int value);
7183 void setYBottomEnclosure(int value);
7184 void setNumCutRows(int value);
7185 void setNumCutCols(int value);
7186 void setXOrigin(int value);
7187 void setYOrigin(int value);
7188 void setXTopOffset(int value);
7189 void setYTopOffset(int value);
7190 void setXBottomOffset(int value);
7191 void setYBottomOffset(int value);
7195
7196 private:
7197 dbViaParams(const _dbViaParams& p);
7198
7200
7201 friend class dbVia;
7202 friend class dbTechVia;
7203};
7204
7205// Generator Code Begin ClassDefinition
7206
7207class dbAccessPoint : public dbObject
7208{
7209 public:
7210 void setPoint(const Point& point);
7211
7212 Point getPoint() const;
7213
7214 void setLayer(dbTechLayer* layer);
7215
7216 dbBPin* getBPin() const;
7217
7218 // User Code Begin dbAccessPoint
7219 void setAccesses(const std::vector<dbDirection>& accesses);
7220
7221 void getAccesses(std::vector<dbDirection>& tbl) const;
7222
7223 void setLowType(dbAccessType type_low);
7224
7225 dbAccessType getLowType() const;
7226
7227 void setHighType(dbAccessType type_high);
7228
7229 dbAccessType getHighType() const;
7230
7231 void setAccess(bool access, dbDirection dir);
7232
7233 bool hasAccess(dbDirection dir = dbDirection::NONE)
7234 const; // NONE refers to access in any direction
7235
7237
7238 dbMPin* getMPin() const;
7239
7240 std::vector<std::vector<dbObject*>> getVias() const;
7241
7242 void addTechVia(int num_cuts, dbTechVia* via);
7243
7244 void addBlockVia(int num_cuts, dbVia* via);
7245
7246 void addSegment(const Rect& segment,
7247 const bool& begin_style_trunc,
7248 const bool& end_style_trunc);
7249
7250 const std::vector<std::tuple<Rect, bool, bool>>& getSegments() const;
7251
7253 dbMPin* pin,
7254 uint32_t pin_access_idx);
7255
7257
7258 static dbAccessPoint* getAccessPoint(dbBlock* block, uint32_t dbid);
7259
7260 static void destroy(dbAccessPoint* ap);
7261 // User Code End dbAccessPoint
7262};
7263
7264class dbAlignmentMarkerRule : public dbObject
7265{
7266 public:
7267 void setTolerance(int tolerance);
7268
7269 // Max center-to-center misalignment (DBU) between paired markers; 0 means
7270 // exact alignment is required.
7271 int getTolerance() const;
7272
7273 // User Code Begin dbAlignmentMarkerRule
7274 // getters
7277 // Allowed relative orientations of master_b w.r.t. master_a: master_b.orient
7278 // == master_a.orient * rel_orient. Empty means no orientation constraint.
7279 std::vector<dbOrientType> getRelativeOrientations() const;
7280 // setters
7282 const std::vector<dbOrientType>& relative_orientations);
7283 void addRelativeOrientation(dbOrientType relative_orientation);
7284
7285 static dbAlignmentMarkerRule* create(dbMaster* master_a, dbMaster* master_b);
7286 static void destroy(dbAlignmentMarkerRule* alignment_marker_rule);
7287 // User Code End dbAlignmentMarkerRule
7288};
7289
7290class dbBusPort : public dbObject
7291{
7292 public:
7293 int getFrom() const;
7294
7295 int getTo() const;
7296
7298
7299 void setMembers(dbModBTerm* members);
7300
7302
7303 void setLast(dbModBTerm* last);
7304
7306
7308
7309 // User Code Begin dbBusPort
7310 // get element by bit index in bus (allows for up/down)
7311 // linear access
7313 dbSet<dbModBTerm> getBusPortMembers() const;
7314 int getSize() const;
7315 bool getUpdown() const;
7316
7317 static dbBusPort* create(dbModule* parentModule,
7318 dbModBTerm* port,
7319 int from_ix,
7320 int to_ix);
7321
7322 // User Code End dbBusPort
7323};
7324
7325class dbCellEdgeSpacing : public dbObject
7326{
7327 public:
7328 void setFirstEdgeType(const std::string& first_edge_type);
7329
7330 const std::string& getFirstEdgeType() const;
7331
7332 void setSecondEdgeType(const std::string& second_edge_type);
7333
7334 const std::string& getSecondEdgeType() const;
7335
7336 void setSpacing(int spacing);
7337
7338 int getSpacing() const;
7339
7340 void setExceptAbutted(bool except_abutted);
7341
7342 bool isExceptAbutted() const;
7343
7344 void setExceptNonFillerInBetween(bool except_non_filler_in_between);
7345
7347
7348 void setOptional(bool optional);
7349
7350 bool isOptional() const;
7351
7352 void setSoft(bool soft);
7353
7354 bool isSoft() const;
7355
7356 void setExact(bool exact);
7357
7358 bool isExact() const;
7359
7360 // User Code Begin dbCellEdgeSpacing
7361
7363
7365
7366 // User Code End dbCellEdgeSpacing
7367};
7368
7369class dbChip : public dbObject
7370{
7371 public:
7380
7381 const char* getName() const;
7382
7383 void setOffset(const Point& offset);
7384
7385 Point getOffset() const;
7386
7387 void setWidth(int width);
7388
7389 int getWidth() const;
7390
7391 void setHeight(int height);
7392
7393 int getHeight() const;
7394
7395 void setThickness(int thickness);
7396
7397 int getThickness() const;
7398
7399 void setShrink(float shrink);
7400
7401 float getShrink() const;
7402
7403 void setSealRingEast(int seal_ring_east);
7404
7405 int getSealRingEast() const;
7406
7407 void setSealRingWest(int seal_ring_west);
7408
7409 int getSealRingWest() const;
7410
7411 void setSealRingNorth(int seal_ring_north);
7412
7413 int getSealRingNorth() const;
7414
7415 void setSealRingSouth(int seal_ring_south);
7416
7417 int getSealRingSouth() const;
7418
7419 void setScribeLineEast(int scribe_line_east);
7420
7422
7423 void setScribeLineWest(int scribe_line_west);
7424
7426
7427 void setScribeLineNorth(int scribe_line_north);
7428
7430
7431 void setScribeLineSouth(int scribe_line_south);
7432
7434
7435 void setTsv(bool tsv);
7436
7437 bool isTsv() const;
7438
7439 dbSet<dbChipRegion> getChipRegions() const;
7440
7441 dbSet<dbChipCapNode> getChipCapNodes() const;
7442
7443 dbSet<dbChipRSeg> getChipRSegs() const;
7444
7445 dbSet<dbMarkerCategory> getMarkerCategories() const;
7446
7447 dbSet<dbChipPath> getChipPaths() const;
7448
7449 dbChipPath* findChipPath(const char* name) const;
7450
7451 // User Code Begin dbChip
7452
7459
7460 dbSet<dbChipInst> getChipInsts() const;
7461
7462 dbSet<dbChipConn> getChipConns() const;
7463
7464 dbSet<dbChipNet> getChipNets() const;
7465
7466 dbChipInst* findChipInst(const std::string& name) const;
7467
7468 dbChipNet* findChipNet(const std::string& name) const;
7469
7470 dbChipRegion* findChipRegion(const std::string& name) const;
7471
7472 dbTech* getTech() const;
7473
7474 Rect getBBox() const;
7475
7476 Cuboid getCuboid() const;
7477
7478 dbMarkerCategory* findMarkerCategory(const char* name) const;
7479
7485 dbTech* tech,
7486 const std::string& name = "",
7487 ChipType type = ChipType::DIE);
7488
7492 static dbChip* getChip(dbDatabase* db, uint32_t oid);
7493
7497 static void destroy(dbChip* chip);
7498 // User Code End dbChip
7499};
7500
7501class dbChipBump : public dbObject
7502{
7503 public:
7504 // User Code Begin dbChipBump
7505 dbChip* getChip() const;
7506
7508
7509 dbInst* getInst() const;
7510
7511 dbNet* getNet() const;
7512
7514
7515 void setNet(dbNet* net);
7516
7517 void setBTerm(dbBTerm* bterm);
7518
7519 static dbChipBump* create(dbChipRegion* chip_region, dbInst* inst);
7520
7521 // User Code End dbChipBump
7522};
7523
7524class dbChipBumpInst : public dbObject
7525{
7526 public:
7527 // User Code Begin dbChipBumpInst
7528
7530
7532
7533 // User Code End dbChipBumpInst
7534};
7535
7536// A capacitance node in the inter-chip parasitic network of a dbChipNet,
7537// the inter-chip analog of dbCapNode. It is an electrical node of the
7538// network carrying a lumped capacitance to ground. A terminal node
7539// corresponds to a bump landing and references the dbChipBumpInst where
7540// the vertical connection meets a die or RDL pin; this is how the per-die
7541// parasitic networks are stitched together across the stack at the bumps.
7542class dbChipCapNode : public dbObject
7543{
7544 public:
7545 void setCapacitance(float capacitance);
7546
7547 float getCapacitance() const;
7548
7549 // User Code Begin dbChipCapNode
7551
7553
7554 void setChipBumpInst(dbChipBumpInst* chip_bump_inst);
7555
7557
7558 static dbChipCapNode* create(dbChipNet* chip_net);
7559
7560 static void destroy(dbChipCapNode* chip_cap_node);
7561 // User Code End dbChipCapNode
7562};
7563
7564class dbChipConn : public dbObject
7565{
7566 public:
7567 const std::string& getName() const;
7568
7569 void setThickness(int thickness);
7570
7571 int getThickness() const;
7572
7573 // User Code Begin dbChipConn
7574
7576
7578
7580
7581 std::vector<dbChipInst*> getTopRegionPath() const;
7582
7583 std::vector<dbChipInst*> getBottomRegionPath() const;
7584
7585 static dbChipConn* create(const std::string& name,
7586 dbChip* parent_chip,
7587 const std::vector<dbChipInst*>& top_region_path,
7588 dbChipRegionInst* top_region,
7589 const std::vector<dbChipInst*>& bottom_region_path,
7590 dbChipRegionInst* bottom_region);
7591
7592 static void destroy(dbChipConn* chipConn);
7593 // User Code End dbChipConn
7594};
7595
7596class dbChipInst : public dbObject
7597{
7598 public:
7599 const std::string& getName() const;
7600
7601 void setOrient(dbOrientType3D orient);
7602
7603 dbOrientType3D getOrient() const;
7604
7606
7608
7609 // User Code Begin dbChipInst
7610
7611 dbTransform getTransform() const;
7612
7613 void setLoc(const Point3D& loc);
7614
7615 Point3D getLoc() const;
7616
7617 Rect getBBox() const;
7618
7619 Cuboid getCuboid() const;
7620
7621 dbSet<dbChipRegionInst> getRegions() const;
7622
7624
7625 dbChipRegionInst* findChipRegionInst(const std::string& name) const;
7626
7627 static odb::dbChipInst* create(dbChip* parent_chip,
7628 dbChip* master_chip,
7629 const std::string& name);
7630
7631 static void destroy(dbChipInst* chipInst);
7632 // User Code End dbChipInst
7633};
7634
7635class dbChipNet : public dbObject
7636{
7637 public:
7638 const std::string& getName() const;
7639
7640 // User Code Begin dbChipNet
7641 dbChip* getChip() const;
7642
7643 dbSet<dbChipCapNode> getChipCapNodes() const;
7644
7645 float getTotalCapacitance() const;
7646
7647 dbSet<dbChipRSeg> getChipRSegs() const;
7648
7649 uint32_t getNumBumpInsts() const;
7650
7652 std::vector<dbChipInst*>& path) const;
7653
7655 const std::vector<dbChipInst*>& path);
7656
7657 static dbChipNet* create(dbChip* chip, const std::string& name);
7658
7659 static void destroy(dbChipNet* net);
7660 // User Code End dbChipNet
7661};
7662
7663class dbChipPath : public dbObject
7664{
7665 public:
7666 const char* getName() const;
7667
7668 // User Code Begin dbChipPath
7669 struct Entry
7670 {
7671 std::vector<dbChipInst*> chip_inst_path; // hierarchical path to the region
7673 bool negated; // do not touch this region, i.e., the path must be connected
7674 // without crossing this region
7675 };
7676
7677 dbChip* getChip() const;
7678
7679 std::vector<Entry> getEntries() const;
7680
7681 void addEntry(const std::vector<dbChipInst*>& chip_inst_path,
7682 dbChipRegionInst* region,
7683 bool negated);
7684
7685 static dbChipPath* create(dbChip* chip, const char* name);
7686
7687 static void destroy(dbChipPath* path);
7688 // User Code End dbChipPath
7689};
7690
7691class dbChipRegion : public dbObject
7692{
7693 public:
7701
7702 const std::string& getName() const;
7703
7704 void setBox(const Rect& box);
7705
7706 Rect getBox() const;
7707
7708 dbSet<dbChipBump> getChipBumps() const;
7709
7710 // User Code Begin dbChipRegion
7711 Cuboid getCuboid() const;
7712
7713 dbChip* getChip() const;
7714
7715 Side getSide() const;
7716
7718
7720 const std::string& name,
7721 Side side,
7722 dbTechLayer* layer);
7723
7724 // User Code End dbChipRegion
7725};
7726
7727class dbChipRegionInst : public dbObject
7728{
7729 public:
7730 // User Code Begin dbChipRegionInst
7731 Cuboid getCuboid() const;
7732
7734
7736
7737 dbSet<dbChipBumpInst> getChipBumpInsts() const;
7738
7739 // User Code End dbChipRegionInst
7740};
7741
7742// A resistor segment connecting two dbChipCapNodes (source and target) in
7743// the inter-chip parasitic network of a dbChipNet, the inter-chip analog
7744// of dbRSeg. Together with dbChipCapNodes it models the RC of the vertical
7745// connections between stacked chips; a single bump is typically a pi
7746// network -- a series dbChipRSeg with a shunt dbChipCapNode at each end.
7747class dbChipRSeg : public dbObject
7748{
7749 public:
7750 void setResistance(float resistance);
7751
7752 float getResistance() const;
7753
7754 // User Code Begin dbChipRSeg
7756
7758
7760
7761 static dbChipRSeg* create(dbChipNet* chip_net,
7762 dbChipCapNode* source_cap_node,
7763 dbChipCapNode* target_cap_node);
7764
7765 static void destroy(dbChipRSeg* r_seg);
7766 // User Code End dbChipRSeg
7767};
7768
7769class dbDatabase : public dbObject
7770{
7771 public:
7772 void setDbuPerMicron(uint32_t dbu_per_micron);
7773
7774 uint32_t getDbuPerMicron() const;
7775
7776 dbSet<dbAlignmentMarkerRule> getAlignmentMarkerRules() const;
7777
7778 dbSet<dbChip> getChips() const;
7779
7780 dbChip* findChip(const char* name) const;
7781
7782 dbSet<dbProperty> getProperties() const;
7783
7784 dbSet<dbChipInst> getChipInsts() const;
7785
7786 dbSet<dbChipRegionInst> getChipRegionInsts() const;
7787
7788 dbSet<dbChipConn> getChipConns() const;
7789
7790 dbSet<dbChipBumpInst> getChipBumpInsts() const;
7791
7792 dbSet<dbChipNet> getChipNets() const;
7793
7794 dbSet<dbUnfoldedChipInst> getUnfoldedChipInsts() const;
7795
7796 dbSet<dbUnfoldedChipRegionInst> getUnfoldedChipRegionInsts() const;
7797
7798 dbSet<dbUnfoldedChipBumpInst> getUnfoldedChipBumpInsts() const;
7799
7800 dbSet<dbUnfoldedChipConn> getUnfoldedChipConns() const;
7801
7802 dbSet<dbUnfoldedChipNet> getUnfoldedChipNets() const;
7803
7804 // User Code Begin dbDatabase
7805
7806 void setHierarchy(bool value);
7807 bool hasHierarchy() const;
7808
7809 void setTopChip(dbChip* chip);
7814 dbSet<dbLib> getLibs() const;
7815
7820 dbLib* findLib(const char* name) const;
7821
7826 dbSet<dbTech> getTechs() const;
7827
7832 dbTech* findTech(const char* name) const;
7833
7838 dbMaster* findMaster(const char* name) const;
7839
7845
7850 dbChip* getChip() const;
7851
7853
7863 dbTech* getTech() const;
7864
7868 uint32_t getNumberOfMasters() const;
7869
7875 void read(std::istream& f);
7876
7881 void write(std::ostream& file);
7882
7894
7898 static void beginEco(dbBlock* block);
7899
7903 static void endEco(dbBlock* block);
7904
7908 static void commitEco(dbBlock* block);
7909
7913 static void undoEco(dbBlock* block);
7914
7918 static bool ecoEmpty(dbBlock* block);
7919
7924 static bool ecoStackEmpty(dbBlock* block);
7925
7930 static void readEco(dbBlock* block, const char* filename);
7931
7935 static void writeEco(dbBlock* block, const char* filename);
7936
7940 void setLogger(utl::Logger* logger);
7941
7945 void clear();
7946
7951 void report() const;
7952
7956 void addObserver(dbDatabaseObserver* observer);
7957 void removeObserver(dbDatabaseObserver* observer);
7958
7964 void triggerPostReadLef(dbTech* tech, dbLib* library);
7965 void triggerPostReadDef(dbBlock* block, bool floorplan);
7968
7973
7977 static void destroy(dbDatabase* db);
7978
7982 static dbDatabase* getDatabase(uint32_t oid);
7983
7988 dbUnfoldedChipInst* findUnfoldedChip(const std::string& path) const;
7989 // User Code End dbDatabase
7990};
7991
7992// Top level DFT (Design for Testing) class
7993class dbDft : public dbObject
7994{
7995 public:
7996 void setScanInserted(bool scan_inserted);
7997
7998 bool isScanInserted() const;
7999
8000 dbSet<dbScanChain> getScanChains() const;
8001
8002 // User Code Begin dbDft
8003 // Destroys all scan chains, scan pins and the scan insts the chains list,
8004 // and clears the scan-inserted flag.
8005 void reset();
8006 // User Code End dbDft
8007};
8008
8009class dbGCellGrid : public dbObject
8010{
8011 public:
8013 {
8014 float usage = 0;
8015 float capacity = 0;
8016 };
8017
8018 // User Code Begin dbGCellGrid
8019
8023 void getGridX(std::vector<int>& x_grid) const;
8024
8028 void getGridY(std::vector<int>& y_grid) const;
8029
8034
8038 void addGridPatternX(int origin_x, int line_count, int step);
8039
8043 void addGridPatternY(int origin_y, int line_count, int step);
8044
8049
8054
8058 void getGridPatternX(int i, int& origin_x, int& line_count, int& step) const;
8059
8063 void getGridPatternY(int i, int& origin_y, int& line_count, int& step) const;
8068 static dbGCellGrid* create(dbBlock* block);
8069
8073 static dbGCellGrid* getGCellGrid(dbBlock* block, uint32_t oid);
8074
8075 uint32_t getXIdx(int x) const;
8076
8077 uint32_t getYIdx(int y) const;
8078
8079 float getCapacity(dbTechLayer* layer, uint32_t x_idx, uint32_t y_idx) const;
8080
8081 float getUsage(dbTechLayer* layer, uint32_t x_idx, uint32_t y_idx) const;
8082
8084 uint32_t x_idx,
8085 uint32_t y_idx,
8086 float capacity);
8087
8088 void setUsage(dbTechLayer* layer, uint32_t x_idx, uint32_t y_idx, float use);
8089
8091
8093
8094 dbMatrix<dbGCellGrid::GCellData> getLayerCongestionMap(
8095 dbTechLayer* layer) const;
8096
8097 dbMatrix<dbGCellGrid::GCellData> getDirectionCongestionMap(
8098 const dbTechLayerDir& direction) const;
8099 // User Code End dbGCellGrid
8100};
8101
8102class dbGDSARef : public dbObject
8103{
8104 public:
8105 void setOrigin(const Point& origin);
8106
8107 Point getOrigin() const;
8108
8109 void setLr(const Point& lr);
8110
8111 Point getLr() const;
8112
8113 void setUl(const Point& ul);
8114
8115 Point getUl() const;
8116
8117 void setTransform(dbGDSSTrans transform);
8118
8119 dbGDSSTrans getTransform() const;
8120
8121 void setNumRows(int16_t num_rows);
8122
8123 int16_t getNumRows() const;
8124
8125 void setNumColumns(int16_t num_columns);
8126
8127 int16_t getNumColumns() const;
8128
8129 // User Code Begin dbGDSARef
8131 const std::vector<std::pair<std::int16_t, std::string>>& getPropattr() const;
8132 void addPropattr(std::int16_t type, const std::string& value);
8133
8135 static void destroy(dbGDSARef* aref);
8136 // User Code End dbGDSARef
8137};
8138
8139class dbGDSBoundary : public dbObject
8140{
8141 public:
8142 void setLayer(int16_t layer);
8143
8144 int16_t getLayer() const;
8145
8146 void setDatatype(int16_t datatype);
8147
8148 int16_t getDatatype() const;
8149
8150 void setXy(const std::vector<Point>& xy);
8151
8152 void getXy(std::vector<Point>& tbl) const;
8153
8154 // User Code Begin dbGDSBoundary
8155 const std::vector<Point>& getXY() const;
8156 const std::vector<std::pair<std::int16_t, std::string>>& getPropattr() const;
8157 void addPropattr(std::int16_t type, const std::string& value);
8158
8160 static void destroy(dbGDSBoundary* boundary);
8161 // User Code End dbGDSBoundary
8162};
8163
8164class dbGDSBox : public dbObject
8165{
8166 public:
8167 void setLayer(int16_t layer);
8168
8169 int16_t getLayer() const;
8170
8171 void setDatatype(int16_t datatype);
8172
8173 int16_t getDatatype() const;
8174
8175 void setBounds(const Rect& bounds);
8176
8177 Rect getBounds() const;
8178
8179 // User Code Begin dbGDSBox
8180 const std::vector<std::pair<std::int16_t, std::string>>& getPropattr() const;
8181 void addPropattr(std::int16_t type, const std::string& value);
8182
8183 static dbGDSBox* create(dbGDSStructure* structure);
8184 static void destroy(dbGDSBox* box);
8185 // User Code End dbGDSBox
8186};
8187
8188class dbGDSPath : public dbObject
8189{
8190 public:
8191 void setLayer(int16_t layer);
8192
8193 int16_t getLayer() const;
8194
8195 void setDatatype(int16_t datatype);
8196
8197 int16_t getDatatype() const;
8198
8199 void setXy(const std::vector<Point>& xy);
8200
8201 void getXy(std::vector<Point>& tbl) const;
8202
8203 void setWidth(int width);
8204
8205 int getWidth() const;
8206
8207 void setPathType(int16_t path_type);
8208
8209 int16_t getPathType() const;
8210
8211 // User Code Begin dbGDSPath
8212 const std::vector<Point>& getXY() const;
8213 const std::vector<std::pair<std::int16_t, std::string>>& getPropattr() const;
8214 void addPropattr(std::int16_t type, const std::string& value);
8215
8216 static dbGDSPath* create(dbGDSStructure* structure);
8217 static void destroy(dbGDSPath* path);
8218 // User Code End dbGDSPath
8219};
8220
8221class dbGDSSRef : public dbObject
8222{
8223 public:
8224 void setOrigin(const Point& origin);
8225
8226 Point getOrigin() const;
8227
8228 void setTransform(dbGDSSTrans transform);
8229
8230 dbGDSSTrans getTransform() const;
8231
8232 // User Code Begin dbGDSSRef
8234 const std::vector<std::pair<std::int16_t, std::string>>& getPropattr() const;
8235 void addPropattr(std::int16_t type, const std::string& value);
8236
8238 static void destroy(dbGDSSRef* sref);
8239 // User Code End dbGDSSRef
8240};
8241
8242class dbGDSStructure : public dbObject
8243{
8244 public:
8245 const char* getName() const;
8246
8247 dbSet<dbGDSBoundary> getGDSBoundaries() const;
8248
8249 dbSet<dbGDSBox> getGDSBoxs() const;
8250
8251 dbSet<dbGDSPath> getGDSPaths() const;
8252
8253 dbSet<dbGDSSRef> getGDSSRefs() const;
8254
8255 dbSet<dbGDSARef> getGDSARefs() const;
8256
8257 dbSet<dbGDSText> getGDSTexts() const;
8258
8259 // User Code Begin dbGDSStructure
8260
8262
8263 static dbGDSStructure* create(dbGDSLib* lib, const char* name);
8264 static void destroy(dbGDSStructure* structure);
8265
8266 // User Code End dbGDSStructure
8267};
8268
8269class dbGDSText : public dbObject
8270{
8271 public:
8272 void setLayer(int16_t layer);
8273
8274 int16_t getLayer() const;
8275
8276 void setDatatype(int16_t datatype);
8277
8278 int16_t getDatatype() const;
8279
8280 void setOrigin(const Point& origin);
8281
8282 Point getOrigin() const;
8283
8284 void setPresentation(dbGDSTextPres presentation);
8285
8286 dbGDSTextPres getPresentation() const;
8287
8288 void setTransform(dbGDSSTrans transform);
8289
8290 dbGDSSTrans getTransform() const;
8291
8292 void setText(const std::string& text);
8293
8294 const std::string& getText() const;
8295
8296 // User Code Begin dbGDSText
8297 const std::vector<std::pair<std::int16_t, std::string>>& getPropattr() const;
8298 void addPropattr(std::int16_t type, const std::string& value);
8299
8300 static dbGDSText* create(dbGDSStructure* structure);
8301 static void destroy(dbGDSText* text);
8302 // User Code End dbGDSText
8303};
8304
8305class dbGlobalConnect : public dbObject
8306{
8307 public:
8309
8310 dbNet* getNet() const;
8311
8312 const std::string& getInstPattern() const;
8313
8314 const std::string& getPinPattern() const;
8315
8316 // User Code Begin dbGlobalConnect
8317 std::vector<dbInst*> getInsts() const;
8318
8319 int connect(dbInst* inst, bool force);
8320
8322 dbRegion* region,
8323 const std::string& inst_pattern,
8324 const std::string& pin_pattern);
8325
8326 static void destroy(dbGlobalConnect* global_connect);
8327
8328 static dbSet<dbGlobalConnect>::iterator destroy(
8329 dbSet<dbGlobalConnect>::iterator& itr);
8330
8331 // User Code End dbGlobalConnect
8332};
8333
8334class dbGroup : public dbObject
8335{
8336 public:
8337 const char* getName() const;
8338
8340
8342
8343 // User Code Begin dbGroup
8344
8345 void setType(dbGroupType type);
8346
8347 dbGroupType getType() const;
8348
8349 void addModInst(dbModInst* modinst);
8350
8351 void removeModInst(dbModInst* modinst);
8352
8353 dbSet<dbModInst> getModInsts() const;
8354
8355 void addInst(dbInst* inst);
8356
8357 void removeInst(dbInst* inst);
8358
8359 dbSet<dbInst> getInsts() const;
8360
8361 void addGroup(dbGroup* group);
8362
8363 void removeGroup(dbGroup* group);
8364
8365 dbSet<dbGroup> getGroups() const;
8366
8367 void addPowerNet(dbNet* net);
8368
8370
8371 void removeNet(dbNet* net);
8372
8373 dbSet<dbNet> getPowerNets() const;
8374
8375 dbSet<dbNet> getGroundNets() const;
8376
8377 static dbGroup* create(dbBlock* block, const char* name);
8378
8379 static dbGroup* create(dbRegion* parent, const char* name);
8380
8381 static dbGroup* create(dbGroup* parent, const char* name);
8382
8383 static void destroy(dbGroup* group);
8384
8385 static dbGroup* getGroup(dbBlock* block_, uint32_t dbid_);
8386
8387 // User Code End dbGroup
8388};
8389
8390class dbGuide : public dbObject
8391{
8392 public:
8393 Rect getBox() const;
8394
8395 // User Code Begin dbGuide
8396
8397 dbNet* getNet() const;
8398
8400
8402
8403 bool isCongested() const;
8404
8405 static dbGuide* create(dbNet* net,
8406 dbTechLayer* layer,
8407 dbTechLayer* via_layer,
8408 Rect box,
8409 bool is_congested);
8410
8411 static dbGuide* getGuide(dbBlock* block, uint32_t dbid);
8412
8413 static void destroy(dbGuide* guide);
8414
8415 static dbSet<dbGuide>::iterator destroy(dbSet<dbGuide>::iterator& itr);
8416
8417 bool isJumper() const;
8418
8419 void setIsJumper(bool jumper);
8420
8421 bool isConnectedToTerm() const;
8422
8423 void setIsConnectedToTerm(bool is_connected);
8424
8425 // User Code End dbGuide
8426};
8427
8428class dbIsolation : public dbObject
8429{
8430 public:
8431 const char* getName() const;
8432
8433 void setAppliesTo(const std::string& applies_to);
8434
8435 const std::string& getAppliesTo() const;
8436
8437 void setClampValue(const std::string& clamp_value);
8438
8439 const std::string& getClampValue() const;
8440
8441 void setIsolationSignal(const std::string& isolation_signal);
8442
8443 const std::string& getIsolationSignal() const;
8444
8445 void setIsolationSense(const std::string& isolation_sense);
8446
8447 const std::string& getIsolationSense() const;
8448
8449 void setLocation(const std::string& location);
8450
8451 const std::string& getLocation() const;
8452
8453 void setPowerDomain(dbPowerDomain* power_domain);
8454
8456
8457 // User Code Begin dbIsolation
8458 static dbIsolation* create(dbBlock* block, const char* name);
8459 static void destroy(dbIsolation* iso);
8460
8461 void addIsolationCell(const std::string& master);
8462
8463 std::vector<dbMaster*> getIsolationCells() const;
8464
8465 bool appliesTo(const dbIoType& io) const;
8466
8467 // User Code End dbIsolation
8468};
8469
8470class dbLevelShifter : public dbObject
8471{
8472 public:
8473 const char* getName() const;
8474
8476
8477 void setSource(const std::string& source);
8478
8479 const std::string& getSource() const;
8480
8481 void setSink(const std::string& sink);
8482
8483 const std::string& getSink() const;
8484
8485 void setUseFunctionalEquivalence(bool use_functional_equivalence);
8486
8488
8489 void setAppliesTo(const std::string& applies_to);
8490
8491 const std::string& getAppliesTo() const;
8492
8493 void setAppliesToBoundary(const std::string& applies_to_boundary);
8494
8495 const std::string& getAppliesToBoundary() const;
8496
8497 void setRule(const std::string& rule);
8498
8499 const std::string& getRule() const;
8500
8501 void setThreshold(float threshold);
8502
8503 float getThreshold() const;
8504
8505 void setNoShift(bool no_shift);
8506
8507 bool isNoShift() const;
8508
8509 void setForceShift(bool force_shift);
8510
8511 bool isForceShift() const;
8512
8513 void setLocation(const std::string& location);
8514
8515 const std::string& getLocation() const;
8516
8517 void setInputSupply(const std::string& input_supply);
8518
8519 const std::string& getInputSupply() const;
8520
8521 void setOutputSupply(const std::string& output_supply);
8522
8523 const std::string& getOutputSupply() const;
8524
8525 void setInternalSupply(const std::string& internal_supply);
8526
8527 const std::string& getInternalSupply() const;
8528
8529 void setNamePrefix(const std::string& name_prefix);
8530
8531 const std::string& getNamePrefix() const;
8532
8533 void setNameSuffix(const std::string& name_suffix);
8534
8535 const std::string& getNameSuffix() const;
8536
8537 void setCellName(const std::string& cell_name);
8538
8539 const std::string& getCellName() const;
8540
8541 void setCellInput(const std::string& cell_input);
8542
8543 const std::string& getCellInput() const;
8544
8545 void setCellOutput(const std::string& cell_output);
8546
8547 const std::string& getCellOutput() const;
8548
8549 // User Code Begin dbLevelShifter
8550
8552 const char* name,
8553 dbPowerDomain* domain);
8554 static void destroy(dbLevelShifter* shifter);
8555
8556 void addElement(const std::string& element);
8557 void addExcludeElement(const std::string& element);
8558 void addInstance(const std::string& instance, const std::string& port);
8559 std::vector<std::string> getElements() const;
8560 std::vector<std::string> getExcludeElements() const;
8561 std::vector<std::pair<std::string, std::string>> getInstances() const;
8562 // User Code End dbLevelShifter
8563};
8564
8565class dbLogicPort : public dbObject
8566{
8567 public:
8568 const char* getName() const;
8569
8570 const std::string& getDirection() const;
8571
8572 // User Code Begin dbLogicPort
8574 const char* name,
8575 const std::string& direction);
8576 static void destroy(dbLogicPort* lp);
8577 // User Code End dbLogicPort
8578};
8579
8580class dbMarker : public dbObject
8581{
8582 public:
8583 void setComment(const std::string& comment);
8584
8585 const std::string& getComment() const;
8586
8587 void setLineNumber(int line_number);
8588
8589 int getLineNumber() const;
8590
8591 void setVisited(bool visited);
8592
8593 bool isVisited() const;
8594
8595 void setVisible(bool visible);
8596
8597 bool isVisible() const;
8598
8599 void setWaived(bool waived);
8600
8601 bool isWaived() const;
8602
8603 // User Code Begin dbMarker
8604
8605 std::string getName() const;
8606
8607 using MarkerShape = std::variant<Point, Line, Rect, Polygon, Cuboid>;
8608
8610 std::vector<MarkerShape> getShapes() const;
8612 Rect getBBox() const;
8613
8614 odb::PtrSet<dbObject> getSources() const;
8615
8616 void addShape(const Point& pt);
8617 void addShape(const Line& line);
8618 void addShape(const Rect& rect);
8619 void addShape(const Polygon& polygon);
8620 void addShape(const Cuboid& cuboid);
8621
8623
8624 void addSource(dbObject* obj);
8626
8628 static void destroy(dbMarker* marker);
8629
8630 // User Code End dbMarker
8631};
8632
8633class dbMarkerCategory : public dbObject
8634{
8635 public:
8636 const char* getName() const;
8637
8638 void setDescription(const std::string& description);
8639
8640 const std::string& getDescription() const;
8641
8642 void setSource(const std::string& source);
8643
8644 void setMaxMarkers(int max_markers);
8645
8646 int getMaxMarkers() const;
8647
8648 dbSet<dbMarker> getMarkers() const;
8649
8650 dbSet<dbMarkerCategory> getMarkerCategories() const;
8651
8652 dbMarkerCategory* findMarkerCategory(const char* name) const;
8653
8654 // User Code Begin dbMarkerCategory
8655
8657 dbObject* getParent() const;
8658 std::string getSource() const;
8659
8660 odb::PtrSet<dbMarker> getAllMarkers() const;
8661
8662 bool rename(const char* name);
8663
8664 int getMarkerCount() const;
8665
8666 void writeJSON(const std::string& path) const;
8667 void writeJSON(std::ofstream& report) const;
8668 void writeTR(const std::string& path) const;
8669 void writeTR(std::ofstream& report) const;
8670
8671 static odb::PtrSet<dbMarkerCategory> fromJSON(dbChip* chip,
8672 const std::string& path);
8673 static odb::PtrSet<dbMarkerCategory> fromJSON(dbChip* chip,
8674 const char* source,
8675 std::ifstream& report);
8677 const char* name,
8678 const std::string& path);
8680 const char* name,
8681 const char* source,
8682 std::ifstream& report);
8683
8684 static dbMarkerCategory* create(dbBlock* block, const char* name);
8685 static dbMarkerCategory* createOrReplace(dbBlock* block, const char* name);
8686 static dbMarkerCategory* createOrGet(dbBlock* block, const char* name);
8687 static dbMarkerCategory* create(dbChip* chip, const char* name);
8688 static dbMarkerCategory* createOrReplace(dbChip* chip, const char* name);
8689 static dbMarkerCategory* createOrGet(dbChip* chip, const char* name);
8690 static dbMarkerCategory* create(dbMarkerCategory* category, const char* name);
8692 const char* name);
8694 const char* name);
8695 static void destroy(dbMarkerCategory* category);
8696
8697 // User Code End dbMarkerCategory
8698};
8699
8700class dbMasterEdgeType : public dbObject
8701{
8702 public:
8710
8711 void setEdgeType(const std::string& edge_type);
8712
8713 const std::string& getEdgeType() const;
8714
8715 void setCellRow(int cell_row);
8716
8717 int getCellRow() const;
8718
8719 void setHalfRow(int half_row);
8720
8721 int getHalfRow() const;
8722
8723 void setRangeBegin(int range_begin);
8724
8725 int getRangeBegin() const;
8726
8727 void setRangeEnd(int range_end);
8728
8729 int getRangeEnd() const;
8730
8731 // User Code Begin dbMasterEdgeType
8733
8735
8737
8738 static void destroy(dbMasterEdgeType* edge_type);
8739
8740 // User Code End dbMasterEdgeType
8741};
8742
8743class dbMetalWidthViaMap : public dbObject
8744{
8745 public:
8746 void setViaCutClass(bool via_cut_class);
8747
8748 bool isViaCutClass() const;
8749
8750 void setCutLayer(dbTechLayer* cut_layer);
8751
8752 void setBelowLayerWidthLow(int below_layer_width_low);
8753
8755
8756 void setBelowLayerWidthHigh(int below_layer_width_high);
8757
8759
8760 void setAboveLayerWidthLow(int above_layer_width_low);
8761
8763
8764 void setAboveLayerWidthHigh(int above_layer_width_high);
8765
8767
8768 void setViaName(const std::string& via_name);
8769
8770 const std::string& getViaName() const;
8771
8772 void setPgVia(bool pg_via);
8773
8774 bool isPgVia() const;
8775
8776 // User Code Begin dbMetalWidthViaMap
8777
8779
8781
8782 static void destroy(dbMetalWidthViaMap* via_map);
8783
8784 static dbMetalWidthViaMap* getMetalWidthViaMap(dbTech* tech, uint32_t dbid);
8785
8786 // User Code End dbMetalWidthViaMap
8787};
8788
8789class dbModBTerm : public dbObject
8790{
8791 public:
8792 const char* getName() const;
8793
8795
8796 // User Code Begin dbModBTerm
8797 std::string getHierarchicalName() const;
8800 void setModNet(dbModNet* modNet);
8802 void setSigType(const dbSigType& type);
8803 dbSigType getSigType() const;
8804 void setIoType(const dbIoType& type);
8805 dbIoType getIoType() const;
8806 void connect(dbModNet* net);
8808 bool isBusPort() const;
8811
8820
8821 static dbModBTerm* create(dbModule* parentModule, const char* name);
8822 static void destroy(dbModBTerm*);
8823 static dbSet<dbModBTerm>::iterator destroy(dbSet<dbModBTerm>::iterator& itr);
8824 static dbModBTerm* getModBTerm(dbBlock* block, uint32_t dbid);
8825 // User Code End dbModBTerm
8826};
8827
8828class dbModInst : public dbObject
8829{
8830 public:
8831 const char* getName() const;
8832
8834
8836
8838
8839 // User Code Begin dbModInst
8840 std::string getHierarchicalName() const;
8841 dbModITerm* findModITerm(const char* name) const;
8842 dbSet<dbModITerm> getModITerms() const;
8844
8845 dbModNet* findHierNet(const char* base_name) const;
8846 dbNet* findFlatNet(const char* base_name) const;
8847 bool findNet(const char* base_name,
8848 dbNet*& flat_net,
8849 dbModNet*& hier_net) const;
8850
8855
8856 // Recursive search a given dbInst through child mod insts
8857 bool containsDbInst(dbInst* inst) const;
8858
8859 // Recursive search a given dbModInst through child mod insts
8860 bool containsDbModInst(dbModInst* mod_inst) const;
8861
8862 static dbModInst* create(dbModule* parentModule,
8863 dbModule* masterModule,
8864 const char* name);
8865
8866 // This destroys this modinst but does not destroy the master dbModule.
8867 static void destroy(dbModInst* modinst);
8868
8869 static dbSet<dbModInst>::iterator destroy(dbSet<dbModInst>::iterator& itr);
8870
8871 static dbModInst* getModInst(dbBlock* block_, uint32_t dbid_);
8872 // User Code End dbModInst
8873};
8874
8875class dbModITerm : public dbObject
8876{
8877 public:
8878 const char* getName() const;
8879
8881
8882 // User Code Begin dbModITerm
8883 std::string getHierarchicalName() const;
8884 void setModNet(dbModNet* modNet);
8886 void setChildModBTerm(dbModBTerm* child_port);
8888 void connect(dbModNet* modnet);
8890
8891 static dbModITerm* create(dbModInst* parentInstance,
8892 const char* name,
8893 dbModBTerm* modbterm = nullptr);
8894 static void destroy(dbModITerm*);
8895 static dbSet<dbModITerm>::iterator destroy(dbSet<dbModITerm>::iterator& itr);
8896 static dbModITerm* getModITerm(dbBlock* block, uint32_t dbid);
8897 // User Code End dbModITerm
8898};
8899
8900class dbModNet : public dbObject
8901{
8902 public:
8904
8905 // User Code Begin dbModNet
8906 dbSet<dbModITerm> getModITerms() const;
8907 dbSet<dbModBTerm> getModBTerms() const;
8908 dbSet<dbITerm> getITerms() const;
8909 dbSet<dbBTerm> getBTerms() const;
8910 unsigned connectionCount() const;
8911 std::string getName() const;
8912 const char* getConstName() const;
8913 std::string getHierarchicalName() const;
8914 void rename(const char* new_name);
8916 void dump() const;
8917
8918 // Find the flat net (dbNet) associated with this hierarchical net (dbModNet).
8919 // A dbModNet should be associated with a single dbNet.
8920 // This function traverses the terminals connected to this dbModNet
8921 // and returns the first dbNet it finds.
8923 void checkSanity() const;
8924
8930
8934 void mergeModNet(dbModNet* in_modnet);
8935
8939 void connectTermsOf(dbNet* in_net);
8940
8944 bool isConnected(const dbNet* other) const;
8945
8949 bool isConnected(const dbModNet* other) const;
8950
8956
8962
8967 std::vector<dbModNet*> getNextModNetsInFanin() const;
8968
8973 std::vector<dbModNet*> getNextModNetsInFanout() const;
8974
8979
8984 dbModNet* findInHierarchy(const std::function<bool(dbModNet*)>& condition,
8985 dbHierSearchDir dir) const;
8986
8987 static dbModNet* getModNet(dbBlock* block, uint32_t id);
8988 static dbModNet* create(dbModule* parent_module, const char* base_name);
8989 static dbModNet* create(dbModule* parent_module,
8990 const char* base_name,
8991 const dbNameUniquifyType& uniquify,
8992 dbNet* corresponding_flat_net = nullptr);
8993 static dbSet<dbModNet>::iterator destroy(dbSet<dbModNet>::iterator& itr);
8994 static void destroy(dbModNet*);
8995 // User Code End dbModNet
8996};
8997
8998class dbModule : public dbObject
8999{
9000 public:
9001 const char* getName() const;
9002
9003 void setModInst(dbModInst* mod_inst);
9004
9006
9007 // User Code Begin dbModule
9008
9013
9014 std::string getHierarchicalName() const;
9015
9016 // Get a mod net by name
9017 dbModNet* getModNet(const char* net_name) const;
9018
9019 // Adding an inst to a new module will remove it from its previous
9020 // module.
9021 void addInst(dbInst* inst);
9022
9024
9025 dbSet<dbModInst> getChildren() const;
9026 dbSet<dbModInst> getModInsts() const;
9027 dbSet<dbModNet> getModNets() const;
9028 // Get the ports of a module (STA world uses ports, which contain members).
9029 dbSet<dbModBTerm> getPorts() const;
9030 // Get the leaf level connections on a module (flat connected view).
9031 dbSet<dbModBTerm> getModBTerms() const;
9032 dbModBTerm* getModBTerm(uint32_t id) const;
9033 dbSet<dbInst> getInsts() const;
9034
9035 dbModInst* findModInst(const char* name) const;
9036 dbInst* findDbInst(const char* name) const;
9037 dbModBTerm* findModBTerm(const char* name) const;
9038
9039 std::vector<dbInst*> getLeafInsts() const;
9040
9041 int getModInstCount() const;
9042 int getDbInstCount() const;
9043
9045 bool canSwapWith(dbModule* new_module) const;
9046 bool isTop() const;
9047 bool containsDbInst(dbInst* inst) const;
9048 bool containsDbModInst(dbModInst* inst) const;
9049
9050 static dbModule* create(dbBlock* block, const char* name);
9051
9052 static void destroy(dbModule* module);
9053
9054 static dbModule* getModule(dbBlock* block_, uint32_t dbid_);
9055
9056 static dbModule* makeUniqueDbModule(const char* cell_name,
9057 const char* inst_name,
9058 dbBlock* block);
9059
9060 // User Code End dbModule
9061};
9062
9063class dbNetTrack : public dbObject
9064{
9065 public:
9066 Rect getBox() const;
9067
9068 // User Code Begin dbNetTrack
9069
9070 dbNet* getNet() const;
9071
9073
9074 static dbNetTrack* create(dbNet* net, dbTechLayer* layer, Rect box);
9075
9076 static dbNetTrack* getNetTrack(dbBlock* block, uint32_t dbid);
9077
9078 static void destroy(dbNetTrack* guide);
9079
9080 static dbSet<dbNetTrack>::iterator destroy(dbSet<dbNetTrack>::iterator& itr);
9081
9082 // User Code End dbNetTrack
9083};
9084
9085class dbPolygon : public dbObject
9086{
9087 public:
9088 const Polygon& getPolygon() const;
9089
9091
9092 int getMinSpacing() const;
9093
9094 // User Code Begin dbPolygon
9096 dbSet<dbBox> getGeometry() const;
9097 void setDesignRuleWidth(int design_rule_width);
9098 void setMinSpacing(int min_spacing);
9099
9103 static dbPolygon* create(dbMaster* master,
9104 dbTechLayer* layer,
9105 const std::vector<Point>& polygon);
9106
9111 dbTechLayer* layer,
9112 const std::vector<Point>& polygon);
9113
9114 // User Code End dbPolygon
9115};
9116
9117class dbPowerDomain : public dbObject
9118{
9119 public:
9120 const char* getName() const;
9121
9123
9124 void setTop(bool top);
9125
9126 bool isTop() const;
9127
9129
9131
9132 void setVoltage(float voltage);
9133
9134 float getVoltage() const;
9135
9136 // User Code Begin dbPowerDomain
9137 void setGroup(dbGroup* group);
9138 static dbPowerDomain* create(dbBlock* block, const char* name);
9139 static void destroy(dbPowerDomain* pd);
9140
9141 void addElement(const std::string& element);
9142 std::vector<std::string> getElements() const;
9143
9147
9148 std::vector<dbPowerSwitch*> getPowerSwitches() const;
9149 std::vector<dbIsolation*> getIsolations() const;
9150 std::vector<dbLevelShifter*> getLevelShifters() const;
9151
9152 void setArea(const Rect& area);
9153 bool getArea(Rect& area) const;
9154
9155 // User Code End dbPowerDomain
9156};
9157
9158class dbPowerSwitch : public dbObject
9159{
9160 public:
9162 {
9163 std::string port_name;
9164 std::string supply_net_name;
9165 };
9167 {
9168 std::string port_name;
9169 std::string net_name;
9170 };
9172 {
9173 std::string port_name;
9174 std::string net_name;
9176 };
9178 {
9179 std::string state_name;
9182 };
9183
9184 const char* getName() const;
9185
9186 void setPowerDomain(dbPowerDomain* power_domain);
9187
9189
9190 // User Code Begin dbPowerSwitch
9191 static dbPowerSwitch* create(dbBlock* block, const char* name);
9192 static void destroy(dbPowerSwitch* ps);
9193 void addInSupplyPort(const std::string& in_port, const std::string& net);
9194 void setOutSupplyPort(const std::string& out_port, const std::string& net);
9195 void addControlPort(const std::string& control_port,
9196 const std::string& control_net);
9197 void addAcknowledgePort(const std::string& port_name,
9198 const std::string& net_name,
9199 const std::string& boolean_expression);
9200 void addOnState(const std::string& on_state,
9201 const std::string& port_name,
9202 const std::string& boolean_expression);
9203 void setLibCell(dbMaster* master);
9204 void addPortMap(const std::string& model_port,
9205 const std::string& switch_port);
9206
9207 void addPortMap(const std::string& model_port, dbMTerm* mterm);
9208 std::vector<UPFControlPort> getControlPorts() const;
9209 std::vector<UPFIOSupplyPort> getInputSupplyPorts() const;
9211 std::vector<UPFAcknowledgePort> getAcknowledgePorts() const;
9212 std::vector<UPFOnState> getOnStates() const;
9213
9214 // Returns library cell that was defined in the upf for this power switch
9216
9217 // returns a map associating the model ports to actual instances of dbMTerms
9218 // belonging to the first
9219 // lib cell defined in the upf
9220 std::map<std::string, dbMTerm*> getPortMap() const;
9221 // User Code End dbPowerSwitch
9222};
9223
9224class dbProperty : public dbObject
9225{
9226 public:
9227 // User Code Begin dbProperty
9228 enum Type
9229 {
9230 // Do not change the order or the values of this enum.
9235 };
9236
9238 Type getType() const;
9239
9241 std::string getName() const;
9242
9244 dbObject* getPropOwner() const;
9245
9247 static dbProperty* find(dbObject* object, const char* name);
9248
9251 static dbProperty* find(dbObject* object, const char* name, Type type);
9252
9254 static void destroy(dbProperty* prop);
9256 static void destroyProperties(dbObject* obj);
9257 static dbSet<dbProperty> getProperties(dbObject* object);
9258 static dbSet<dbProperty>::iterator destroy(dbSet<dbProperty>::iterator itr);
9259 // 5.8
9260 static std::string writeProperties(dbObject* object);
9261 static std::string writePropValue(dbProperty* prop);
9262 // User Code End dbProperty
9263};
9264
9265// A scan chain is a collection of dbScanLists that contains dbScanInsts. Here,
9266// scan_in, scan_out and scan_enable are the top level ports/pins to where this
9267// scan chain is connected. Each scan chain is also associated with a
9268// particular test mode and test mode pin that puts the Circuit Under Test (CUT)
9269// in test. The Scan Enable port/pin puts the scan chain into shifting mode.
9270class dbScanChain : public dbObject
9271{
9272 public:
9273 dbSet<dbScanPartition> getScanPartitions() const;
9274
9275 // User Code Begin dbScanChain
9276 const std::string& getName() const;
9277
9278 void setName(std::string_view name);
9279
9280 void setScanIn(dbBTerm* scan_in);
9281 void setScanIn(dbITerm* scan_in);
9282 std::variant<dbBTerm*, dbITerm*> getScanIn() const;
9283
9284 void setScanOut(dbBTerm* scan_out);
9285 void setScanOut(dbITerm* scan_out);
9286 std::variant<dbBTerm*, dbITerm*> getScanOut() const;
9287
9288 void setScanEnable(dbBTerm* scan_enable);
9289 void setScanEnable(dbITerm* scan_enable);
9290 std::variant<dbBTerm*, dbITerm*> getScanEnable() const;
9291
9292 void setTestMode(dbBTerm* test_mode);
9293 void setTestMode(dbITerm* test_mode);
9294 std::variant<dbBTerm*, dbITerm*> getTestMode() const;
9295
9296 void setTestModeName(const std::string& test_mode_name);
9297 const std::string& getTestModeName() const;
9298
9299 static dbScanChain* create(dbDft* dft);
9300 // User Code End dbScanChain
9301};
9302
9303// A scan inst is a cell with a scan in, scan out and an optional scan enable.
9304// If no scan enable is provided, then this is an stateless component (because
9305// we don't need to enable scan for it) and the number of bits is set to 0. It
9306// may be possible that two or more dbScanInst contains the same dbInst if the
9307// dbInst has more than one scan_in/scan_out pair. Examples of those cases are
9308// multibit cells with external scan or black boxes. In this case, the scan_in,
9309// scan_out and scan enables are pins in the dbInst. The scan clock is the pin
9310// that we use to shift patterns in and out of the scan chain.
9311class dbScanInst : public dbObject
9312{
9313 public:
9315 {
9316 std::variant<dbBTerm*, dbITerm*> scan_in;
9317 std::variant<dbBTerm*, dbITerm*> scan_out;
9318 };
9319
9320 enum class ClockEdge
9321 {
9324 };
9325
9326 // User Code Begin dbScanInst
9327 void setScanClock(std::string_view scan_clock);
9328 const std::string& getScanClock() const;
9329
9330 void setClockEdge(ClockEdge clock_edge);
9332 std::string getClockEdgeString() const;
9333
9334 // The number of bits that are in this scan inst from the scan in to the scan
9335 // out. For simple flops this is just 1.
9336 void setBits(uint32_t bits);
9337 uint32_t getBits() const;
9338
9339 void setScanEnable(dbBTerm* scan_enable);
9340 void setScanEnable(dbITerm* scan_enable);
9341 std::variant<dbBTerm*, dbITerm*> getScanEnable() const;
9342
9343 void setAccessPins(const AccessPins& access_pins);
9345
9346 dbInst* getInst() const;
9347
9348 void insertAtFront(dbScanList* scan_list);
9349
9350 static dbScanInst* create(dbScanList* scan_list, dbInst* inst);
9351 // User Code End dbScanInst
9352};
9353
9354// A scan list is a collection of dbScanInsts in a particular order that must be
9355// respected when performing scan reordering and repartitioning. For ScanList
9356// with two or more elements we say that they are ORDERED. If the ScanList
9357// contains only one element then they are FLOATING elements that don't have any
9358// restriccion when optimizing the scan chain.
9359class dbScanList : public dbObject
9360{
9361 public:
9362 // User Code Begin dbScanList
9363 dbSet<dbScanInst> getScanInsts() const;
9365 // Detaches all dbScanInsts from this list without destroying them.
9366 // After clear(), each detached dbScanInst may be re-attached to any list
9367 // via insertAtFront(). Used by scan_opt cross-chain reassignment.
9368 void clear();
9369 static dbScanList* create(dbScanPartition* scan_partition);
9370 // User Code End dbScanList
9371};
9372
9373// A scan partition is way to split the scan chains into sub chains with
9374// compatible scan flops (same clock, edge and voltage). The biggest partition
9375// possible is the whole chain if all the scan flops inside it are compatible
9376// between them for reordering and repartitioning. The name of this partition is
9377// not unique, as multiple partitions may have the same same and therefore
9378// contain the same type of flops.
9379class dbScanPartition : public dbObject
9380{
9381 public:
9382 dbSet<dbScanList> getScanLists() const;
9383
9384 // User Code Begin dbScanPartition
9385 const std::string& getName() const;
9386 void setName(const std::string& name);
9387
9389 // User Code End dbScanPartition
9390};
9391
9392// This is a helper class to contain dbBTerms and dbITerms in the same field. We
9393// need this difference because some pins may need to be conected to top level
9394// ports or cell's pins. For example: a scan chain may be connected to a top
9395// level design port (dbBTerm) or to an output/input pin of a cell that is part
9396// of a decompressor/compressor
9397class dbScanPin : public dbObject
9398{
9399 public:
9400 // User Code Begin dbScanPin
9401 std::variant<dbBTerm*, dbITerm*> getPin() const;
9402 void setPin(dbBTerm* bterm);
9403 void setPin(dbITerm* iterm);
9404 static dbScanPin* create(dbDft* dft, dbBTerm* bterm);
9405 static dbScanPin* create(dbDft* dft, dbITerm* iterm);
9406 // User Code End dbScanPin
9407};
9408
9409class dbTechLayer : public dbObject
9410{
9411 public:
9435
9436 void setWrongWayWidth(uint32_t wrong_way_width);
9437
9438 uint32_t getWrongWayWidth() const;
9439
9440 void setWrongWayMinWidth(uint32_t wrong_way_min_width);
9441
9442 uint32_t getWrongWayMinWidth() const;
9443
9444 void setLayerAdjustment(float layer_adjustment);
9445
9446 float getLayerAdjustment() const;
9447
9448 void getOrthSpacingTable(std::vector<std::pair<int, int>>& tbl) const;
9449
9450 dbSet<dbTechLayerCutClassRule> getTechLayerCutClassRules() const;
9451
9453
9454 dbSet<dbTechLayerSpacingEolRule> getTechLayerSpacingEolRules() const;
9455
9456 dbSet<dbTechLayerCutSpacingRule> getTechLayerCutSpacingRules() const;
9457
9458 dbSet<dbTechLayerMinStepRule> getTechLayerMinStepRules() const;
9459
9460 dbSet<dbTechLayerCornerSpacingRule> getTechLayerCornerSpacingRules() const;
9461
9462 dbSet<dbTechLayerSpacingTablePrlRule> getTechLayerSpacingTablePrlRules()
9463 const;
9464
9465 dbSet<dbTechLayerCutSpacingTableOrthRule>
9467
9468 dbSet<dbTechLayerCutSpacingTableDefRule> getTechLayerCutSpacingTableDefRules()
9469 const;
9470
9471 dbSet<dbTechLayerCutEnclosureRule> getTechLayerCutEnclosureRules() const;
9472
9473 dbSet<dbTechLayerCutEnclosureTableDefRule>
9475
9476 dbSet<dbTechLayerEolExtensionRule> getTechLayerEolExtensionRules() const;
9477
9478 dbSet<dbTechLayerArraySpacingRule> getTechLayerArraySpacingRules() const;
9479
9480 dbSet<dbTechLayerEolKeepOutRule> getTechLayerEolKeepOutRules() const;
9481
9482 dbSet<dbTechLayerMaxSpacingRule> getTechLayerMaxSpacingRules() const;
9483
9484 dbSet<dbTechLayerWidthTableRule> getTechLayerWidthTableRules() const;
9485
9486 dbSet<dbTechLayerMinCutRule> getTechLayerMinCutRules() const;
9487
9488 dbSet<dbTechLayerAreaRule> getTechLayerAreaRules() const;
9489
9490 dbSet<dbTechLayerForbiddenSpacingRule> getTechLayerForbiddenSpacingRules()
9491 const;
9492
9493 dbSet<dbTechLayerKeepOutZoneRule> getTechLayerKeepOutZoneRules() const;
9494
9495 dbSet<dbTechLayerWrongDirSpacingRule> getTechLayerWrongDirSpacingRules()
9496 const;
9497
9498 dbSet<dbTechLayerTwoWiresForbiddenSpcRule>
9500
9501 dbSet<dbTechLayerVoltageSpacing> getTechLayerVoltageSpacings() const;
9502
9503 dbSet<dbTechLayerImplantWidthRule> getTechLayerImplantWidthRules() const;
9504
9505 dbSet<dbTechLayerImplantSpacingRule> getTechLayerImplantSpacingRules() const;
9506
9507 dbSet<dbTechLayerCoreEdgeLengthRule> getTechLayerCoreEdgeLengthRules() const;
9508
9509 void setRectOnly(bool rect_only);
9510
9511 bool isRectOnly() const;
9512
9513 void setRightWayOnGridOnly(bool right_way_on_grid_only);
9514
9516
9517 void setRightWayOnGridOnlyCheckMask(bool right_way_on_grid_only_check_mask);
9518
9520
9521 void setRectOnlyExceptNonCorePins(bool rect_only_except_non_core_pins);
9522
9524
9525 // User Code Begin dbTechLayer
9526 int findV55Spacing(int width, int prl) const;
9527
9528 int findTwSpacing(int width1, int width2, int prl) const;
9529
9531
9533 std::string getLef58TypeString() const;
9534
9540 void setBackside(bool is_backside);
9541
9542 bool isBackside() const;
9543
9547 std::string getName() const;
9548
9552 const char* getConstName() const;
9553
9557 bool hasAlias() const;
9558
9562 std::string getAlias() const;
9563
9567 void setAlias(const char* alias);
9568
9572 uint32_t getWidth() const;
9573 void setWidth(int width);
9574
9578 int getSpacing() const;
9579 void setSpacing(int spacing);
9580
9584 int getSpacing(int width, int length = 0) const;
9585
9590 uint32_t getNumMasks() const;
9591 void setNumMasks(uint32_t number);
9592
9596 void getMaxWideDRCRange(int& owidth, int& olength) const;
9597 void getMinWideDRCRange(int& owidth, int& olength) const;
9598
9603 dbSet<dbTechLayerSpacingRule> getV54SpacingRules() const;
9604
9613 bool getV55SpacingWidthsAndLengths(std::vector<uint32_t>& width_idx,
9614 std::vector<uint32_t>& length_idx) const;
9615 bool getV55SpacingTable(std::vector<std::vector<uint32_t>>& sptbl) const;
9616
9617 void initV55LengthIndex(uint32_t numelems);
9618 void addV55LengthEntry(uint32_t length);
9619 void initV55WidthIndex(uint32_t numelems);
9620 void addV55WidthEntry(uint32_t width);
9621 void initV55SpacingTable(uint32_t numrows, uint32_t numcols);
9622 void addV55SpacingTableEntry(uint32_t inrow,
9623 uint32_t incol,
9624 uint32_t spacing);
9625
9626 dbSet<dbTechV55InfluenceEntry> getV55InfluenceRules() const;
9627
9634 std::vector<std::vector<uint32_t>>& sptbl) const;
9636 uint32_t getTwoWidthsSpacingTableWidth(uint32_t row) const;
9637 bool getTwoWidthsSpacingTableHasPRL(uint32_t row) const;
9638 uint32_t getTwoWidthsSpacingTablePRL(uint32_t row) const;
9639 uint32_t getTwoWidthsSpacingTableEntry(uint32_t row, uint32_t col) const;
9640
9641 void initTwoWidths(uint32_t num_widths);
9642 void addTwoWidthsIndexEntry(uint32_t width, int parallel_run_length = -1);
9644 uint32_t incol,
9645 uint32_t spacing);
9653
9662
9666 bool getMinimumCutRules(std::vector<dbTechMinCutRule*>& cut_rules) const;
9667 bool getMinEnclosureRules(std::vector<dbTechMinEncRule*>& enc_rules) const;
9668
9669 dbSet<dbTechMinCutRule> getMinCutRules() const;
9670 dbSet<dbTechMinEncRule> getMinEncRules() const;
9671
9675 int getPitch() const;
9676 int getPitchX() const;
9677 int getPitchY() const;
9679 void setPitch(int pitch);
9680 void setPitchXY(int pitch_x, int pitch_y);
9681 void setFirstLastPitch(int first_last_pitch);
9682 bool hasXYPitch() const;
9683
9684 int getOffset() const;
9685 int getOffsetX() const;
9686 int getOffsetY() const;
9687 void setOffset(int pitch);
9688 void setOffsetXY(int pitch_x, int pitch_y);
9689 bool hasXYOffset() const;
9690
9695 bool getThickness(uint32_t& inthk) const;
9696 void setThickness(uint32_t thickness);
9697
9702 bool hasArea() const;
9703 int64_t getArea() const;
9704 void setArea(int64_t area);
9705
9710 bool hasMaxWidth() const;
9711 uint32_t getMaxWidth() const;
9712 void setMaxWidth(uint32_t max_width);
9713
9717 uint32_t getMinWidth() const;
9718 void setMinWidth(uint32_t max_width);
9719
9724 bool hasMinStep() const;
9725 uint32_t getMinStep() const;
9726 void setMinStep(uint32_t min_step);
9727
9728 dbTechLayerMinStepType getMinStepType() const;
9729 void setMinStepType(dbTechLayerMinStepType type);
9730
9732 uint32_t getMinStepMaxLength() const;
9733 void setMinStepMaxLength(uint32_t length);
9734
9736 uint32_t getMinStepMaxEdges() const;
9737 void setMinStepMaxEdges(uint32_t edges);
9738
9743 bool hasProtrusion() const;
9744 uint32_t getProtrusionWidth() const;
9745 uint32_t getProtrusionLength() const;
9746 uint32_t getProtrusionFromWidth() const;
9747 void setProtrusion(uint32_t pt_width,
9748 uint32_t pt_length,
9749 uint32_t pt_from_width);
9750
9753 dbTechLayerType getType() const;
9754
9758 dbTechLayerDir getDirection() const;
9759 void setDirection(dbTechLayerDir direction);
9760
9765 double getResistance() const;
9766 void setResistance(double res);
9767
9771 double getCapacitance() const;
9772 void setCapacitance(double cap);
9773
9777 double getEdgeCapacitance() const;
9778 void setEdgeCapacitance(double cap);
9779
9783 uint32_t getWireExtension() const;
9784 void setWireExtension(uint32_t ext);
9785
9789 int getNumber() const;
9790
9801 int getRoutingLevel() const;
9802
9808
9814
9818 dbTech* getTech() const;
9819
9821
9822 void addOrthSpacingTableEntry(int within, int spacing);
9823
9829 const char* name,
9830 dbTechLayerType type);
9831
9835 static dbTechLayer* getTechLayer(dbTech* tech, uint32_t oid);
9836 // User Code End dbTechLayer
9837};
9838
9839class dbTechLayerAreaRule : public dbObject
9840{
9841 public:
9842 void setArea(int64_t area);
9843
9844 int64_t getArea() const;
9845
9846 void setExceptMinWidth(int except_min_width);
9847
9849
9850 void setExceptEdgeLength(int except_edge_length);
9851
9853
9854 void setExceptEdgeLengths(const std::pair<int, int>& except_edge_lengths);
9855
9856 std::pair<int, int> getExceptEdgeLengths() const;
9857
9858 void setExceptMinSize(const std::pair<int, int>& except_min_size);
9859
9860 std::pair<int, int> getExceptMinSize() const;
9861
9862 void setExceptStep(const std::pair<int, int>& except_step);
9863
9864 std::pair<int, int> getExceptStep() const;
9865
9866 void setMask(int mask);
9867
9868 int getMask() const;
9869
9870 void setRectWidth(int rect_width);
9871
9872 int getRectWidth() const;
9873
9874 void setExceptRectangle(bool except_rectangle);
9875
9876 bool isExceptRectangle() const;
9877
9878 void setOverlap(uint32_t overlap);
9879
9880 uint32_t getOverlap() const;
9881
9883 static void destroy(dbTechLayerAreaRule* obj);
9884 // User Code Begin dbTechLayerAreaRule
9885
9886 void setTrimLayer(dbTechLayer* trim_layer);
9887
9889
9890 // User Code End dbTechLayerAreaRule
9891};
9892
9893class dbTechLayerArraySpacingRule : public dbObject
9894{
9895 public:
9896 void setViaWidth(int via_width);
9897
9898 int getViaWidth() const;
9899
9900 void setCutSpacing(int cut_spacing);
9901
9902 int getCutSpacing() const;
9903
9904 void setWithin(int within);
9905
9906 int getWithin() const;
9907
9908 void setArrayWidth(int array_width);
9909
9910 int getArrayWidth() const;
9911
9913
9914 void setParallelOverlap(bool parallel_overlap);
9915
9916 bool isParallelOverlap() const;
9917
9918 void setLongArray(bool long_array);
9919
9920 bool isLongArray() const;
9921
9922 void setViaWidthValid(bool via_width_valid);
9923
9924 bool isViaWidthValid() const;
9925
9926 void setWithinValid(bool within_valid);
9927
9928 bool isWithinValid() const;
9929
9932 // User Code Begin dbTechLayerArraySpacingRule
9933
9934 void setCutsArraySpacing(int num_cuts, int spacing);
9935
9936 const std::map<int, int>& getCutsArraySpacing() const;
9937
9939
9941 dbTechLayer* inly,
9942 uint32_t dbid);
9943
9944 // User Code End dbTechLayerArraySpacingRule
9945};
9946
9947class dbTechLayerCoreEdgeLengthRule : public dbObject
9948{
9949 public:
9950 void setMinLength(int min_length);
9951
9952 int getMinLength() const;
9953
9954 void setMaxLength(int max_length);
9955
9956 int getMaxLength() const;
9957
9958 void getExceptAdjacentEdgeLengths(std::vector<int>& tbl) const;
9959
9960 void getExceptAdjacentLengths(std::vector<int>& tbl) const;
9961
9962 void getExceptAdjacentExact(std::vector<int>& tbl) const;
9963
9966 // User Code Begin dbTechLayerCoreEdgeLengthRule
9967 void addExceptAdjacentLength(int edge_length,
9968 int adj_length,
9969 bool exact_adjacent_length);
9971 std::vector<dbTechLayer*> getWithinLayers() const;
9973 std::vector<dbTechLayer*> getExceptLayers() const;
9974 // User Code End dbTechLayerCoreEdgeLengthRule
9975};
9976
9977class dbTechLayerCornerSpacingRule : public dbObject
9978{
9979 public:
9985
9986 void setWithin(int within);
9987
9988 int getWithin() const;
9989
9990 void setEolWidth(int eol_width);
9991
9992 int getEolWidth() const;
9993
9994 void setJogLength(int jog_length);
9995
9996 int getJogLength() const;
9997
9998 void setEdgeLength(int edge_length);
9999
10000 int getEdgeLength() const;
10001
10002 void setMinLength(int min_length);
10003
10004 int getMinLength() const;
10005
10006 void setExceptNotchLength(int except_notch_length);
10007
10009
10010 void setSameMask(bool same_mask);
10011
10012 bool isSameMask() const;
10013
10014 void setCornerOnly(bool corner_only);
10015
10016 bool isCornerOnly() const;
10017
10018 void setExceptEol(bool except_eol);
10019
10020 bool isExceptEol() const;
10021
10022 void setExceptJogLength(bool except_jog_length);
10023
10024 bool isExceptJogLength() const;
10025
10026 void setEdgeLengthValid(bool edge_length_valid);
10027
10028 bool isEdgeLengthValid() const;
10029
10030 void setIncludeShape(bool include_shape);
10031
10032 bool isIncludeShape() const;
10033
10034 void setMinLengthValid(bool min_length_valid);
10035
10036 bool isMinLengthValid() const;
10037
10038 void setExceptNotch(bool except_notch);
10039
10040 bool isExceptNotch() const;
10041
10042 void setExceptNotchLengthValid(bool except_notch_length_valid);
10043
10045
10046 void setExceptSameNet(bool except_same_net);
10047
10048 bool isExceptSameNet() const;
10049
10050 void setExceptSameMetal(bool except_same_metal);
10051
10052 bool isExceptSameMetal() const;
10053
10054 void setCornerToCorner(bool corner_to_corner);
10055
10056 bool isCornerToCorner() const;
10057
10058 void setAlignedOnly(bool aligned_only);
10059
10060 bool isAlignedOnly() const;
10061
10062 void setCheckImplantGroupOnly(bool check_implant_group_only);
10063
10065
10068 // User Code Begin dbTechLayerCornerSpacingRule
10069 void setType(CornerType _type);
10070
10072
10073 void addSpacing(uint32_t width, uint32_t spacing1, uint32_t spacing2 = 0);
10074
10075 void getSpacingTable(std::vector<std::pair<int, int>>& tbl) const;
10076
10077 void getWidthTable(std::vector<int>& tbl) const;
10078
10080 dbTechLayer* inly,
10081 uint32_t dbid);
10082 // User Code End dbTechLayerCornerSpacingRule
10083};
10084
10085class dbTechLayerCutClassRule : public dbObject
10086{
10087 public:
10088 const char* getName() const;
10089
10090 void setWidth(int width);
10091
10092 int getWidth() const;
10093
10094 void setLength(int length);
10095
10096 int getLength() const;
10097
10098 void setNumCuts(int num_cuts);
10099
10100 int getNumCuts() const;
10101
10102 void setLengthValid(bool length_valid);
10103
10104 bool isLengthValid() const;
10105
10106 void setCutsValid(bool cuts_valid);
10107
10108 bool isCutsValid() const;
10109
10110 // User Code Begin dbTechLayerCutClassRule
10112 uint32_t dbid);
10113
10114 static dbTechLayerCutClassRule* create(dbTechLayer* _layer, const char* name);
10115
10117 // User Code End dbTechLayerCutClassRule
10118};
10119
10120class dbTechLayerCutEnclosureRule : public dbObject
10121{
10122 public:
10130
10131 // User Code Begin dbTechLayerCutEnclosureRuleEnums
10132 /*
10133 ENC_TYPE describes the enclosure overhang values as following (from the
10134 lefdefref):
10135 * DEFAULT : overhang1 overhang2
10136 * EOL : EOL eolWidth ... eolOverhang otherOverhang ...
10137 * ENDSIDE : END overhang1 SIDE overhang2
10138 * HORZ_AND_VERT : HORIZONTAL overhang1 VERTICAL overhang2
10139 */
10140 // User Code End dbTechLayerCutEnclosureRuleEnums
10141
10143
10145
10146 void setEolWidth(int eol_width);
10147
10148 int getEolWidth() const;
10149
10150 void setEolMinLength(int eol_min_length);
10151
10152 int getEolMinLength() const;
10153
10154 void setFirstOverhang(int first_overhang);
10155
10156 int getFirstOverhang() const;
10157
10158 void setSecondOverhang(int second_overhang);
10159
10161
10162 void setSpacing(int spacing);
10163
10164 int getSpacing() const;
10165
10166 void setExtension(int extension);
10167
10168 int getExtension() const;
10169
10170 void setForwardExtension(int forward_extension);
10171
10173
10174 void setBackwardExtension(int backward_extension);
10175
10177
10178 void setMinWidth(int min_width);
10179
10180 int getMinWidth() const;
10181
10182 void setCutWithin(int cut_within);
10183
10184 int getCutWithin() const;
10185
10186 void setMinLength(int min_length);
10187
10188 int getMinLength() const;
10189
10190 void setParLength(int par_length);
10191
10192 int getParLength() const;
10193
10194 void setSecondParLength(int second_par_length);
10195
10197
10198 void setParWithin(int par_within);
10199
10200 int getParWithin() const;
10201
10202 void setSecondParWithin(int second_par_within);
10203
10205
10206 void setBelowEnclosure(int below_enclosure);
10207
10209
10210 void setNumCorners(uint32_t num_corners);
10211
10212 uint32_t getNumCorners() const;
10213
10214 void setCutClassValid(bool cut_class_valid);
10215
10216 bool isCutClassValid() const;
10217
10218 void setAbove(bool above);
10219
10220 bool isAbove() const;
10221
10222 void setBelow(bool below);
10223
10224 bool isBelow() const;
10225
10226 void setEolMinLengthValid(bool eol_min_length_valid);
10227
10229
10230 void setEolOnly(bool eol_only);
10231
10232 bool isEolOnly() const;
10233
10234 void setShortEdgeOnEol(bool short_edge_on_eol);
10235
10236 bool isShortEdgeOnEol() const;
10237
10238 void setSideSpacingValid(bool side_spacing_valid);
10239
10241
10242 void setEndSpacingValid(bool end_spacing_valid);
10243
10244 bool isEndSpacingValid() const;
10245
10246 void setOffCenterLine(bool off_center_line);
10247
10248 bool isOffCenterLine() const;
10249
10250 void setWidthValid(bool width_valid);
10251
10252 bool isWidthValid() const;
10253
10254 void setIncludeAbutted(bool include_abutted);
10255
10256 bool isIncludeAbutted() const;
10257
10258 void setExceptExtraCut(bool except_extra_cut);
10259
10260 bool isExceptExtraCut() const;
10261
10262 void setPrl(bool prl);
10263
10264 bool isPrl() const;
10265
10266 void setNoSharedEdge(bool no_shared_edge);
10267
10268 bool isNoSharedEdge() const;
10269
10270 void setLengthValid(bool length_valid);
10271
10272 bool isLengthValid() const;
10273
10274 void setExtraCutValid(bool extra_cut_valid);
10275
10276 bool isExtraCutValid() const;
10277
10278 void setExtraOnly(bool extra_only);
10279
10280 bool isExtraOnly() const;
10281
10282 void setRedundantCutValid(bool redundant_cut_valid);
10283
10285
10286 void setParallelValid(bool parallel_valid);
10287
10288 bool isParallelValid() const;
10289
10290 void setSecondParallelValid(bool second_parallel_valid);
10291
10293
10294 void setSecondParWithinValid(bool second_par_within_valid);
10295
10297
10298 void setBelowEnclosureValid(bool below_enclosure_valid);
10299
10301
10302 void setConcaveCornersValid(bool concave_corners_valid);
10303
10305
10308 // User Code Begin dbTechLayerCutEnclosureRule
10309 void setType(ENC_TYPE type);
10310
10312
10314 dbTechLayer* inly,
10315 uint32_t dbid);
10316 // User Code End dbTechLayerCutEnclosureRule
10317};
10318
10320{
10321 public:
10323 {
10324 dbCutEnclosureAboveBelow above_below;
10329 };
10331 {
10333 dbCutEnclosureAboveBelow above_below;
10338 };
10339
10341
10343
10346 // User Code Begin dbTechLayerCutEnclosureTableDefRule
10347 void addDefaultRow(const DefaultRow& row);
10348 void addWidthRow(const WidthRow& row);
10349 void getDefaultRows(std::vector<DefaultRow>& rows) const;
10350 void getWidthRows(std::vector<WidthRow>& rows) const;
10351 // User Code End dbTechLayerCutEnclosureTableDefRule
10352};
10353
10354class dbTechLayerCutSpacingRule : public dbObject
10355{
10356 public:
10369
10370 void setCutSpacing(int cut_spacing);
10371
10372 int getCutSpacing() const;
10373
10374 void setSecondLayer(dbTechLayer* second_layer);
10375
10376 void setOrthogonalSpacing(int orthogonal_spacing);
10377
10379
10380 void setWidth(int width);
10381
10382 int getWidth() const;
10383
10384 void setEnclosure(int enclosure);
10385
10386 int getEnclosure() const;
10387
10388 void setEdgeLength(int edge_length);
10389
10390 int getEdgeLength() const;
10391
10392 void setParWithin(int par_within);
10393
10394 int getParWithin() const;
10395
10396 void setParEnclosure(int par_enclosure);
10397
10398 int getParEnclosure() const;
10399
10400 void setEdgeEnclosure(int edge_enclosure);
10401
10402 int getEdgeEnclosure() const;
10403
10404 void setAdjEnclosure(int adj_enclosure);
10405
10406 int getAdjEnclosure() const;
10407
10408 void setAboveEnclosure(int above_enclosure);
10409
10411
10412 void setAboveWidth(int above_width);
10413
10414 int getAboveWidth() const;
10415
10416 void setMinLength(int min_length);
10417
10418 int getMinLength() const;
10419
10420 void setExtension(int extension);
10421
10422 int getExtension() const;
10423
10424 void setEolWidth(int eol_width);
10425
10426 int getEolWidth() const;
10427
10428 void setNumCuts(uint32_t num_cuts);
10429
10430 uint32_t getNumCuts() const;
10431
10432 void setWithin(int within);
10433
10434 int getWithin() const;
10435
10436 void setSecondWithin(int second_within);
10437
10438 int getSecondWithin() const;
10439
10441
10442 void setTwoCuts(uint32_t two_cuts);
10443
10444 uint32_t getTwoCuts() const;
10445
10446 void setPrl(uint32_t prl);
10447
10448 uint32_t getPrl() const;
10449
10450 void setParLength(uint32_t par_length);
10451
10452 uint32_t getParLength() const;
10453
10454 void setCutArea(int64_t cut_area);
10455
10456 int64_t getCutArea() const;
10457
10458 void setCenterToCenter(bool center_to_center);
10459
10460 bool isCenterToCenter() const;
10461
10462 void setSameNet(bool same_net);
10463
10464 bool isSameNet() const;
10465
10466 void setSameMetal(bool same_metal);
10467
10468 bool isSameMetal() const;
10469
10470 void setSameVia(bool same_via);
10471
10472 bool isSameVia() const;
10473
10474 void setStack(bool stack);
10475
10476 bool isStack() const;
10477
10478 void setOrthogonalSpacingValid(bool orthogonal_spacing_valid);
10479
10481
10482 void setAboveWidthEnclosureValid(bool above_width_enclosure_valid);
10483
10485
10486 void setShortEdgeOnly(bool short_edge_only);
10487
10488 bool isShortEdgeOnly() const;
10489
10490 void setConcaveCornerWidth(bool concave_corner_width);
10491
10493
10494 void setConcaveCornerParallel(bool concave_corner_parallel);
10495
10497
10498 void setConcaveCornerEdgeLength(bool concave_corner_edge_length);
10499
10501
10502 void setConcaveCorner(bool concave_corner);
10503
10504 bool isConcaveCorner() const;
10505
10506 void setExtensionValid(bool extension_valid);
10507
10508 bool isExtensionValid() const;
10509
10510 void setNonEolConvexCorner(bool non_eol_convex_corner);
10511
10513
10514 void setEolWidthValid(bool eol_width_valid);
10515
10516 bool isEolWidthValid() const;
10517
10518 void setMinLengthValid(bool min_length_valid);
10519
10520 bool isMinLengthValid() const;
10521
10522 void setAboveWidthValid(bool above_width_valid);
10523
10524 bool isAboveWidthValid() const;
10525
10526 void setMaskOverlap(bool mask_overlap);
10527
10528 bool isMaskOverlap() const;
10529
10530 void setWrongDirection(bool wrong_direction);
10531
10532 bool isWrongDirection() const;
10533
10534 void setAdjacentCuts(uint32_t adjacent_cuts);
10535
10536 uint32_t getAdjacentCuts() const;
10537
10538 void setExactAligned(bool exact_aligned);
10539
10540 bool isExactAligned() const;
10541
10542 void setCutClassToAll(bool cut_class_to_all);
10543
10544 bool isCutClassToAll() const;
10545
10546 void setNoPrl(bool no_prl);
10547
10548 bool isNoPrl() const;
10549
10550 void setSameMask(bool same_mask);
10551
10552 bool isSameMask() const;
10553
10554 void setExceptSamePgnet(bool except_same_pgnet);
10555
10556 bool isExceptSamePgnet() const;
10557
10558 void setSideParallelOverlap(bool side_parallel_overlap);
10559
10561
10562 void setExceptSameNet(bool except_same_net);
10563
10564 bool isExceptSameNet() const;
10565
10566 void setExceptSameMetal(bool except_same_metal);
10567
10568 bool isExceptSameMetal() const;
10569
10570 void setExceptSameMetalOverlap(bool except_same_metal_overlap);
10571
10573
10574 void setExceptSameVia(bool except_same_via);
10575
10576 bool isExceptSameVia() const;
10577
10578 void setAbove(bool above);
10579
10580 bool isAbove() const;
10581
10582 void setExceptTwoEdges(bool except_two_edges);
10583
10584 bool isExceptTwoEdges() const;
10585
10586 void setTwoCutsValid(bool two_cuts_valid);
10587
10588 bool isTwoCutsValid() const;
10589
10590 void setSameCut(bool same_cut);
10591
10592 bool isSameCut() const;
10593
10594 void setLongEdgeOnly(bool long_edge_only);
10595
10596 bool isLongEdgeOnly() const;
10597
10598 void setPrlValid(bool prl_valid);
10599
10600 bool isPrlValid() const;
10601
10602 void setBelow(bool below);
10603
10604 bool isBelow() const;
10605
10606 void setParWithinEnclosureValid(bool par_within_enclosure_valid);
10607
10609
10612 // User Code Begin dbTechLayerCutSpacingRule
10614
10616
10618
10620
10622
10624 dbTechLayer* inly,
10625 uint32_t dbid);
10626
10627 // User Code End dbTechLayerCutSpacingRule
10628};
10629
10631{
10632 public:
10640
10641 // User Code Begin dbTechLayerCutSpacingTableDefRuleEnums
10642 /*
10643 LOOKUP_STRATEGY:
10644 * FIRST : first spacing value
10645 * SECOND : second spacing value
10646 * MAX : max spacing value
10647 * MIN : min spacing value
10648 */
10649 // User Code End dbTechLayerCutSpacingTableDefRuleEnums
10650
10651 void setDefault(int spacing);
10652
10653 int getDefault() const;
10654
10655 void setSecondLayer(dbTechLayer* second_layer);
10656
10657 void setPrl(int prl);
10658
10659 int getPrl() const;
10660
10661 void setExtension(int extension);
10662
10663 int getExtension() const;
10664
10665 void setDefaultValid(bool default_valid);
10666
10667 bool isDefaultValid() const;
10668
10669 void setSameMask(bool same_mask);
10670
10671 bool isSameMask() const;
10672
10673 void setSameNet(bool same_net);
10674
10675 bool isSameNet() const;
10676
10677 void setSameMetal(bool same_metal);
10678
10679 bool isSameMetal() const;
10680
10681 void setSameVia(bool same_via);
10682
10683 bool isSameVia() const;
10684
10685 void setLayerValid(bool layer_valid);
10686
10687 bool isLayerValid() const;
10688
10689 void setNoStack(bool no_stack);
10690
10691 bool isNoStack() const;
10692
10693 void setNonZeroEnclosure(bool non_zero_enclosure);
10694
10696
10697 void setPrlForAlignedCut(bool prl_for_aligned_cut);
10698
10700
10701 void setCenterToCenterValid(bool center_to_center_valid);
10702
10704
10705 void setCenterAndEdgeValid(bool center_and_edge_valid);
10706
10708
10709 void setNoPrl(bool no_prl);
10710
10711 bool isNoPrl() const;
10712
10713 void setPrlValid(bool prl_valid);
10714
10715 bool isPrlValid() const;
10716
10717 void setMaxXY(bool max_x_y);
10718
10719 bool isMaxXY() const;
10720
10721 void setEndExtensionValid(bool end_extension_valid);
10722
10724
10725 void setSideExtensionValid(bool side_extension_valid);
10726
10728
10729 void setExactAlignedSpacingValid(bool exact_aligned_spacing_valid);
10730
10732
10733 void setHorizontal(bool horizontal);
10734
10735 bool isHorizontal() const;
10736
10737 void setPrlHorizontal(bool prl_horizontal);
10738
10739 bool isPrlHorizontal() const;
10740
10741 void setVertical(bool vertical);
10742
10743 bool isVertical() const;
10744
10745 void setPrlVertical(bool prl_vertical);
10746
10747 bool isPrlVertical() const;
10748
10750 bool non_opposite_enclosure_spacing_valid);
10751
10753
10755 bool opposite_enclosure_resize_spacing_valid);
10756
10758
10761 // User Code Begin dbTechLayerCutSpacingTableDefRule
10762 void addPrlForAlignedCutEntry(const std::string& from, const std::string& to);
10763
10764 void addCenterToCenterEntry(const std::string& from, const std::string& to);
10765
10766 void addCenterAndEdgeEntry(const std::string& from, const std::string& to);
10767
10768 void addPrlEntry(const std::string& from, const std::string& to, int ccPrl);
10769
10770 void addEndExtensionEntry(const std::string& cls, int ext);
10771
10772 void addSideExtensionEntry(const std::string& cls, int ext);
10773
10774 void addExactElignedEntry(const std::string& cls, int spacing);
10775
10776 void addNonOppEncSpacingEntry(const std::string& cls, int spacing);
10777
10778 void addOppEncSpacingEntry(const std::string& cls,
10779 int rsz1,
10780 int rsz2,
10781 int spacing);
10782
10784
10785 bool isCenterToCenter(const std::string& cutClass1,
10786 const std::string& cutClass2) const;
10787
10788 bool isCenterAndEdge(const std::string& cutClass1,
10789 const std::string& cutClass2) const;
10790
10791 bool isPrlForAlignedCutClasses(const std::string& cutClass1,
10792 const std::string& cutClass2) const;
10793
10794 int getPrlEntry(const std::string& cutClass1,
10795 const std::string& cutClass2) const;
10796
10798 const std::vector<std::vector<std::pair<int, int>>>& table,
10799 const std::map<std::string, uint32_t>& row_map,
10800 const std::map<std::string, uint32_t>& col_map);
10801
10802 void getSpacingTable(std::vector<std::vector<std::pair<int, int>>>& table,
10803 std::map<std::string, uint32_t>& row_map,
10804 std::map<std::string, uint32_t>& col_map) const;
10805
10806 int getMaxSpacing(std::string cutClass, bool SIDE) const;
10807
10808 int getExactAlignedSpacing(const std::string& cutClass) const;
10809
10810 int getMaxSpacing(const std::string& cutClass1,
10811 const std::string& cutClass2,
10812 LOOKUP_STRATEGY strategy = MAX) const;
10813
10814 int getSpacing(std::string class1,
10815 bool SIDE1,
10816 std::string class2,
10817 bool SIDE2,
10818 LOOKUP_STRATEGY strategy = MAX) const;
10819
10821
10824
10825 // User Code End dbTechLayerCutSpacingTableDefRule
10826};
10827
10829{
10830 public:
10831 void getSpacingTable(std::vector<std::pair<int, int>>& tbl) const;
10832
10835 // User Code Begin dbTechLayerCutSpacingTableOrthRule
10836 void setSpacingTable(const std::vector<std::pair<int, int>>& tbl);
10837
10840
10841 // User Code End dbTechLayerCutSpacingTableOrthRule
10842};
10843
10844class dbTechLayerEolExtensionRule : public dbObject
10845{
10846 public:
10847 void setSpacing(int spacing);
10848
10849 int getSpacing() const;
10850
10851 void getExtensionTable(std::vector<std::pair<int, int>>& tbl) const;
10852
10853 void setParallelOnly(bool parallel_only);
10854
10855 bool isParallelOnly() const;
10856
10859 // User Code Begin dbTechLayerEolExtensionRule
10860
10861 void addEntry(int eol, int ext);
10862
10864 dbTechLayer* inly,
10865 uint32_t dbid);
10866
10867 // User Code End dbTechLayerEolExtensionRule
10868};
10869
10870class dbTechLayerEolKeepOutRule : public dbObject
10871{
10872 public:
10873 void setEolWidth(int eol_width);
10874
10875 int getEolWidth() const;
10876
10877 void setBackwardExt(int backward_ext);
10878
10879 int getBackwardExt() const;
10880
10881 void setForwardExt(int forward_ext);
10882
10883 int getForwardExt() const;
10884
10885 void setSideExt(int side_ext);
10886
10887 int getSideExt() const;
10888
10889 void setWithinLow(int within_low);
10890
10891 int getWithinLow() const;
10892
10893 void setWithinHigh(int within_high);
10894
10895 int getWithinHigh() const;
10896
10897 void setClassName(const std::string& class_name);
10898
10899 const std::string& getClassName() const;
10900
10901 void setClassValid(bool class_valid);
10902
10903 bool isClassValid() const;
10904
10905 void setCornerOnly(bool corner_only);
10906
10907 bool isCornerOnly() const;
10908
10909 void setExceptWithin(bool except_within);
10910
10911 bool isExceptWithin() const;
10912
10915 // User Code Begin dbTechLayerEolKeepOutRule
10916
10918 dbTechLayer* inly,
10919 uint32_t dbid);
10920 // User Code End dbTechLayerEolKeepOutRule
10921};
10922
10923class dbTechLayerForbiddenSpacingRule : public dbObject
10924{
10925 public:
10926 void setForbiddenSpacing(const std::pair<int, int>& forbidden_spacing);
10927
10928 std::pair<int, int> getForbiddenSpacing() const;
10929
10930 void setWidth(int width);
10931
10932 int getWidth() const;
10933
10934 void setWithin(int within);
10935
10936 int getWithin() const;
10937
10938 void setPrl(int prl);
10939
10940 int getPrl() const;
10941
10942 void setTwoEdges(int two_edges);
10943
10944 int getTwoEdges() const;
10945
10946 // User Code Begin dbTechLayerForbiddenSpacingRule
10947
10948 bool hasWidth() const;
10949
10950 bool hasWithin() const;
10951
10952 bool hasPrl() const;
10953
10954 bool hasTwoEdges() const;
10955
10957
10959
10960 // User Code End dbTechLayerForbiddenSpacingRule
10961};
10962
10963class dbTechLayerImplantSpacingRule : public dbObject
10964{
10965 public:
10966 void setMinSpacing(int min_spacing);
10967
10968 int getMinSpacing() const;
10969
10970 void setPrl(int prl);
10971
10972 int getPrl() const;
10973
10974 void setLength(int length);
10975
10976 int getLength() const;
10977
10978 void setHorizontal(bool horizontal);
10979
10980 bool isHorizontal() const;
10981
10982 void setVertical(bool vertical);
10983
10984 bool isVertical() const;
10985
10986 void setPrlValid(bool prl_valid);
10987
10988 bool isPrlValid() const;
10989
10990 void setExceptAbutted(bool except_abutted);
10991
10992 bool isExceptAbutted() const;
10993
10994 void setExceptCornerTouch(bool except_corner_touch);
10995
10997
11000 // User Code Begin dbTechLayerImplantSpacingRule
11001 void setSecondLayer(dbTechLayer* second_layer);
11004 std::vector<dbTechLayer*> getIntersectLayers() const;
11005 // User Code End dbTechLayerImplantSpacingRule
11006};
11007
11008class dbTechLayerImplantWidthRule : public dbObject
11009{
11010 public:
11011 void setMinWidth(int min_width);
11012
11013 int getMinWidth() const;
11014
11015 void setMaxWidth(int max_width);
11016
11017 int getMaxWidth() const;
11018
11019 void setLength(int length);
11020
11021 int getLength() const;
11022
11023 void setCellHeight(int cell_height);
11024
11025 int getCellHeight() const;
11026
11027 void setCheckImplantGroup(const std::string& check_implant_group);
11028
11029 const std::string& getCheckImplantGroup() const;
11030
11031 void setLayerAny(bool layer_any);
11032
11033 bool isLayerAny() const;
11034
11035 void setZeroPrl(bool zero_prl);
11036
11037 bool isZeroPrl() const;
11038
11039 void setExceptCornerTouch(bool except_corner_touch);
11040
11042
11045 // User Code Begin dbTechLayerImplantWidthRule
11046 void setSecondLayer(dbTechLayer* second_layer);
11049 std::vector<dbTechLayer*> getWithinLayers() const;
11050 // User Code End dbTechLayerImplantWidthRule
11051};
11052
11053class dbTechLayerKeepOutZoneRule : public dbObject
11054{
11055 public:
11056 void setFirstCutClass(const std::string& first_cut_class);
11057
11058 const std::string& getFirstCutClass() const;
11059
11060 void setSecondCutClass(const std::string& second_cut_class);
11061
11062 const std::string& getSecondCutClass() const;
11063
11064 void setAlignedSpacing(int aligned_spacing);
11065
11067
11068 void setSideExtension(int side_extension);
11069
11070 int getSideExtension() const;
11071
11072 void setForwardExtension(int forward_extension);
11073
11075
11076 void setEndSideExtension(int end_side_extension);
11077
11079
11080 void setEndForwardExtension(int end_forward_extension);
11081
11083
11084 void setSideSideExtension(int side_side_extension);
11085
11087
11088 void setSideForwardExtension(int side_forward_extension);
11089
11091
11092 void setSpiralExtension(int spiral_extension);
11093
11095
11096 void setSameMask(bool same_mask);
11097
11098 bool isSameMask() const;
11099
11100 void setSameMetal(bool same_metal);
11101
11102 bool isSameMetal() const;
11103
11104 void setDiffMetal(bool diff_metal);
11105
11106 bool isDiffMetal() const;
11107
11108 void setExceptAlignedSide(bool except_aligned_side);
11109
11111
11112 void setExceptAlignedEnd(bool except_aligned_end);
11113
11115
11118 // User Code Begin dbTechLayerKeepOutZoneRule
11119
11120 // User Code End dbTechLayerKeepOutZoneRule
11121};
11122
11123class dbTechLayerMaxSpacingRule : public dbObject
11124{
11125 public:
11126 void setCutClass(const std::string& cut_class);
11127
11128 const std::string& getCutClass() const;
11129
11130 void setMaxSpacing(int max_spacing);
11131
11132 int getMaxSpacing() const;
11133
11134 void setWidth(int width);
11135
11136 int getWidth() const;
11137
11138 void setLength(int length);
11139
11140 int getLength() const;
11141
11144 // User Code Begin dbTechLayerMaxSpacingRule
11145 bool hasCutClass() const;
11146
11147 // User Code End dbTechLayerMaxSpacingRule
11148};
11149
11150class dbTechLayerMinCutRule : public dbObject
11151{
11152 public:
11153 void setNumCuts(int num_cuts);
11154
11155 int getNumCuts() const;
11156
11157 const std::map<std::string, int>& getCutClassCutsMap() const;
11158
11159 void setWidth(int width);
11160
11161 int getWidth() const;
11162
11163 void setWithinCutDist(int within_cut_dist);
11164
11165 int getWithinCutDist() const;
11166
11167 void setLength(int length);
11168
11169 int getLength() const;
11170
11171 void setLengthWithinDist(int length_within_dist);
11172
11174
11175 void setArea(int64_t area);
11176
11177 int64_t getArea() const;
11178
11179 void setAreaWithinDist(int area_within_dist);
11180
11182
11183 void setPerCutClass(bool per_cut_class);
11184
11185 bool isPerCutClass() const;
11186
11187 void setWithinCutDistValid(bool within_cut_dist_valid);
11188
11190
11191 void setFromAbove(bool from_above);
11192
11193 bool isFromAbove() const;
11194
11195 void setFromBelow(bool from_below);
11196
11197 bool isFromBelow() const;
11198
11199 void setLengthValid(bool length_valid);
11200
11201 bool isLengthValid() const;
11202
11203 void setAreaValid(bool area_valid);
11204
11205 bool isAreaValid() const;
11206
11207 void setAreaWithinDistValid(bool area_within_dist_valid);
11208
11210
11211 void setSameMetalOverlap(bool same_metal_overlap);
11212
11214
11215 void setFullyEnclosed(bool fully_enclosed);
11216
11217 bool isFullyEnclosed() const;
11218
11221 // User Code Begin dbTechLayerMinCutRule
11222
11223 void setCutsPerCutClass(const std::string& cut_class, int num_cuts);
11224
11226 uint32_t dbid);
11227
11228 // User Code End dbTechLayerMinCutRule
11229};
11230
11231class dbTechLayerMinStepRule : public dbObject
11232{
11233 public:
11234 void setMinStepLength(int min_step_length);
11235
11236 int getMinStepLength() const;
11237
11238 void setMaxEdges(uint32_t max_edges);
11239
11240 uint32_t getMaxEdges() const;
11241
11242 void setMinAdjLength1(int min_adj_length1);
11243
11244 int getMinAdjLength1() const;
11245
11246 void setMinAdjLength2(int min_adj_length2);
11247
11248 int getMinAdjLength2() const;
11249
11250 void setEolWidth(int eol_width);
11251
11252 int getEolWidth() const;
11253
11254 void setMinBetweenLength(int min_between_length);
11255
11257
11258 void setMaxEdgesValid(bool max_edges_valid);
11259
11260 bool isMaxEdgesValid() const;
11261
11262 void setMinAdjLength1Valid(bool min_adj_length1_valid);
11263
11265
11266 void setNoBetweenEol(bool no_between_eol);
11267
11268 bool isNoBetweenEol() const;
11269
11270 void setMinAdjLength2Valid(bool min_adj_length2_valid);
11271
11273
11274 void setConvexCorner(bool convex_corner);
11275
11276 bool isConvexCorner() const;
11277
11278 void setMinBetweenLengthValid(bool min_between_length_valid);
11279
11281
11282 void setExceptSameCorners(bool except_same_corners);
11283
11285
11286 void setConcaveCorner(bool concave_corner);
11287
11288 bool isConcaveCorner() const;
11289
11290 void setExceptRectangle(bool except_rectangle);
11291
11292 bool isExceptRectangle() const;
11293
11294 void setNoAdjacentEol(bool no_adjacent_eol);
11295
11296 bool isNoAdjacentEol() const;
11297
11300 // User Code Begin dbTechLayerMinStepRule
11301
11303 uint32_t dbid);
11304
11305 // User Code End dbTechLayerMinStepRule
11306};
11307
11308class dbTechLayerSpacingEolRule : public dbObject
11309{
11310 public:
11311 void setEolSpace(int eol_space);
11312
11313 int getEolSpace() const;
11314
11315 void setEolWidth(int eol_width);
11316
11317 int getEolWidth() const;
11318
11319 void setWrongDirSpace(int wrong_dir_space);
11320
11321 int getWrongDirSpace() const;
11322
11323 void setOppositeWidth(int opposite_width);
11324
11325 int getOppositeWidth() const;
11326
11327 void setEolWithin(int eol_within);
11328
11329 int getEolWithin() const;
11330
11331 void setWrongDirWithin(int wrong_dir_within);
11332
11334
11335 void setExactWidth(int exact_width);
11336
11337 int getExactWidth() const;
11338
11339 void setOtherWidth(int other_width);
11340
11341 int getOtherWidth() const;
11342
11343 void setFillTriangle(int fill_triangle);
11344
11345 int getFillTriangle() const;
11346
11347 void setCutClass(int cut_class);
11348
11349 int getCutClass() const;
11350
11351 void setWithCutSpace(int with_cut_space);
11352
11353 int getWithCutSpace() const;
11354
11355 void setEnclosureEndWidth(int enclosure_end_width);
11356
11358
11359 void setEnclosureEndWithin(int enclosure_end_within);
11360
11362
11363 void setEndPrlSpace(int end_prl_space);
11364
11365 int getEndPrlSpace() const;
11366
11367 void setEndPrl(int end_prl);
11368
11369 int getEndPrl() const;
11370
11371 void setEndToEndSpace(int end_to_end_space);
11372
11373 int getEndToEndSpace() const;
11374
11375 void setOneCutSpace(int one_cut_space);
11376
11377 int getOneCutSpace() const;
11378
11379 void setTwoCutSpace(int two_cut_space);
11380
11381 int getTwoCutSpace() const;
11382
11383 void setExtension(int extension);
11384
11385 int getExtension() const;
11386
11387 void setWrongDirExtension(int wrong_dir_extension);
11388
11390
11391 void setOtherEndWidth(int other_end_width);
11392
11393 int getOtherEndWidth() const;
11394
11395 void setMaxLength(int max_length);
11396
11397 int getMaxLength() const;
11398
11399 void setMinLength(int min_length);
11400
11401 int getMinLength() const;
11402
11403 void setParSpace(int par_space);
11404
11405 int getParSpace() const;
11406
11407 void setParWithin(int par_within);
11408
11409 int getParWithin() const;
11410
11411 void setParPrl(int par_prl);
11412
11413 int getParPrl() const;
11414
11415 void setParMinLength(int par_min_length);
11416
11417 int getParMinLength() const;
11418
11419 void setEncloseDist(int enclose_dist);
11420
11421 int getEncloseDist() const;
11422
11423 void setCutToMetalSpace(int cut_to_metal_space);
11424
11426
11427 void setMinAdjLength(int min_adj_length);
11428
11429 int getMinAdjLength() const;
11430
11431 void setMinAdjLength1(int min_adj_length1);
11432
11433 int getMinAdjLength1() const;
11434
11435 void setMinAdjLength2(int min_adj_length2);
11436
11437 int getMinAdjLength2() const;
11438
11439 void setNotchLength(int notch_length);
11440
11441 int getNotchLength() const;
11442
11443 void setExactWidthValid(bool exact_width_valid);
11444
11445 bool isExactWidthValid() const;
11446
11447 void setWrongDirSpacingValid(bool wrong_dir_spacing_valid);
11448
11450
11451 void setOppositeWidthValid(bool opposite_width_valid);
11452
11454
11455 void setWithinValid(bool within_valid);
11456
11457 bool isWithinValid() const;
11458
11459 void setWrongDirWithinValid(bool wrong_dir_within_valid);
11460
11462
11463 void setSameMaskValid(bool same_mask_valid);
11464
11465 bool isSameMaskValid() const;
11466
11467 void setExceptExactWidthValid(bool except_exact_width_valid);
11468
11470
11471 void setFillConcaveCornerValid(bool fill_concave_corner_valid);
11472
11474
11475 void setWithcutValid(bool withcut_valid);
11476
11477 bool isWithcutValid() const;
11478
11479 void setCutClassValid(bool cut_class_valid);
11480
11481 bool isCutClassValid() const;
11482
11483 void setWithCutAboveValid(bool with_cut_above_valid);
11484
11486
11487 void setEnclosureEndValid(bool enclosure_end_valid);
11488
11490
11491 void setEnclosureEndWithinValid(bool enclosure_end_within_valid);
11492
11494
11495 void setEndPrlSpacingValid(bool end_prl_spacing_valid);
11496
11498
11499 void setPrlValid(bool prl_valid);
11500
11501 bool isPrlValid() const;
11502
11503 void setEndToEndValid(bool end_to_end_valid);
11504
11505 bool isEndToEndValid() const;
11506
11507 void setCutSpacesValid(bool cut_spaces_valid);
11508
11509 bool isCutSpacesValid() const;
11510
11511 void setExtensionValid(bool extension_valid);
11512
11513 bool isExtensionValid() const;
11514
11515 void setWrongDirExtensionValid(bool wrong_dir_extension_valid);
11516
11518
11519 void setOtherEndWidthValid(bool other_end_width_valid);
11520
11522
11523 void setMaxLengthValid(bool max_length_valid);
11524
11525 bool isMaxLengthValid() const;
11526
11527 void setMinLengthValid(bool min_length_valid);
11528
11529 bool isMinLengthValid() const;
11530
11531 void setTwoSidesValid(bool two_sides_valid);
11532
11533 bool isTwoSidesValid() const;
11534
11535 void setEqualRectWidthValid(bool equal_rect_width_valid);
11536
11538
11539 void setParallelEdgeValid(bool parallel_edge_valid);
11540
11542
11543 void setSubtractEolWidthValid(bool subtract_eol_width_valid);
11544
11546
11547 void setParPrlValid(bool par_prl_valid);
11548
11549 bool isParPrlValid() const;
11550
11551 void setParMinLengthValid(bool par_min_length_valid);
11552
11554
11555 void setTwoEdgesValid(bool two_edges_valid);
11556
11557 bool isTwoEdgesValid() const;
11558
11559 void setSameMetalValid(bool same_metal_valid);
11560
11561 bool isSameMetalValid() const;
11562
11563 void setNonEolCornerOnlyValid(bool non_eol_corner_only_valid);
11564
11566
11567 void setParallelSameMaskValid(bool parallel_same_mask_valid);
11568
11570
11571 void setEncloseCutValid(bool enclose_cut_valid);
11572
11573 bool isEncloseCutValid() const;
11574
11575 void setBelowValid(bool below_valid);
11576
11577 bool isBelowValid() const;
11578
11579 void setAboveValid(bool above_valid);
11580
11581 bool isAboveValid() const;
11582
11583 void setCutSpacingValid(bool cut_spacing_valid);
11584
11585 bool isCutSpacingValid() const;
11586
11587 void setAllCutsValid(bool all_cuts_valid);
11588
11589 bool isAllCutsValid() const;
11590
11591 void setToConcaveCornerValid(bool to_concave_corner_valid);
11592
11594
11595 void setMinAdjacentLengthValid(bool min_adjacent_length_valid);
11596
11598
11599 void setTwoMinAdjLengthValid(bool two_min_adj_length_valid);
11600
11602
11603 void setToNotchLengthValid(bool to_notch_length_valid);
11604
11606
11609 // User Code Begin dbTechLayerSpacingEolRule
11610
11612 dbTechLayer* inly,
11613 uint32_t dbid);
11614
11615 // User Code End dbTechLayerSpacingEolRule
11616};
11617
11618class dbTechLayerSpacingTablePrlRule : public dbObject
11619{
11620 public:
11621 void setEolWidth(int eol_width);
11622
11623 int getEolWidth() const;
11624
11625 void setWrongDirection(bool wrong_direction);
11626
11627 bool isWrongDirection() const;
11628
11629 void setSameMask(bool same_mask);
11630
11631 bool isSameMask() const;
11632
11633 void setExceeptEol(bool exceept_eol);
11634
11635 bool isExceeptEol() const;
11636
11639 // User Code Begin dbTechLayerSpacingTablePrlRule
11641 dbTechLayer* inly,
11642 uint32_t dbid);
11643
11644 void setTable(const std::vector<int>& width_tbl,
11645 const std::vector<int>& length_tbl,
11646 const std::vector<std::vector<int>>& spacing_tbl,
11647 const std::map<uint32_t, std::pair<int, int>>& excluded_map);
11648 void getTable(std::vector<int>& width_tbl,
11649 std::vector<int>& length_tbl,
11650 std::vector<std::vector<int>>& spacing_tbl,
11651 std::map<uint32_t, std::pair<int, int>>& excluded_map) const;
11652
11654 const std::vector<std::tuple<int, int, int>>& influence_tbl);
11655
11656 int getSpacing(int width, int length) const;
11657
11658 bool hasExceptWithin(int width) const;
11659
11660 std::pair<int, int> getExceptWithin(int width) const;
11661
11662 // User Code End dbTechLayerSpacingTablePrlRule
11663};
11664
11666{
11667 public:
11668 void setMinSpacing(int min_spacing);
11669
11670 int getMinSpacing() const;
11671
11672 void setMaxSpacing(int max_spacing);
11673
11674 int getMaxSpacing() const;
11675
11676 void setMinSpanLength(int min_span_length);
11677
11678 int getMinSpanLength() const;
11679
11680 void setMaxSpanLength(int max_span_length);
11681
11682 int getMaxSpanLength() const;
11683
11684 void setPrl(int prl);
11685
11686 int getPrl() const;
11687
11688 void setMinExactSpanLength(bool min_exact_span_length);
11689
11691
11692 void setMaxExactSpanLength(bool max_exact_span_length);
11693
11695
11696 // User Code Begin dbTechLayerTwoWiresForbiddenSpcRule
11698
11700 // User Code End dbTechLayerTwoWiresForbiddenSpcRule
11701};
11702
11703class dbTechLayerVoltageSpacing : public dbObject
11704{
11705 public:
11706 void setTocutAbove(bool tocut_above);
11707
11708 bool isTocutAbove() const;
11709
11710 void setTocutBelow(bool tocut_below);
11711
11712 bool isTocutBelow() const;
11713
11716 // User Code Begin dbTechLayerVoltageSpacing
11717 const std::map<float, int>& getTable() const;
11718 void addEntry(float voltage, int spacing);
11719
11720 // User Code End dbTechLayerVoltageSpacing
11721};
11722
11723class dbTechLayerWidthTableRule : public dbObject
11724{
11725 public:
11726 void setWrongDirection(bool wrong_direction);
11727
11728 bool isWrongDirection() const;
11729
11730 void setOrthogonal(bool orthogonal);
11731
11732 bool isOrthogonal() const;
11733
11734 // User Code Begin dbTechLayerWidthTableRule
11735
11736 void addWidth(int width);
11737
11738 std::vector<int> getWidthTable() const;
11739
11741
11743 dbTechLayer* inly,
11744 uint32_t dbid);
11745
11747 // User Code End dbTechLayerWidthTableRule
11748};
11749
11750class dbTechLayerWrongDirSpacingRule : public dbObject
11751{
11752 public:
11753 void setWrongdirSpace(int wrongdir_space);
11754
11755 int getWrongdirSpace() const;
11756
11757 void setNoneolWidth(int noneol_width);
11758
11759 int getNoneolWidth() const;
11760
11761 void setLength(int length);
11762
11763 int getLength() const;
11764
11765 void setPrlLength(int prl_length);
11766
11767 int getPrlLength() const;
11768
11769 void setNoneolValid(bool noneol_valid);
11770
11771 bool isNoneolValid() const;
11772
11773 void setLengthValid(bool length_valid);
11774
11775 bool isLengthValid() const;
11776
11779 // User Code Begin dbTechLayerWrongDirSpacingRule
11780
11782 dbTechLayer* inly,
11783 uint32_t dbid);
11784
11785 // User Code End dbTechLayerWrongDirSpacingRule
11786};
11787
11788class dbUnfoldedChipBumpInst : public dbObject
11789{
11790 public:
11792
11794
11795 // User Code Begin dbUnfoldedChipBumpInst
11796 Point3D getGlobalPosition() const;
11797 // User Code End dbUnfoldedChipBumpInst
11798};
11799
11800class dbUnfoldedChipConn : public dbObject
11801{
11802 public:
11804
11806
11808};
11809
11810class dbUnfoldedChipInst : public dbObject
11811{
11812 public:
11813 const std::string& getName() const;
11814
11815 dbTransform getTransform() const;
11816
11817 // User Code Begin dbUnfoldedChipInst
11818 Cuboid getCuboid() const;
11819
11820 dbSet<dbUnfoldedChipRegionInst> getRegions() const;
11821
11826 std::vector<dbChipInst*> getChipInstPath() const;
11827
11833 // User Code End dbUnfoldedChipInst
11834};
11835
11836class dbUnfoldedChipNet : public dbObject
11837{
11838 public:
11840
11841 // User Code Begin dbUnfoldedChipNet
11842 std::vector<dbUnfoldedChipBumpInst*> getConnectedBumps() const;
11843 // User Code End dbUnfoldedChipNet
11844};
11845
11846class dbUnfoldedChipRegionInst : public dbObject
11847{
11848 public:
11856
11858
11860
11861 // User Code Begin dbUnfoldedChipRegionInst
11862 Cuboid getCuboid() const;
11863
11866
11867 bool isTop() const;
11868 bool isBottom() const;
11869 bool isInternal() const;
11870 bool isInternalExt() const;
11871
11872 int getSurfaceZ() const;
11873
11874 dbSet<dbUnfoldedChipBumpInst> getBumps() const;
11875 // User Code End dbUnfoldedChipRegionInst
11876};
11877
11878// Generator Code End ClassDefinition
11883{
11884 public:
11886 bool getValue() const;
11887
11889 void setValue(bool value);
11890
11893 static dbBoolProperty* create(dbObject* object, const char* name, bool value);
11894
11897 static dbBoolProperty* find(dbObject* object, const char* name);
11898};
11899
11904{
11905 public:
11907 std::string getValue() const;
11908
11910 void setValue(const char* value);
11911
11914 static dbStringProperty* create(dbObject* object,
11915 const char* name,
11916 const char* value);
11917
11920 static dbStringProperty* find(dbObject* object, const char* name);
11921};
11922
11927{
11928 public:
11930 int getValue() const;
11931
11933 void setValue(int value);
11934
11937 static dbIntProperty* create(dbObject* object, const char* name, int value);
11938
11941 static dbIntProperty* find(dbObject* object, const char* name);
11942};
11943
11948{
11949 public:
11951 double getValue() const;
11952
11954 void setValue(double value);
11955
11958 static dbDoubleProperty* create(dbObject* object,
11959 const char* name,
11960 double value);
11961
11964 static dbDoubleProperty* find(dbObject* object, const char* name);
11965};
11966
11967} // namespace odb
11968
11969// Overload std::less for these types
11970#include "odb/dbCompare.inc" // IWYU pragma: export
dbAccessType getLowType() const
void getAccesses(std::vector< dbDirection > &tbl) const
static dbAccessPoint * create(dbBlock *block, dbMPin *pin, uint32_t pin_access_idx)
void setLayer(dbTechLayer *layer)
std::vector< std::vector< dbObject * > > getVias() const
void addBlockVia(int num_cuts, dbVia *via)
void setLowType(dbAccessType type_low)
dbBPin * getBPin() const
static void destroy(dbAccessPoint *ap)
void setPoint(const Point &point)
void setAccess(bool access, dbDirection dir)
static dbAccessPoint * getAccessPoint(dbBlock *block, uint32_t dbid)
dbMPin * getMPin() const
void setAccesses(const std::vector< dbDirection > &accesses)
dbAccessType getHighType() const
static dbAccessPoint * create(dbBPin *)
const std::vector< std::tuple< Rect, bool, bool > > & getSegments() const
bool hasAccess(dbDirection dir=dbDirection::NONE) const
void setHighType(dbAccessType type_high)
Point getPoint() const
void addTechVia(int num_cuts, dbTechVia *via)
void addSegment(const Rect &segment, const bool &begin_style_trunc, const bool &end_style_trunc)
dbTechLayer * getLayer() const
dbMaster * getMasterA() const
void addRelativeOrientation(dbOrientType relative_orientation)
static dbAlignmentMarkerRule * create(dbMaster *master_a, dbMaster *master_b)
void setRelativeOrientations(const std::vector< dbOrientType > &relative_orientations)
static void destroy(dbAlignmentMarkerRule *alignment_marker_rule)
dbMaster * getMasterB() const
void setTolerance(int tolerance)
std::vector< dbOrientType > getRelativeOrientations() const
void setPlacementStatus(dbPlacementStatus status)
int getMinSpacing() const
dbSet< dbBox > getBoxes() const
bool hasMinSpacing() const
Rect getBBox() const
static dbBPin * getBPin(dbBlock *block, uint32_t oid)
dbPlacementStatus getPlacementStatus() const
void setMinSpacing(int w)
static void destroy(dbBPin *bpin)
static dbSet< dbBPin >::iterator destroy(dbSet< dbBPin >::iterator &itr)
Delete the bterm from the bterm.
static dbBPin * create(dbBTerm *bterm)
dbBTerm * getBTerm() const
void setEffectiveWidth(int w)
int getEffectiveWidth() const
bool hasEffectiveWidth() const
std::vector< dbAccessPoint * > getAccessPoints() const
void setMark(uint32_t v)
void connect(dbModNet *mod_net)
dbBTerm * getGroundPin() const
static dbBTerm * create(dbNet *net, const char *name)
bool isSetMark() const
dbITerm * getITerm() const
bool isSpecial() const
bool isMirrored() const
void disconnectDbNet()
Disconnect the block-terminal from its db net.
void disconnect()
bool isSetSpefMark() const
dbIoType getIoType() const
void setExtId(uint32_t v)
std::optional< Rect > getConstraintRegion() const
void setConstraintRegion(const Rect &constraint_region)
dbModNet * getModNet() const
Get the mod net of this block-terminal.
dbSigType getSigType() const
static dbSet< dbBTerm >::iterator destroy(dbSet< dbBTerm >::iterator &itr)
Delete the bterm from the block.
bool getFirstPin(dbShape &shape) const
void connect(dbNet *db_net, dbModNet *modnet)
const char * getConstName() const
dbSet< dbBPin > getBPins() const
void setIoType(dbIoType type)
void resetConstraintRegion()
void setSigType(dbSigType type)
bool getFirstPinLocation(int &x, int &y) const
static void destroy(dbBTerm *bterm)
void disconnectDbModNet()
Disconnect the block-terminal from its mod net.
uint32_t staVertexId() const
void staSetVertexId(uint32_t id)
void setGroundPin(dbBTerm *pin)
static dbBTerm * getBTerm(dbBlock *block, uint32_t oid)
dbBTerm * getMirroredBTerm() const
bool rename(const char *name)
uint32_t getExtId() const
void connect(dbNet *net)
void setSpefMark(uint32_t v)
dbPlacementStatus getFirstPinPlacementStatus() const
std::string getName() const
dbNet * getNet() const
void setSpecial()
dbBlock * getBlock() const
dbChipBump * getChipBump() const
void setMirroredBTerm(dbBTerm *mirrored_bterm)
dbBTerm * getSupplyPin() const
Rect getBBox() const
bool hasMirroredBTerm() const
void setSupplyPin(dbBTerm *pin)
dbDft * getDft() const
dbSet< dbRSeg > getRSegs() const
int globalConnect(bool force, bool verbose)
dbSet< dbPowerSwitch > getPowerSwitches() const
dbSet< dbModITerm > getModITerms() const
dbSet< dbMarkerCategory > getMarkerCategories() const
static dbSet< dbBlock >::iterator destroy(dbSet< dbBlock >::iterator &itr)
void clearGlobalConnect()
dbModITerm * findModITerm(const char *hierarchical_name) const
std::string getName() const
void destroyNetWires()
bool designIsRouted(bool verbose) const
dbSet< dbModBTerm > getModBTerms() const
void setDieArea(const Polygon &new_area)
double dbuToMicrons(int dbu) const
void addBTermGroup(const std::vector< dbBTerm * > &bterms, bool order)
void getCcHaloNets(std::vector< dbNet * > &changedNets, std::vector< dbNet * > &ccHaloNets) const
void addBTermConstraintByDirection(dbIoType direction, const Rect &constraint_region)
void setCoreArea(const Rect &new_area)
std::string getExtCornerName(int corner) const
void * getExtmi() const
void setCoreArea(const Polygon &new_area)
dbSet< dbModInst > getModInsts() const
dbSet< dbRow > getRows() const
const std::vector< Rect > & getBlockedRegionsForPins() const
dbRegion * findRegion(const char *name) const
dbModNet * findModNet(const char *hierarchical_name) const
void setExtmi(void *ext)
dbVia * findVia(const char *name) const
void setDefUnits(int units)
dbITerm * findITerm(const char *name) const
Rect getDieArea() const
void setCornerNameList(const char *name_list)
void destroyParasitics(std::vector< dbNet * > &nets)
dbLevelShifter * findLevelShifter(const char *name) const
void setDrivingItermsforNets()
set First driving iterm on all signal nets; set 0 is none exists
dbTrackGrid * findTrackGrid(dbTechLayer *layer) const
dbSet< dbNet > getNets() const
void addBlockedRegionForPins(const Rect &region)
void destroyRSegs(std::vector< dbNet * > &nets)
static void destroy(dbBlock *block)
int getMinLayerForClock() const
dbModule * getTopModule() const
int getMaxLayerForClock() const
void setDieArea(const Rect &new_rect)
void copyExtDb(uint32_t fr, uint32_t to, uint32_t extDbCnt, double resFactor, double ccFactor, double gndcFactor)
void reportGlobalConnect() const
dbSet< dbVia > getVias() const
void writeGuides(const char *filename) const
Polygon getBTermTopLayerGridRegion() const
dbTech * getTech() const
dbModBTerm * findModBTerm(const char *hierarchical_name) const
int micronsToDbu(double microns) const
dbSet< dbGlobalConnect > getGlobalConnects() const
void writeMarkerCategories(std::ofstream &reports)
int getExtCornerIndex(const char *cornerName) const
double dbuToMicrons(unsigned int dbu) const
dbBox * getBBox() const
dbDatabase * getDataBase() const
dbInst * getParentInst() const
void getExtCount(int &numOfNet, int &numOfRSeg, int &numOfCapNode, int &numOfCCSeg) const
dbNet * findNet(const char *name) const
Rect getCoreArea() const
void addBTermsToConstraint(const std::vector< dbBTerm * > &bterms, const Rect &constraint_region)
dbSet< dbTrackGrid > getTrackGrids() const
static dbBlock * create(dbChip *chip, const char *name, char hier_delimiter='/')
dbLogicPort * findLogicPort(const char *name) const
void setMinLayerForClock(int min_layer_for_clock)
dbGroup * findGroup(const char *name) const
dbSet< dbObstruction > getObstructions() const
dbBTerm * findBTerm(const char *name) const
std::string makeNewInstName(dbModInst *parent=nullptr, const char *base_name="inst", const dbNameUniquifyType &uniquify=dbNameUniquifyType::ALWAYS)
void setBusDelimiters(char left, char right)
void writeDb(char *filename, int allNode=0)
int addGlobalConnect(dbRegion *region, const char *instPattern, const char *pinPattern, dbNet *net, bool do_connect)
dbMarkerCategory * findMarkerCategory(const char *name) const
int getDbUnitsPerMicron() const
dbSet< dbLevelShifter > getLevelShifters() const
void getPathSegments(const char *full_name, std::vector< std::string_view > &segments) const
std::vector< dbBTermGroup > getBTermGroups() const
odb::Polygon computeCoreArea() const
void debugPrintContent()
Definition db.h:1481
int getGCellTileSize() const
void writeMarkerCategories(const std::string &file)
std::string makeNewNetName(const dbModule *parent=nullptr, const char *base_name="net", const dbNameUniquifyType &uniquify=dbNameUniquifyType::ALWAYS, dbNet *corresponding_flat_net=nullptr, const dbBTerm *associated_bterm=nullptr)
dbSet< dbBTerm > getBTerms() const
const char * getConstName() const
dbSet< dbCCSeg > getCCSegs() const
void preExttreeMergeRC(double max_cap, uint32_t corner) const
static dbBlock * getBlock(dbBlock *block, uint32_t oid)
dbBlock * getParent() const
int getCornerCount() const
dbInst * findInst(const char *name) const
double dbuToMicrons(double dbu) const
double dbuToMicrons(int64_t dbu) const
dbModule * findModule(const char *name) const
dbSet< dbLogicPort > getLogicPorts() const
int getCornersPerBlock() const
void getBusDelimiters(char &left, char &right) const
void destroyCornerParasitics(std::vector< dbNet * > &nets)
dbBlock * findChild(const char *name) const
void setCornerCount(int cornerCnt, int extDbCnt, const char *name_list)
dbModInst * findModInst(const char *path) const
void setMaxRoutingLayer(int max_routing_layer)
dbIsolation * findIsolation(const char *name) const
void getExtCornerNames(std::list< std::string > &ecl) const
static dbBlock * getBlock(dbChip *chip, uint32_t oid)
void initParasiticsValueTables()
void debugPrintContent(std::ostream &str_db) const
int getDefUnits() const
Polygon getDieAreaPolygon() const
dbSet< dbRegion > getRegions() const
int getExtDbCount() const
dbSet< dbITerm > getITerms() const
char * getCornerNameList() const
dbTechNonDefaultRule * findNonDefaultRule(const char *name) const
void setBTermTopLayerGrid(const dbBTermTopLayerGrid &top_layer_grid)
dbSet< dbModNet > getModNets() const
bool groundCC(float gndFactor)
static dbBlock * create(dbBlock *block, const char *name, char hier_delimiter='/')
void destroyCNs(std::vector< dbNet * > &nets, bool cleanExtid)
int globalConnect(dbGlobalConnect *gc, bool force, bool verbose)
const char * getBaseName(const char *full_name) const
dbSet< dbCapNode > getCapNodes() const
dbSet< dbIsolation > getIsolations() const
dbSet< dbFill > getFills() const
bool adjustCC(float adjFactor, double ccThreshHold, std::vector< dbNet * > &nets, std::vector< dbNet * > &halonets)
dbSet< dbBlockage > getBlockages() const
dbSet< dbGroup > getGroups() const
dbPowerDomain * findPowerDomain(const char *name) const
void destroyRoutes()
dbSet< dbAccessPoint > getAccessPoints() const
char getHierarchyDelimiter() const
void setMinRoutingLayer(int min_routing_layer)
dbBlockSearch * getSearchDb() const
int getMaxRoutingLayer() const
std::optional< dbBTermTopLayerGrid > getBTermTopLayerGrid() const
void adjustRC(double resFactor, double ccFactor, double gndcFactor)
dbSet< dbInst > getInsts() const
dbSet< dbModule > getModules() const
double dbuAreaToMicrons(int64_t dbu_area) const
dbExtControl * getExtControl() const
void setComponentMaskShift(const std::vector< dbTechLayer * > &layers)
void destroyCCs(std::vector< dbNet * > &nets)
Polygon getCoreAreaPolygon() const
int getMinRoutingLayer() const
dbPowerSwitch * findPowerSwitch(const char *name) const
dbChip * getChip() const
dbGCellGrid * getGCellGrid() const
void clearUserInstFlags()
void setCornerCount(int cnt)
dbSet< dbBlock > getChildren() const
void setMaxLayerForClock(int max_layer_for_clock)
void getMasters(std::vector< dbMaster * > &masters) const
void undoAdjustedCC(std::vector< dbNet * > &nets, std::vector< dbNet * > &halonets)
std::vector< dbTechLayer * > getComponentMaskShift() const
Rect findConstraintRegion(const Direction2D &edge, int begin, int end) const
int64_t micronsAreaToDbu(double micronsArea) const
dbSet< dbPowerDomain > getPowerDomains() const
dbSet< dbTechNonDefaultRule > getNonDefaultRules() const
static dbBlockage * create(dbBlock *block, int x1, int y1, int x2, int y2, dbInst *inst=nullptr)
dbBox * getBBox() const
static void destroy(dbBlockage *blockage)
dbInst * getInstance() const
static dbBlockage * create(dbBlock *block, const Rect &rect, dbInst *inst=nullptr)
void setIsSystemReserved(bool is_system_reserved)
bool isSoft() const
float getMaxDensity() const
void setPushedDown()
bool isPushedDown() const
void setMaxDensity(float max_density)
dbBlock * getBlock() const
static dbBlockage * getBlockage(dbBlock *block, uint32_t oid)
bool isSystemReserved() const
static dbSet< dbBlockage >::iterator destroy(dbSet< dbBlockage >::iterator &itr)
void setValue(bool value)
Set the value of this property.
bool getValue() const
Get the value of this property.
static dbBoolProperty * find(dbObject *object, const char *name)
static dbBoolProperty * create(dbObject *object, const char *name, bool value)
static dbBox * getBox(dbBlock *block, uint32_t oid)
static dbBox * create(dbTechVia *via, dbTechLayer *layer, int x1, int y1, int x2, int y2)
Rect getBox() const
int xMin() const
int getMinSpacing() const
int xMax() const
static dbBox * getBox(dbTech *tech, uint32_t oid)
static dbBox * create(dbBPin *bpin, dbTechLayer *layer, const Rect &rect, uint32_t mask=0)
static dbBox * create(dbInst *inst, const Rect &rect)
static dbBox * create(dbMPin *pin, dbTechVia *via, int x, int y)
int yMin() const
int yMax() const
Orientation2D getDir() const
static dbBox * create(dbPolygon *pbox, const Rect &rect)
static dbBox * create(dbTechVia *via, dbTechLayer *layer, const Rect &rect)
static dbBox * getBox(dbMaster *master, uint32_t oid)
static dbBox * create(dbMaster *master, dbTechVia *via, int x, int y)
dbBoxOwner getOwnerType() const
static dbBox * create(dbInst *inst, int x1, int y1, int x2, int y2)
void setMinSpacing(int)
bool isVia() const
static dbBox * create(dbPolygon *pbox, int x1, int y1, int x2, int y2)
void setSoft(bool value)
static dbBox * create(dbMPin *pin, dbTechLayer *layer, int x1, int y1, int x2, int y2)
uint32_t getDX() const
void getViaBoxes(std::vector< dbShape > &shapes) const
void setLayerMask(uint32_t mask)
static dbBox * create(dbVia *via, dbTechLayer *layer, const Rect &rect)
static dbBox * create(dbVia *via, dbTechLayer *layer, int x1, int y1, int x2, int y2)
bool isSoft() const
static dbBox * create(dbRegion *region, const Rect &rect)
dbObject * getBoxOwner() const
dbTechLayer * getTechLayer() const
uint32_t getDY() const
static dbBox * create(dbMPin *pin, dbTechLayer *layer, const Rect &rect)
uint32_t getLayerMask() const
int getDesignRuleWidth() const
Point getViaXY() const
static void destroy(dbBox *box)
static dbBox * create(dbBPin *bpin, dbTechLayer *layer, int x1, int y1, int x2, int y2, uint32_t mask=0)
void setDesignRuleWidth(int)
void getViaLayerBoxes(dbTechLayer *layer, std::vector< dbShape > &shapes) const
static dbBox * create(dbMaster *master, dbTechLayer *layer, int x1, int y1, int x2, int y2)
static dbBox * create(dbRegion *region, int x1, int y1, int x2, int y2)
dbVia * getBlockVia() const
dbTechVia * getTechVia() const
static dbBox * create(dbMaster *master, dbTechLayer *layer, const Rect &rect)
dbModBTerm * getLast() const
dbModBTerm * getPort() const
dbModBTerm * getBusIndexedElement(int index) const
void setMembers(dbModBTerm *members)
dbModule * getParent() const
dbSet< dbModBTerm > getBusPortMembers() const
dbModBTerm * getMembers() const
int getTo() const
int getFrom() const
int getSize() const
bool getUpdown() const
void setLast(dbModBTerm *last)
static dbBusPort * create(dbModule *parentModule, dbModBTerm *port, int from_ix, int to_ix)
void adjustCapacitance(float factor)
static dbSet< dbCCSeg >::iterator destroy(dbSet< dbCCSeg >::iterator &itr)
static dbCCSeg * findCC(dbCapNode *nodeA, dbCapNode *nodeB)
void addCcCapacitance(dbCCSeg *other)
void setMark(bool value)
void getAllCcCap(double *ttcap) const
void accAllCcCap(double *ttcap, double miller_mult) const
dbCapNode * getSourceCapNode() const
uint32_t getTargetNodeNum() const
dbNet * getTargetNet() const
bool checkCapnCC(uint32_t capn) const
static void destroyS(dbCCSeg *seg)
uint32_t getInfileCnt() const
void unLink_cc_seg(dbCapNode *capn)
dbCapNode * getTargetCapNode() const
void setAllCcCap(double *ttcap)
void printCapnCC(uint32_t capn) const
bool isMarked() const
void Link_cc_seg(dbCapNode *capn, uint32_t cseq)
void addCapacitance(double cap, int corner=0)
void incrInfileCnt()
void swapCapnode(dbCapNode *orig, dbCapNode *newn)
dbNet * getSourceNet() const
static void disconnect(dbCCSeg *tcc_)
uint32_t getSourceNodeNum() const
static void connect(dbCCSeg *tcc_)
static dbCCSeg * create(dbCapNode *nodeA, dbCapNode *nodeB, bool mergeParallel=false)
void setCapacitance(double cap, int corner=0)
static void destroy(dbCCSeg *seg)
void adjustCapacitance(float factor, int corner)
dbCapNode * getTheOtherCapn(const dbCapNode *oneCap, uint32_t &cid) const
static dbCCSeg * getCCSeg(dbBlock *block, uint32_t oid)
double getCapacitance(int corner=0) const
dbITerm * getITerm(dbBlock *mblock=nullptr) const
bool isInoutTerm(dbBlock *mblock=nullptr) const
void setSelect(bool value)
void resetBranchFlag()
bool isSelect() const
void printCC() const
void addGndTotalCap(double *gndcap, double *totalcap, double miller_mult)
void resetBTermFlag()
void setForeignFlag()
friend class dbRSeg
Definition db.h:4547
static dbCapNode * create(dbNet *net, uint32_t node, bool foreign)
void resetITermFlag()
bool isDangling() const
void addCapnCapacitance(dbCapNode *other)
bool isInternal() const
void setNameFlag()
void addCapacitance(double cap, int corner=0)
uint32_t getShapeId() const
bool groundCC(float gndFactor)
void setBTermFlag()
void setITermFlag()
bool isBTerm() const
void setSortIndex(uint32_t idx)
void getCapTable(double *cap) const
void resetForeignFlag()
void resetInternalFlag()
dbNet * getNet() const
static dbSet< dbCapNode >::iterator destroy(dbSet< dbCapNode >::iterator &itr)
void adjustCapacitance(float factor, uint32_t corner)
void setInternalFlag()
void accAllCcCap(double *totalcap, double miller_mult) const
uint32_t incrChildrenCnt()
void setNext(uint32_t nextid)
void setCapacitance(double cap, int corner=0)
void getGndTotalCap(double *gndcap, double *totalcap, double miller_mult) const
uint32_t getChildrenCnt() const
bool isSourceTerm(dbBlock *mblock=nullptr) const
bool isBranch() const
void adjustCC(uint32_t adjOrder, float adjFactor, std::vector< dbCCSeg * > &adjustedCC, std::vector< dbNet * > &halonets)
bool needAdjustCC(double ccThreshHold) const
uint32_t getSortIndex() const
void setChildrenCnt(uint32_t cnt)
dbSet< dbCCSeg > getCCSegs() const
static void destroy(dbCapNode *seg, bool destroyCC=true)
void addGndCap(double *gndcap, double *totalcap)
void setNet(uint32_t netid)
bool isForeign() const
static dbCapNode * getCapNode(dbBlock *block, uint32_t oid)
void adjustCapacitance(float factor)
double getCapacitance(uint32_t corner=0) const
void setNode(uint32_t nodeid)
bool checkCC() const
void resetNameFlag()
bool isTreeNode() const
uint32_t getNode() const
bool isITerm() const
void setBranchFlag()
void getGndCap(double *gndcap, double *totalcap) const
bool getTermCoords(int &x, int &y, dbBlock *mblock=nullptr) const
dbBTerm * getBTerm(dbBlock *mblock=nullptr) const
bool isName() const
bool isOptional() const
void setFirstEdgeType(const std::string &first_edge_type)
const std::string & getSecondEdgeType() const
void setExceptAbutted(bool except_abutted)
static void destroy(dbCellEdgeSpacing *)
void setOptional(bool optional)
bool isExceptNonFillerInBetween() const
const std::string & getFirstEdgeType() const
void setExact(bool exact)
void setExceptNonFillerInBetween(bool except_non_filler_in_between)
static dbCellEdgeSpacing * create(dbTech *)
void setSecondEdgeType(const std::string &second_edge_type)
bool isExceptAbutted() const
void setSoft(bool soft)
void setSpacing(int spacing)
dbChipBump * getChipBump() const
dbChipRegionInst * getChipRegionInst() const
void setBTerm(dbBTerm *bterm)
void setNet(dbNet *net)
dbChip * getChip() const
dbBTerm * getBTerm() const
static dbChipBump * create(dbChipRegion *chip_region, dbInst *inst)
dbInst * getInst() const
dbChipRegion * getChipRegion() const
dbNet * getNet() const
dbBTerm * getBTerm() const
static dbChipCapNode * create(dbChipNet *chip_net)
void setChipBumpInst(dbChipBumpInst *chip_bump_inst)
dbChipNet * getChipNet() const
dbChipBumpInst * getChipBumpInst() const
void setCapacitance(float capacitance)
static void destroy(dbChipCapNode *chip_cap_node)
float getCapacitance() const
dbChip * getParentChip() const
void setThickness(int thickness)
dbChipRegionInst * getBottomRegion() const
const std::string & getName() const
std::vector< dbChipInst * > getBottomRegionPath() const
int getThickness() const
dbChipRegionInst * getTopRegion() const
std::vector< dbChipInst * > getTopRegionPath() const
static void destroy(dbChipConn *chipConn)
static dbChipConn * create(const std::string &name, dbChip *parent_chip, const std::vector< dbChipInst * > &top_region_path, dbChipRegionInst *top_region, const std::vector< dbChipInst * > &bottom_region_path, dbChipRegionInst *bottom_region)
Point3D getLoc() const
Cuboid getCuboid() const
static void destroy(dbChipInst *chipInst)
void setOrient(dbOrientType3D orient)
dbChipRegionInst * findChipRegionInst(dbChipRegion *chip_region) const
dbSet< dbChipRegionInst > getRegions() const
Rect getBBox() const
dbChip * getParentChip() const
void setLoc(const Point3D &loc)
dbOrientType3D getOrient() const
dbTransform getTransform() const
dbChipRegionInst * findChipRegionInst(const std::string &name) const
dbChip * getMasterChip() const
static odb::dbChipInst * create(dbChip *parent_chip, dbChip *master_chip, const std::string &name)
const std::string & getName() const
dbChip * getChip() const
static void destroy(dbChipNet *net)
void addBumpInst(dbChipBumpInst *bump_inst, const std::vector< dbChipInst * > &path)
uint32_t getNumBumpInsts() const
dbSet< dbChipCapNode > getChipCapNodes() const
dbChipBumpInst * getBumpInst(uint32_t index, std::vector< dbChipInst * > &path) const
static dbChipNet * create(dbChip *chip, const std::string &name)
const std::string & getName() const
float getTotalCapacitance() const
dbSet< dbChipRSeg > getChipRSegs() const
static dbChipPath * create(dbChip *chip, const char *name)
void addEntry(const std::vector< dbChipInst * > &chip_inst_path, dbChipRegionInst *region, bool negated)
std::vector< Entry > getEntries() const
static void destroy(dbChipPath *path)
dbChip * getChip() const
const char * getName() const
float getResistance() const
static dbChipRSeg * create(dbChipNet *chip_net, dbChipCapNode *source_cap_node, dbChipCapNode *target_cap_node)
void setResistance(float resistance)
dbChipCapNode * getTargetCapNode() const
dbChipCapNode * getSourceCapNode() const
static void destroy(dbChipRSeg *r_seg)
dbChipNet * getChipNet() const
dbChipRegion * getChipRegion() const
dbSet< dbChipBumpInst > getChipBumpInsts() const
Cuboid getCuboid() const
dbChipInst * getChipInst() const
Cuboid getCuboid() const
static dbChipRegion * create(dbChip *chip, const std::string &name, Side side, dbTechLayer *layer)
const std::string & getName() const
dbSet< dbChipBump > getChipBumps() const
Side getSide() const
dbChip * getChip() const
dbTechLayer * getLayer() const
Rect getBox() const
void setBox(const Rect &box)
static dbChip * create(dbDatabase *db, dbTech *tech, const std::string &name="", ChipType type=ChipType::DIE)
void setTsv(bool tsv)
Point getOffset() const
int getThickness() const
dbSet< dbMarkerCategory > getMarkerCategories() const
dbBlock * getBlock() const
int getSealRingNorth() const
dbSet< dbChipPath > getChipPaths() const
void setSealRingSouth(int seal_ring_south)
int getSealRingSouth() const
dbMarkerCategory * findMarkerCategory(const char *name) const
int getSealRingEast() const
bool isTsv() const
int getScribeLineWest() const
void setShrink(float shrink)
void setScribeLineNorth(int scribe_line_north)
float getShrink() const
void setSealRingEast(int seal_ring_east)
void setSealRingNorth(int seal_ring_north)
int getScribeLineNorth() const
void setScribeLineWest(int scribe_line_west)
int getWidth() const
dbChipPath * findChipPath(const char *name) const
dbSet< dbChipCapNode > getChipCapNodes() const
static void destroy(dbChip *chip)
dbChipNet * findChipNet(const std::string &name) const
int getScribeLineSouth() const
void setOffset(const Point &offset)
dbSet< dbChipRegion > getChipRegions() const
Rect getBBox() const
dbSet< dbChipNet > getChipNets() const
void setThickness(int thickness)
void setSealRingWest(int seal_ring_west)
ChipType getChipType() const
dbSet< dbChipInst > getChipInsts() const
void setScribeLineEast(int scribe_line_east)
dbChipRegion * findChipRegion(const std::string &name) const
Cuboid getCuboid() const
dbTech * getTech() const
void setHeight(int height)
int getSealRingWest() const
dbSet< dbChipConn > getChipConns() const
static dbChip * getChip(dbDatabase *db, uint32_t oid)
void setScribeLineSouth(int scribe_line_south)
dbChipInst * findChipInst(const std::string &name) const
const char * getName() const
void setWidth(int width)
dbSet< dbChipRSeg > getChipRSegs() const
int getHeight() const
int getScribeLineEast() const
static bool ecoEmpty(dbBlock *block)
dbUnfoldedChipInst * findUnfoldedChip(const std::string &path) const
dbTech * getTech() const
DEPRECATED.
void setTopChip(dbChip *chip)
void triggerPostReadLef(dbTech *tech, dbLib *library)
dbSet< dbUnfoldedChipBumpInst > getUnfoldedChipBumpInsts() const
dbSet< dbUnfoldedChipConn > getUnfoldedChipConns() const
void report() const
bool hasHierarchy() const
dbLib * findLib(const char *name) const
dbChip * findChip(const char *name) const
dbSet< dbUnfoldedChipInst > getUnfoldedChipInsts() const
static void writeEco(dbBlock *block, const char *filename)
dbMaster * findMaster(const char *name) const
static dbDatabase * create()
uint32_t getNumberOfMasters() const
dbSet< dbAlignmentMarkerRule > getAlignmentMarkerRules() const
static void beginEco(dbBlock *block)
dbSet< dbUnfoldedChipRegionInst > getUnfoldedChipRegionInsts() const
static void endEco(dbBlock *block)
dbSet< dbChipInst > getChipInsts() const
static void commitEco(dbBlock *block)
dbSet< dbChipRegionInst > getChipRegionInsts() const
dbSet< dbProperty > getProperties() const
static void undoEco(dbBlock *block)
int removeUnusedMasters()
void setHierarchy(bool value)
void setDbuPerMicron(uint32_t dbu_per_micron)
dbSet< dbLib > getLibs() const
dbTech * findTech(const char *name) const
dbChip * getChip() const
void constructUnfoldedModel()
uint32_t getDbuPerMicron() const
void read(std::istream &f)
void triggerPostReadDef(dbBlock *block, bool floorplan)
void triggerPostReadDb()
static void readEco(dbBlock *block, const char *filename)
void setLogger(utl::Logger *logger)
dbSet< dbChipNet > getChipNets() const
void removeObserver(dbDatabaseObserver *observer)
dbSet< dbChipConn > getChipConns() const
static bool ecoStackEmpty(dbBlock *block)
void write(std::ostream &file)
static void destroy(dbDatabase *db)
dbSet< dbChip > getChips() const
void addObserver(dbDatabaseObserver *observer)
void triggerPostRead3Dbx(dbChip *chip)
dbSet< dbTech > getTechs() const
dbSet< dbChipBumpInst > getChipBumpInsts() const
dbSet< dbUnfoldedChipNet > getUnfoldedChipNets() const
static dbDatabase * getDatabase(uint32_t oid)
void setScanInserted(bool scan_inserted)
bool isScanInserted() const
void reset()
dbSet< dbScanChain > getScanChains() const
static dbDoubleProperty * create(dbObject *object, const char *name, double value)
static dbDoubleProperty * find(dbObject *object, const char *name)
double getValue() const
Get the value of this property.
void setValue(double value)
Set the value of this property.
uint32_t maskNumber() const
static dbSet< dbFill >::iterator destroy(dbSet< dbFill >::iterator &itr)
static dbFill * create(dbBlock *block, bool needs_opc, uint32_t mask_number, dbTechLayer *layer, int x1, int y1, int x2, int y2)
dbTechLayer * getTechLayer() const
static dbFill * getFill(dbBlock *block, uint32_t oid)
bool needsOPC() const
static dbFill * create(dbBlock *block, bool needs_opc, uint32_t mask_number, dbTechLayer *layer, const Rect &rect)
static void destroy(dbFill *fill)
void getRect(Rect &rect) const
void setCapacity(dbTechLayer *layer, uint32_t x_idx, uint32_t y_idx, float capacity)
dbBlock * getBlock() const
int getNumGridPatternsY() const
void resetCongestionMap()
void getGridPatternX(int i, int &origin_x, int &line_count, int &step) const
static dbGCellGrid * create(dbBlock *block)
void addGridPatternX(int origin_x, int line_count, int step)
void getGridX(std::vector< int > &x_grid) const
uint32_t getYIdx(int y) const
void getGridY(std::vector< int > &y_grid) const
void setUsage(dbTechLayer *layer, uint32_t x_idx, uint32_t y_idx, float use)
dbMatrix< dbGCellGrid::GCellData > getDirectionCongestionMap(const dbTechLayerDir &direction) const
float getCapacity(dbTechLayer *layer, uint32_t x_idx, uint32_t y_idx) const
int getNumGridPatternsX() const
void getGridPatternY(int i, int &origin_y, int &line_count, int &step) const
void addGridPatternY(int origin_y, int line_count, int step)
dbMatrix< dbGCellGrid::GCellData > getLayerCongestionMap(dbTechLayer *layer) const
uint32_t getXIdx(int x) const
static dbGCellGrid * getGCellGrid(dbBlock *block, uint32_t oid)
float getUsage(dbTechLayer *layer, uint32_t x_idx, uint32_t y_idx) const
const std::vector< std::pair< std::int16_t, std::string > > & getPropattr() const
void setOrigin(const Point &origin)
void setNumColumns(int16_t num_columns)
Point getOrigin() const
void setLr(const Point &lr)
void setTransform(dbGDSSTrans transform)
Point getUl() const
dbGDSSTrans getTransform() const
int16_t getNumRows() const
void setNumRows(int16_t num_rows)
void setUl(const Point &ul)
Point getLr() const
static void destroy(dbGDSARef *aref)
int16_t getNumColumns() const
static dbGDSARef * create(dbGDSStructure *parent, dbGDSStructure *child)
void addPropattr(std::int16_t type, const std::string &value)
dbGDSStructure * getStructure() const
void setDatatype(int16_t datatype)
void getXy(std::vector< Point > &tbl) const
static dbGDSBoundary * create(dbGDSStructure *structure)
void setLayer(int16_t layer)
void addPropattr(std::int16_t type, const std::string &value)
const std::vector< std::pair< std::int16_t, std::string > > & getPropattr() const
const std::vector< Point > & getXY() const
static void destroy(dbGDSBoundary *boundary)
void setXy(const std::vector< Point > &xy)
int16_t getDatatype() const
int16_t getLayer() const
Rect getBounds() const
const std::vector< std::pair< std::int16_t, std::string > > & getPropattr() const
int16_t getDatatype() const
static dbGDSBox * create(dbGDSStructure *structure)
void addPropattr(std::int16_t type, const std::string &value)
static void destroy(dbGDSBox *box)
void setBounds(const Rect &bounds)
void setLayer(int16_t layer)
int16_t getLayer() const
void setDatatype(int16_t datatype)
std::pair< double, double > getUnits() const
static dbGDSLib * create(dbDatabase *db, const std::string &name)
void setUnits(double uu_per_dbu, double dbu_per_meter)
void setLibname(std::string libname)
static void destroy(dbGDSLib *lib)
dbSet< dbGDSStructure > getGDSStructures() const
dbGDSStructure * findGDSStructure(const char *name) const
std::string getLibname() const
int getWidth() const
void setWidth(int width)
void setXy(const std::vector< Point > &xy)
void setLayer(int16_t layer)
void addPropattr(std::int16_t type, const std::string &value)
int16_t getPathType() const
void getXy(std::vector< Point > &tbl) const
static dbGDSPath * create(dbGDSStructure *structure)
void setPathType(int16_t path_type)
static void destroy(dbGDSPath *path)
const std::vector< Point > & getXY() const
int16_t getDatatype() const
void setDatatype(int16_t datatype)
const std::vector< std::pair< std::int16_t, std::string > > & getPropattr() const
int16_t getLayer() const
void addPropattr(std::int16_t type, const std::string &value)
void setOrigin(const Point &origin)
void setTransform(dbGDSSTrans transform)
const std::vector< std::pair< std::int16_t, std::string > > & getPropattr() const
dbGDSStructure * getStructure() const
static void destroy(dbGDSSRef *sref)
Point getOrigin() const
static dbGDSSRef * create(dbGDSStructure *parent, dbGDSStructure *child)
dbGDSSTrans getTransform() const
dbSet< dbGDSBoundary > getGDSBoundaries() const
dbGDSLib * getGDSLib() const
dbSet< dbGDSARef > getGDSARefs() const
static void destroy(dbGDSStructure *structure)
static dbGDSStructure * create(dbGDSLib *lib, const char *name)
dbSet< dbGDSBox > getGDSBoxs() const
dbSet< dbGDSPath > getGDSPaths() const
dbSet< dbGDSSRef > getGDSSRefs() const
dbSet< dbGDSText > getGDSTexts() const
const char * getName() const
void setText(const std::string &text)
int16_t getDatatype() const
dbGDSTextPres getPresentation() const
int16_t getLayer() const
static dbGDSText * create(dbGDSStructure *structure)
static void destroy(dbGDSText *text)
const std::vector< std::pair< std::int16_t, std::string > > & getPropattr() const
dbGDSSTrans getTransform() const
void setPresentation(dbGDSTextPres presentation)
const std::string & getText() const
void setLayer(int16_t layer)
void setDatatype(int16_t datatype)
void setOrigin(const Point &origin)
Point getOrigin() const
void setTransform(dbGDSSTrans transform)
void addPropattr(std::int16_t type, const std::string &value)
const std::string & getInstPattern() const
static void destroy(dbGlobalConnect *global_connect)
dbNet * getNet() const
const std::string & getPinPattern() const
dbRegion * getRegion() const
static dbGlobalConnect * create(dbNet *net, dbRegion *region, const std::string &inst_pattern, const std::string &pin_pattern)
std::vector< dbInst * > getInsts() const
int connect(dbInst *inst, bool force)
static dbSet< dbGlobalConnect >::iterator destroy(dbSet< dbGlobalConnect >::iterator &itr)
void addModInst(dbModInst *modinst)
void addGroup(dbGroup *group)
static dbGroup * getGroup(dbBlock *block_, uint32_t dbid_)
const char * getName() const
void setType(dbGroupType type)
dbSet< dbNet > getPowerNets() const
void removeInst(dbInst *inst)
dbRegion * getRegion() const
void addPowerNet(dbNet *net)
dbSet< dbGroup > getGroups() const
void removeGroup(dbGroup *group)
void addInst(dbInst *inst)
static void destroy(dbGroup *group)
dbSet< dbInst > getInsts() const
static dbGroup * create(dbRegion *parent, const char *name)
dbSet< dbNet > getGroundNets() const
dbGroupType getType() const
void removeModInst(dbModInst *modinst)
dbSet< dbModInst > getModInsts() const
static dbGroup * create(dbGroup *parent, const char *name)
void addGroundNet(dbNet *net)
void removeNet(dbNet *net)
static dbGroup * create(dbBlock *block, const char *name)
dbGroup * getParentGroup() const
dbTechLayer * getViaLayer() const
bool isJumper() const
static dbGuide * create(dbNet *net, dbTechLayer *layer, dbTechLayer *via_layer, Rect box, bool is_congested)
void setIsConnectedToTerm(bool is_connected)
void setIsJumper(bool jumper)
static dbGuide * getGuide(dbBlock *block, uint32_t dbid)
dbNet * getNet() const
static dbSet< dbGuide >::iterator destroy(dbSet< dbGuide >::iterator &itr)
dbTechLayer * getLayer() const
static void destroy(dbGuide *guide)
bool isCongested() const
bool isConnectedToTerm() const
Rect getBox() const
uint32_t getExtId() const
dbBlock * getBlock() const
void clearPrefAccessPoints()
void disconnectDbModNet()
dbNet * getNet() const
void clearSpecial()
void clearConnected()
dbModNet * getModNet() const
void setClocked(bool v)
void setSpef(uint32_t v)
bool getAvgXY(int *x, int *y) const
static dbITerm * getITerm(dbBlock *block, uint32_t oid)
dbIoType getIoType() const
bool isSetMark() const
void setConnected()
bool isSpef() const
void setExtId(uint32_t v)
void setMark(uint32_t v)
bool isOutputSignal(bool io=true) const
void staSetVertexId(uint32_t id)
bool isConnected() const
bool isSpecial() const
odb::PtrMap< dbMPin, std::vector< dbAccessPoint * > > getAccessPoints() const
void connect(dbNet *net)
dbBTerm * getBTerm() const
void connect(dbModNet *net)
std::string getName(char separator='/') const
dbSigType getSigType() const
Rect getBBox() const
uint32_t staVertexId() const
dbMTerm * getMTerm() const
bool isInputSignal(bool io=true) const
dbInst * getInst() const
std::vector< dbAccessPoint * > getPrefAccessPoints() const
std::vector< std::pair< dbTechLayer *, Rect > > getGeometries() const
void setAccessPoint(dbMPin *pin, dbAccessPoint *ap)
void setSpecial()
bool isClocked() const
void disconnectDbNet()
void connect(dbNet *db_net, dbModNet *db_mod_net)
void disconnect()
Definition db.h:47
bool resetHierarchy(bool verbose)
static void destroy(dbInst *inst)
bool isFixed()
Definition db.h:2920
dbBox * getBBox() const
int getWeight() const
bool isCore() const
bool bindBlock(dbBlock *block, bool force=false)
static dbInst * getInst(dbBlock *block, uint32_t oid)
dbITerm * getFirstInput() const
const char * getConstName() const
void setHalo(int left, int bottom, int right, int top, bool is_soft)
void setWeight(int weight)
static dbInst * makeUniqueDbInst(dbBlock *block, dbMaster *master, const char *name, bool physical_only=false, dbModule *target_module=nullptr)
dbSet< dbITerm > getITerms() const
void clearUserFlag2()
static dbInst * create(dbBlock *block, dbMaster *master, const char *base_name, const dbNameUniquifyType &uniquify, dbModule *parent_module=nullptr)
bool isNamed(const char *name) const
bool isPhysicalOnly() const
bool isBlock() const
bool swapMaster(dbMaster *master)
dbInst * getParent() const
bool isPlaced()
Definition db.h:2925
bool getEcoDestroy() const
uint32_t getPinAccessIdx() const
bool rename(const char *name)
bool isDoNotTouch() const
static dbSet< dbInst >::iterator destroy(dbSet< dbInst >::iterator &itr)
dbModule * getModule() const
void clearUserFlag1()
void clearUserFlag3()
dbMaster * getMaster() const
Point getLocation() const
void setTransform(const dbTransform &t)
dbPlacementStatus getPlacementStatus() const
bool getEcoCreate() const
dbSet< dbInst > getChildren() const
void getHierTransform(dbTransform &t) const
static dbInst * getValidInst(dbBlock *block, uint32_t oid)
bool getEcoModify() const
void setEcoCreate(bool v)
dbITerm * getFirstOutput() const
void setUserFlag2()
void setOrigin(int x, int y)
void setEcoDestroy(bool v)
void setLocation(int x, int y)
void setSourceType(dbSourceType type)
static dbInst * create(dbBlock *block, dbMaster *master, const char *name, dbRegion *region, bool physical_only=false, dbModule *parent_module=nullptr)
bool getUserFlag1() const
void getConnectivity(std::vector< dbInst * > &neighbors, dbSigType::Value value=dbSigType::SIGNAL) const
Point getOrigin() const
dbScanInst * getScanInst() const
dbOrientType getOrient() const
bool isHierarchical() const
static dbInst * create(dbBlock *block, dbMaster *master, const char *name, bool physical_only=false, dbModule *parent_module=nullptr)
bool isPad() const
dbBox * getHalo() const
dbITerm * findITerm(const char *terminal_name) const
void setLocationOrient(dbOrientType orient)
dbITerm * getITerm(uint32_t mterm_order_id) const
void getLocation(int &x, int &y) const
dbITerm * getITerm(dbMTerm *mterm) const
dbBlock * getBlock() const
void setUserFlag3()
dbSourceType getSourceType() const
bool getUserFlag3() const
dbGroup * getGroup() const
static dbInst * create(dbBlock *top_block, dbBlock *child_block, const char *name)
bool getUserFlag2() const
void setOrient(dbOrientType orient)
void unbindBlock()
void setUserFlag1()
dbBlock * getChild() const
void setPlacementStatus(dbPlacementStatus status)
dbRegion * getRegion() const
std::string getName() const
void setEcoModify(bool v)
dbTransform getTransform() const
Rect getTransformedHalo() const
void setDoNotTouch(bool v)
bool isEndCap() const
void setPinAccessIdx(uint32_t idx)
dbChipBump * getChipBump() const
static dbIntProperty * find(dbObject *object, const char *name)
static dbIntProperty * create(dbObject *object, const char *name, int value)
void setValue(int value)
Set the value of this property.
int getValue() const
Get the value of this property.
const std::string & getLocation() const
const std::string & getClampValue() const
void setClampValue(const std::string &clamp_value)
void setPowerDomain(dbPowerDomain *power_domain)
void setIsolationSense(const std::string &isolation_sense)
const std::string & getIsolationSense() const
void addIsolationCell(const std::string &master)
const char * getName() const
void setIsolationSignal(const std::string &isolation_signal)
void setLocation(const std::string &location)
static void destroy(dbIsolation *iso)
dbPowerDomain * getPowerDomain() const
const std::string & getIsolationSignal() const
void setAppliesTo(const std::string &applies_to)
static dbIsolation * create(dbBlock *block, const char *name)
std::vector< dbMaster * > getIsolationCells() const
const std::string & getAppliesTo() const
bool appliesTo(const dbIoType &io) const
void setUseFunctionalEquivalence(bool use_functional_equivalence)
void setCellOutput(const std::string &cell_output)
void setForceShift(bool force_shift)
const std::string & getSource() const
void setInputSupply(const std::string &input_supply)
const std::string & getCellInput() const
const std::string & getRule() const
void setNameSuffix(const std::string &name_suffix)
bool isForceShift() const
float getThreshold() const
void setLocation(const std::string &location)
const std::string & getOutputSupply() const
const std::string & getCellOutput() const
void setAppliesTo(const std::string &applies_to)
static void destroy(dbLevelShifter *shifter)
void setOutputSupply(const std::string &output_supply)
dbPowerDomain * getDomain() const
void addElement(const std::string &element)
const char * getName() const
const std::string & getAppliesTo() const
void setCellInput(const std::string &cell_input)
const std::string & getNamePrefix() const
bool isNoShift() const
void setSource(const std::string &source)
void setNamePrefix(const std::string &name_prefix)
const std::string & getSink() const
const std::string & getInputSupply() const
const std::string & getAppliesToBoundary() const
const std::string & getNameSuffix() const
void setSink(const std::string &sink)
void addInstance(const std::string &instance, const std::string &port)
void setThreshold(float threshold)
bool isUseFunctionalEquivalence() const
void addExcludeElement(const std::string &element)
void setCellName(const std::string &cell_name)
void setAppliesToBoundary(const std::string &applies_to_boundary)
const std::string & getCellName() const
const std::string & getLocation() const
static dbLevelShifter * create(dbBlock *block, const char *name, dbPowerDomain *domain)
void setNoShift(bool no_shift)
const std::string & getInternalSupply() const
std::vector< std::string > getElements() const
void setRule(const std::string &rule)
void setInternalSupply(const std::string &internal_supply)
std::vector< std::string > getExcludeElements() const
std::vector< std::pair< std::string, std::string > > getInstances() const
void getBusDelimiters(char &left, char &right) const
std::string getName() const
dbSite * findSite(const char *name) const
dbSet< dbMaster > getMasters() const
dbSet< dbSite > getSites() const
void setBusDelimiters(char left, char right)
dbMaster * findMaster(const char *name) const
const char * getConstName() const
void setLefUnits(int units)
int getLefUnits() const
static dbLib * getLib(dbDatabase *db, uint32_t oid)
dbTech * getTech() const
char getHierarchyDelimiter() const
static void destroy(dbLib *lib)
int getDbUnitsPerMicron() const
static dbLib * create(dbDatabase *db, const char *name, dbTech *tech, char hierarchy_delimiter='/')
static dbLogicPort * create(dbBlock *block, const char *name, const std::string &direction)
const std::string & getDirection() const
static void destroy(dbLogicPort *lp)
const char * getName() const
std::vector< std::vector< odb::dbAccessPoint * > > getPinAccess() const
dbSet< dbBox > getGeometry(bool include_decomposed_polygons=true) const
dbMTerm * getMTerm() const
dbMaster * getMaster() const
static dbMPin * create(dbMTerm *mterm)
dbSet< dbPolygon > getPolygonGeometry() const
static dbMPin * getMPin(dbMaster *master, uint32_t oid)
void clearPinAccess(int pin_access_idx)
Rect getBBox() const
std::string getName() const
static dbMTerm * getMTerm(dbMaster *master, uint32_t oid)
void getDiffArea(std::vector< std::pair< double, dbTechLayer * > > &data) const
Rect getBBox() const
dbSigType getSigType() const
static dbMTerm * create(dbMaster *master, const char *name, dbIoType io_type=dbIoType(), dbSigType sig_type=dbSigType(), dbMTermShapeType shape_type=dbMTermShapeType())
dbTechAntennaPinModel * createOxide2AntennaModel()
dbTechAntennaPinModel * getDefaultAntennaModel() const
void getPartialMetalSideArea(std::vector< std::pair< double, dbTechLayer * > > &data) const
void staSetPort(void *port)
bool isMustJoinAllPorts() const
void addPartialMetalAreaEntry(double inval, dbTechLayer *refly=nullptr)
void getPartialMetalArea(std::vector< std::pair< double, dbTechLayer * > > &data) const
dbTechAntennaPinModel * getOxide2AntennaModel() const
dbMTermShapeType getShape() const
bool hasOxide2AntennaModel() const
int getIndex() const
void addDiffAreaEntry(double inval, dbTechLayer *refly=nullptr)
void getPartialCutArea(std::vector< std::pair< double, dbTechLayer * > > &data) const
char * getName(dbBlock *block, dbMaster *master, char *ttname) const
dbSet< dbMPin > getMPins() const
void * staPort() const
bool hasDefaultAntennaModel() const
void setMustJoinAllPorts(bool v)
dbTechAntennaPinModel * createDefaultAntennaModel()
void setSigType(dbSigType type)
const char * getConstName() const
char * getName(dbInst *inst, char *ttname) const
dbMaster * getMaster() const
void setMark(uint32_t v)
void addPartialCutAreaEntry(double inval, dbTechLayer *refly=nullptr)
dbIoType getIoType() const
bool isSetMark() const
void addPartialMetalSideAreaEntry(double inval, dbTechLayer *refly=nullptr)
void setDescription(const std::string &description)
dbObject * getParent() const
static dbMarkerCategory * createOrGet(dbMarkerCategory *category, const char *name)
void writeJSON(std::ofstream &report) const
void writeTR(std::ofstream &report) const
dbSet< dbMarkerCategory > getMarkerCategories() const
int getMaxMarkers() const
const char * getName() const
void setSource(const std::string &source)
const std::string & getDescription() const
bool rename(const char *name)
static void destroy(dbMarkerCategory *category)
static dbMarkerCategory * createOrGet(dbChip *chip, const char *name)
void writeJSON(const std::string &path) const
dbMarkerCategory * getTopCategory() const
static dbMarkerCategory * createOrReplace(dbMarkerCategory *category, const char *name)
odb::PtrSet< dbMarker > getAllMarkers() const
static dbMarkerCategory * create(dbBlock *block, const char *name)
static dbMarkerCategory * createOrReplace(dbChip *chip, const char *name)
dbSet< dbMarker > getMarkers() const
static dbMarkerCategory * create(dbMarkerCategory *category, const char *name)
static dbMarkerCategory * create(dbChip *chip, const char *name)
int getMarkerCount() const
static odb::PtrSet< dbMarkerCategory > fromJSON(dbChip *chip, const char *source, std::ifstream &report)
void setMaxMarkers(int max_markers)
static dbMarkerCategory * createOrReplace(dbBlock *block, const char *name)
static dbMarkerCategory * createOrGet(dbBlock *block, const char *name)
std::string getSource() const
static dbMarkerCategory * fromTR(dbChip *chip, const char *name, const std::string &path)
dbMarkerCategory * findMarkerCategory(const char *name) const
static odb::PtrSet< dbMarkerCategory > fromJSON(dbChip *chip, const std::string &path)
void writeTR(const std::string &path) const
static dbMarkerCategory * fromTR(dbChip *chip, const char *name, const char *source, std::ifstream &report)
dbMarkerCategory * getCategory() const
Rect getBBox() const
bool isVisited() const
void setLineNumber(int line_number)
bool isWaived() const
std::vector< MarkerShape > getShapes() const
std::string getName() const
dbTechLayer * getTechLayer() const
int getLineNumber() const
void addShape(const Point &pt)
odb::PtrSet< dbObject > getSources() const
void setWaived(bool waived)
void addShape(const Rect &rect)
bool addObstructionFromBlock(dbBlock *block)
void setTechLayer(dbTechLayer *layer)
const std::string & getComment() const
void setComment(const std::string &comment)
std::variant< Point, Line, Rect, Polygon, Cuboid > MarkerShape
Definition db.h:8607
bool isVisible() const
static dbMarker * create(dbMarkerCategory *category)
void addShape(const Polygon &polygon)
void setVisible(bool visible)
void addSource(dbObject *obj)
void setVisited(bool visited)
void addShape(const Line &line)
void addShape(const Cuboid &cuboid)
static void destroy(dbMarker *marker)
int getRangeBegin() const
static dbMasterEdgeType * create(dbMaster *master)
void setRangeBegin(int range_begin)
static void destroy(dbMasterEdgeType *edge_type)
const std::string & getEdgeType() const
void setHalfRow(int half_row)
void setCellRow(int cell_row)
int getRangeEnd() const
int getHalfRow() const
void setRangeEnd(int range_end)
dbMasterEdgeType::EdgeDir getEdgeDir() const
void setEdgeDir(dbMasterEdgeType::EdgeDir edge_dir)
void setEdgeType(const std::string &edge_type)
int getCellRow() const
void clearPinAccess(int pin_access_idx)
void transform(dbTransform &t)
bool isEndCap() const
Definition db.h:5568
static void destroy(dbMaster *master)
dbMTerm * findMTerm(dbBlock *block, const char *name) const
static dbMaster * create(dbLib *lib, const char *name)
bool isSpecialPower() const
Point getOrigin() const
dbSet< dbPolygon > getPolygonObstructions() const
dbLib * getLib() const
void setOrigin(int x, int y)
void setWidth(uint32_t width)
void setSite(dbSite *site)
bool getSymmetryR90() const
void setSequential(bool v)
dbSite * getSite() const
bool getSymmetryX() const
void setSymmetryX()
uint32_t getWidth() const
uint32_t isMarked() const
void getPlacementBoundary(Rect &r) const
dbSet< dbMTerm > getMTerms() const
dbMaster * getEEQ() const
bool getSymmetryY() const
dbMasterType getType() const
uint32_t getHeight() const
dbMTerm * findMTerm(const char *name) const
void setFrozen()
void setType(dbMasterType type)
const char * getConstName() const
int getMasterId() const
bool isFrozen() const
void staSetCell(void *cell)
std::string getName() const
bool isCover() const
Definition db.h:5573
void setSymmetryR90()
void * staCell() const
dbMaster * getLEQ() const
void setSymmetryY()
bool isCore() const
Definition db.h:5558
bool isCoreAutoPlaceable() const
int64_t getArea() const
dbSet< dbBox > getObstructions(bool include_decomposed_polygons=true) const
bool isBacksideBridge() const
dbSet< dbMasterEdgeType > getEdgeTypes() const
bool isBlock() const
Definition db.h:5553
bool isFiller() const
void setBacksideBridge(bool is_bridge)
bool isPad() const
Definition db.h:5563
static dbMaster * getMaster(dbLib *lib, uint32_t oid)
void setMark(uint32_t mark)
void setHeight(uint32_t height)
void setLEQ(dbMaster *master)
void setSpecialPower(bool v)
void setEEQ(dbMaster *master)
bool isSequential() const
int getMTermCount() const
void setCutLayer(dbTechLayer *cut_layer)
static void destroy(dbMetalWidthViaMap *via_map)
int getBelowLayerWidthHigh() const
void setBelowLayerWidthLow(int below_layer_width_low)
int getAboveLayerWidthLow() const
static dbMetalWidthViaMap * getMetalWidthViaMap(dbTech *tech, uint32_t dbid)
void setPgVia(bool pg_via)
static dbMetalWidthViaMap * create(dbTech *tech)
int getAboveLayerWidthHigh() const
void setAboveLayerWidthLow(int above_layer_width_low)
const std::string & getViaName() const
int getBelowLayerWidthLow() const
void setAboveLayerWidthHigh(int above_layer_width_high)
bool isViaCutClass() const
void setViaCutClass(bool via_cut_class)
dbTechLayer * getCutLayer() const
void setViaName(const std::string &via_name)
void setBelowLayerWidthHigh(int below_layer_width_high)
void setSigType(const dbSigType &type)
const char * getName() const
dbModInst * getModInst() const
dbIoType getIoType() const
void setParentModITerm(dbModITerm *parent_pin)
void setModNet(dbModNet *modNet)
static dbSet< dbModBTerm >::iterator destroy(dbSet< dbModBTerm >::iterator &itr)
dbBusPort * getBusPort() const
static dbModBTerm * getModBTerm(dbBlock *block, uint32_t dbid)
static dbModBTerm * create(dbModule *parentModule, const char *name)
void connect(dbModNet *net)
dbModNet * getModNet() const
static void destroy(dbModBTerm *)
dbSigType getSigType() const
dbModITerm * getParentModITerm() const
void setIoType(const dbIoType &type)
void setBusPort(dbBusPort *)
bool isBusPort() const
std::string getHierarchicalName() const
dbModule * getParent() const
static dbSet< dbModITerm >::iterator destroy(dbSet< dbModITerm >::iterator &itr)
static dbModITerm * getModITerm(dbBlock *block, uint32_t dbid)
static void destroy(dbModITerm *)
dbModBTerm * getChildModBTerm() const
void connect(dbModNet *modnet)
std::string getHierarchicalName() const
static dbModITerm * create(dbModInst *parentInstance, const char *name, dbModBTerm *modbterm=nullptr)
void setModNet(dbModNet *modNet)
const char * getName() const
dbModNet * getModNet() const
dbModInst * getParent() const
void setChildModBTerm(dbModBTerm *child_port)
dbNet * findFlatNet(const char *base_name) const
dbSet< dbModITerm > getModITerms() const
bool containsDbModInst(dbModInst *mod_inst) const
const char * getName() const
dbModule * getParent() const
void removeUnusedPortsAndPins()
dbModInst * swapMaster(dbModule *module)
static void destroy(dbModInst *modinst)
static dbSet< dbModInst >::iterator destroy(dbSet< dbModInst >::iterator &itr)
static dbModInst * create(dbModule *parentModule, dbModule *masterModule, const char *name)
dbGroup * getGroup() const
dbModITerm * findModITerm(const char *name) const
dbModNet * findHierNet(const char *base_name) const
bool containsDbInst(dbInst *inst) const
static dbModInst * getModInst(dbBlock *block_, uint32_t dbid_)
bool findNet(const char *base_name, dbNet *&flat_net, dbModNet *&hier_net) const
std::string getHierarchicalName() const
dbModule * getMaster() const
void rename(const char *new_name)
dbModNet * findInHierarchy(const std::function< bool(dbModNet *)> &condition, dbHierSearchDir dir) const
dbNet * findRelatedNet() const
std::string getName() const
void mergeModNet(dbModNet *in_modnet)
static dbModNet * create(dbModule *parent_module, const char *base_name)
void disconnectAllTerms()
void connectTermsOf(dbNet *in_net)
static dbSet< dbModNet >::iterator destroy(dbSet< dbModNet >::iterator &itr)
std::vector< dbModNet * > getNextModNetsInFanout() const
unsigned connectionCount() const
void dump() const
static dbModNet * create(dbModule *parent_module, const char *base_name, const dbNameUniquifyType &uniquify, dbNet *corresponding_flat_net=nullptr)
bool isConnectedToOutputPort() const
dbSet< dbITerm > getITerms() const
static void destroy(dbModNet *)
std::vector< dbModNet * > getNextModNetsInFanin() const
dbSet< dbModITerm > getModITerms() const
static dbModNet * getModNet(dbBlock *block, uint32_t id)
void checkSanityNameCollision() const
bool isConnected(const dbModNet *other) const
dbSet< dbBTerm > getBTerms() const
dbModule * getParent() const
void checkSanity() const
bool isConnectedToInputPort() const
std::string getHierarchicalName() const
bool isConnected(const dbNet *other) const
dbSet< dbModBTerm > getModBTerms() const
dbModNet * getFirstParentModNet() const
const char * getConstName() const
dbSet< dbModInst > getChildren() const
dbSet< dbInst > getInsts() const
bool isTop() const
bool containsDbInst(dbInst *inst) const
dbSet< dbModNet > getModNets() const
dbSet< dbModBTerm > getPorts() const
dbModNet * getModNet(const char *net_name) const
dbBlock * getOwner() const
bool containsDbModInst(dbModInst *inst) const
std::string getHierarchicalName() const
dbInst * findDbInst(const char *name) const
int getModInstCount() const
dbModule * getParentModule() const
const dbModBTerm * getHeadDbModBTerm() const
dbSet< dbModBTerm > getModBTerms() const
const char * getName() const
static dbModule * getModule(dbBlock *block_, uint32_t dbid_)
bool canSwapWith(dbModule *new_module) const
std::vector< dbInst * > getLeafInsts() const
dbModBTerm * getModBTerm(uint32_t id) const
static dbModule * makeUniqueDbModule(const char *cell_name, const char *inst_name, dbBlock *block)
void setModInst(dbModInst *mod_inst)
dbSet< dbModInst > getModInsts() const
int getDbInstCount() const
void addInst(dbInst *inst)
dbModBTerm * findModBTerm(const char *name) const
static dbModule * create(dbBlock *block, const char *name)
dbModInst * findModInst(const char *name) const
static void destroy(dbModule *module)
dbModInst * getModInst() const
static dbNetTrack * create(dbNet *net, dbTechLayer *layer, Rect box)
dbTechLayer * getLayer() const
static void destroy(dbNetTrack *guide)
static dbSet< dbNetTrack >::iterator destroy(dbSet< dbNetTrack >::iterator &itr)
static dbNetTrack * getNetTrack(dbBlock *block, uint32_t dbid)
dbNet * getNet() const
Rect getBox() const
dbInst * insertBufferBeforeLoads(const std::vector< dbObject * > &load_pins, const dbMaster *buffer_master, const Point *loc=nullptr, const char *new_buf_base_name=kDefaultBufBaseName, const char *new_net_base_name=kDefaultNetBaseName, const dbNameUniquifyType &uniquify=dbNameUniquifyType::ALWAYS, bool loads_on_diff_nets=false)
dbInst * insertBufferAfterDriver(dbObject *drvr_output_term, const dbMaster *buffer_master, const Point *loc=nullptr, const char *new_buf_base_name=kDefaultBufBaseName, const char *new_net_base_name=kDefaultNetBaseName, const dbNameUniquifyType &uniquify=dbNameUniquifyType::ALWAYS)
void collapseInternalCapNum(FILE *cap_node_map)
void getCouplingNets(uint32_t corner, double ccThreshold, odb::PtrSet< dbNet > &cnets) const
bool findRelatedModNets(odb::PtrSet< dbModNet > &modnet_set) const
void setExtracted(bool value)
uint32_t getITermCount() const
bool isMark_1ed() const
bool isSpef() const
dbObject * getFirstDriverTerm() const
void setJumpers(bool has_jumpers)
bool isIO() const
returns true if there are BTerms on net
bool isConnected(const dbModNet *other) const
void setFixedBump(bool value)
uint32_t get1stCapNodeId() const
void setSourceType(dbSourceType type)
void addDbCc(float cap)
void reverseCCSegs()
dbITerm * getDrivingITerm() const
bool canMergeNet(dbNet *in_net) const
const char * getConstName() const
bool rename(const char *name)
uint32_t getBTermCount() const
void preExttreeMergeRC(double max_cap, uint32_t corner) const
uint32_t getTermCount() const
void setRCDisconnected(bool value)
dbSet< dbRSeg > getRSegs() const
dbSet< dbGuide > getGuides() const
void renameWithModNetInHighestHier()
void clearWildConnected()
void mergeNet(dbNet *in_net)
bool isEnclosed(Rect *bbox)
dbSet< dbNetTrack > getTracks() const
void setDoNotTouch(bool v)
dbInst * insertBufferBeforeLoads(const odb::PtrSet< dbObject > &load_pins, const dbMaster *buffer_master, const Point *loc=nullptr, const char *new_buf_base_name=kDefaultBufBaseName, const char *new_net_base_name=kDefaultNetBaseName, const dbNameUniquifyType &uniquify=dbNameUniquifyType::ALWAYS, bool loads_on_diff_nets=false)
dbWire * getWire() const
bool isWildConnected() const
float getGndcCalibFactor() const
dbWireType getWireType() const
dbITerm * getFirstOutput() const
void destroySWires()
void getSignalWireCount(uint32_t &wireCnt, uint32_t &viaCnt) const
Rect getTermBBox() const
void setCcMatchRatio(float ratio)
dbSet< dbSWire > getSWires() const
float getDbCc() const
void calibrateCouplingCap(int corner)
void setGndcCalibFactor(float gndcCalib)
dbInst * insertBufferBeforeLoad(dbObject *load_input_term, const dbMaster *buffer_master, const Point *loc=nullptr, const char *new_buf_base_name=kDefaultBufBaseName, const char *new_net_base_name=kDefaultNetBaseName, const dbNameUniquifyType &uniquify=dbNameUniquifyType::ALWAYS)
dbSourceType getSourceType() const
void setWildConnected()
void setCcAdjustOrder(uint32_t order)
dbSet< dbCapNode > getCapNodes() const
bool isSelect() const
int getXTalkClass() const
dbSet< dbBTerm > getBTerms() const
void adjustNetRes(float factor, uint32_t corner)
bool isDoNotTouch() const
void setSelect(bool value)
void set1stCapNodeId(uint32_t capn_id)
float getCcAdjustFactor() const
bool isRCgraph() const
static void destroy(dbNet *net)
void destroyCapNodes(bool cleanExtid)
bool isConnectedByAbutment() const
static dbNet * create(dbBlock *block, const char *base_name, const dbNameUniquifyType &uniquify, dbModule *parent_module=nullptr)
void setDbCc(float cap)
uint32_t getRSegCount() const
dbRSeg * getZeroRSeg() const
void adjustNetRes(float factor)
dbTechNonDefaultRule * getNonDefaultRule() const
dbCapNode * findCapNode(uint32_t nodeId) const
void setAutoTaper(bool enable=true)
bool hasJumpers() const
dbModNet * findModNetInHighestHier() const
double getTotalCapacitance(uint32_t corner=0, bool cc=false) const
void destroyRSegs()
bool isExtracted() const
bool isInternalTo(const dbModule *module) const
void setWireType(dbWireType wire_type)
void setSpecial()
void destroyParasitics()
void clearGuides()
void setTermExtIds(int capId)
void clearTracks()
bool groundCC(float gndFactor)
void setWeight(int weight)
dbSWire * getFirstSWire() const
static dbNet * create(dbBlock *block, const char *name, bool skipExistingCheck=false)
uint32_t get1stRSegId() const
void setNonDefaultRule(dbTechNonDefaultRule *rule)
dbSet< dbITerm > getITerms() const
void setSigType(dbSigType sig_type)
uint32_t getCcAdjustOrder() const
dbModInst * findMainParentModInst() const
void getPowerWireCount(uint32_t &wireCnt, uint32_t &viaCnt) const
void checkSanityModNetConsistency() const
static dbSet< dbNet >::iterator destroy(dbSet< dbNet >::iterator &itr)
void setCcAdjustFactor(float factor)
bool isConnected(const dbNet *other) const
void getSrcCCSegs(std::vector< dbCCSeg * > &segs) const
void setCcCalibFactor(float ccCalib)
void dump(bool show_modnets=false) const
void calibrateGndCap()
void setSpef(bool value)
void checkSanityNameCollision() const
float getRefCc() const
dbRSeg * findRSeg(uint32_t srcn, uint32_t tgtn) const
static dbNet * getValidNet(dbBlock *block, uint32_t oid)
uint32_t maxInternalCapNum() const
void printNetName(FILE *fp, bool idFlag=true, bool newLine=true) const
dbSigType getSigType() const
static void markNets(std::vector< dbNet * > &nets, dbBlock *block, bool mk)
void calibrateCapacitance()
void getTgtCCSegs(std::vector< dbCCSeg * > &segs) const
float getCcCalibFactor() const
void undoAdjustedCC(std::vector< dbCCSeg * > &adjustedCC, std::vector< dbNet * > &halonets)
bool isAutoTaperEnabled() const
void setMark_1(bool value)
void getNetStats(uint32_t &wireCnt, uint32_t &viaCnt, uint32_t &len, uint32_t &layerCnt, uint32_t *levelTable) const
dbITerm * get1stITerm() const
bool needsSignalRouting() const
bool isRCDisconnected() const
void adjustNetGndCap(uint32_t corner, float factor)
void dumpConnectivity(int level=1) const
uint32_t getCcCount() const
void setRefCc(float cap)
void swapNetNames(dbNet *source, bool journal=true)
Swaps the current db net name with the source db net.
dbInst * getFirstDriverInst() const
bool adjustCC(uint32_t adjOrder, float adjFactor, double ccThreshHold, std::vector< dbCCSeg * > &adjustedCC, std::vector< dbNet * > &halonets)
void adjustNetGndCap(float factor)
static dbNet * getNet(dbBlock *block, uint32_t oid)
void setXTalkClass(int value)
void setDrivingITerm(const dbITerm *iterm)
float getCcMatchRatio() const
bool isDeeperThan(const dbNet *net) const
uint32_t getCapNodeCount() const
dbITerm * get1stSignalInput(bool io) const
void destroyCCSegs()
dbBTerm * get1stBTerm() const
bool hasFixedBump() const
void reverseRSegs()
dbBlock * getBlock() const
void getWireCount(uint32_t &wireCnt, uint32_t &viaCnt) const
void hierarchicalConnect(dbObject *driver, dbObject *load)
double getTotalCouplingCap(uint32_t corner=0) const
void setRCgraph(bool value)
double getTotalResistance(uint32_t corner=0) const
dbModule * findMainParentModule() const
std::string getName() const
bool isMarked() const
void checkSanity() const
void clearSpecial()
void set1stRSegId(uint32_t rseg_id)
int getWeight() const
void calibrateCouplingCap()
void getGndTotalCap(double *gndcap, double *totalcap, double miller_mult) const
bool isSpecial() const
dbWire * getGlobalWire() const
void setMark(bool value)
dbInst * getInstance() const
bool isFillObstruction() const
void setMinSpacing(int w)
dbBlock * getBlock() const
int getMinSpacing() const
static void destroy(dbObstruction *obstruction)
void setIsSystemReserved(bool is_system_reserved)
void setEffectiveWidth(int w)
bool hasEffectiveWidth() const
bool isSystemReserved() const
bool isPushedDown() const
void setExceptPGNetsObstruction()
static dbSet< dbObstruction >::iterator destroy(dbSet< dbObstruction >::iterator &itr)
static dbObstruction * getObstruction(dbBlock *block, uint32_t oid)
bool hasMinSpacing() const
dbBox * getBBox() const
bool isSlotObstruction() const
static dbObstruction * create(dbBlock *block, dbTechLayer *layer, const Rect &rect, dbInst *inst=nullptr)
bool isExceptPGNetsObstruction() const
int getEffectiveWidth() const
static dbObstruction * create(dbBlock *block, dbTechLayer *layer, int x1, int y1, int x2, int y2, dbInst *inst=nullptr)
static dbPolygon * create(dbMaster *master, dbTechLayer *layer, const std::vector< Point > &polygon)
void setDesignRuleWidth(int design_rule_width)
int getDesignRuleWidth() const
static dbPolygon * create(dbMPin *pin, dbTechLayer *layer, const std::vector< Point > &polygon)
const Polygon & getPolygon() const
dbTechLayer * getTechLayer() const
dbSet< dbBox > getGeometry() const
void setMinSpacing(int min_spacing)
int getMinSpacing() const
void setParent(dbPowerDomain *parent)
static dbPowerDomain * create(dbBlock *block, const char *name)
void addIsolation(dbIsolation *iso)
dbPowerDomain * getParent() const
void setArea(const Rect &area)
void setTop(bool top)
std::vector< dbPowerSwitch * > getPowerSwitches() const
std::vector< dbIsolation * > getIsolations() const
std::vector< std::string > getElements() const
const char * getName() const
static void destroy(dbPowerDomain *pd)
bool isTop() const
void setGroup(dbGroup *group)
void addPowerSwitch(dbPowerSwitch *ps)
void setVoltage(float voltage)
bool getArea(Rect &area) const
float getVoltage() const
void addElement(const std::string &element)
void addLevelShifter(dbLevelShifter *shifter)
std::vector< dbLevelShifter * > getLevelShifters() const
dbGroup * getGroup() const
void addAcknowledgePort(const std::string &port_name, const std::string &net_name, const std::string &boolean_expression)
UPFIOSupplyPort getOutputSupplyPort() const
std::vector< UPFControlPort > getControlPorts() const
std::vector< UPFAcknowledgePort > getAcknowledgePorts() const
dbMaster * getLibCell() const
void addOnState(const std::string &on_state, const std::string &port_name, const std::string &boolean_expression)
void addInSupplyPort(const std::string &in_port, const std::string &net)
static dbPowerSwitch * create(dbBlock *block, const char *name)
const char * getName() const
std::vector< UPFIOSupplyPort > getInputSupplyPorts() const
void setLibCell(dbMaster *master)
static void destroy(dbPowerSwitch *ps)
void addControlPort(const std::string &control_port, const std::string &control_net)
std::map< std::string, dbMTerm * > getPortMap() const
void setOutSupplyPort(const std::string &out_port, const std::string &net)
void addPortMap(const std::string &model_port, dbMTerm *mterm)
void addPortMap(const std::string &model_port, const std::string &switch_port)
dbPowerDomain * getPowerDomain() const
void setPowerDomain(dbPowerDomain *power_domain)
std::vector< UPFOnState > getOnStates() const
static std::string writePropValue(dbProperty *prop)
dbObject * getPropOwner() const
Get the owner of this property.
static dbProperty * find(dbObject *object, const char *name, Type type)
static dbSet< dbProperty > getProperties(dbObject *object)
std::string getName() const
Get thetname of this property.
Type getType() const
Get the type of this property.
static std::string writeProperties(dbObject *object)
static void destroyProperties(dbObject *obj)
Destroy all properties of the specific object.
static void destroy(dbProperty *prop)
Destroy a specific property.
static dbProperty * find(dbObject *object, const char *name)
Find the named property. Returns nullptr if the property does not exist.
static dbSet< dbProperty >::iterator destroy(dbSet< dbProperty >::iterator itr)
void getGndCap(double *gndcap, double *totalcap) const
uint32_t getTargetNode() const
static dbRSeg * getRSeg(dbBlock *block, uint32_t oid)
void setCoords(int x, int y)
uint32_t getLengthWidth(uint32_t &w) const
void setSourceNode(uint32_t nodeid)
void setTargetNode(uint32_t nodeid)
void setCapacitance(double cap, int corner=0)
void adjustCapacitance(float factor)
dbCapNode * getSourceCapNode() const
void addRSegCapacitance(dbRSeg *other)
uint32_t getShapeId() const
void adjustResistance(float factor, int corner)
static dbRSeg * create(dbNet *net, int x, int y, uint32_t path_dir, bool allocate_cap)
dbNet * getNet() const
void getCapTable(double *cap) const
void addAllRes(double *res)
void printCcSegs() const
void getGndTotalCap(double *gndcap, double *totalcap, double miller_mult) const
void getCcSegs(std::vector< dbCCSeg * > &ccsegs) const
void addRSegResistance(dbRSeg *other)
void adjustResistance(float factor)
void getAllRes(double *res) const
static void destroyS(dbRSeg *seg)
void addGndTotalCap(double *gndcap, double *totalcap, double miller_mult)
void updateShapeId(uint32_t nsid)
void adjustCapacitance(float factor, uint32_t corner)
static void destroy(dbRSeg *seg, dbNet *net)
void addGndCap(double *gndcap, double *totalcap)
void adjustSourceCapacitance(float factor, uint32_t corner)
bool allocatedCap() const
uint32_t getSourceNode() const
bool updatedCap()
double getGroundCapacitance(int corner=0) const
double getResistance(int corner=0) const
dbCapNode * getTargetCapNode() const
bool checkCC() const
double getCapacitance(int corner, double miller_mult) const
void mergeRCs(std::vector< dbRSeg * > &mrsegs)
void printCC() const
double getTotalCapacitance(int corner=0) const
void getCoords(int &x, int &y) const
static void destroy(dbRSeg *seg)
bool addToNet()
void setResistance(double res, int corner=0)
void setNext(uint32_t next_id)
static dbSet< dbRSeg >::iterator destroy(dbSet< dbRSeg >::iterator &itr)
bool pathLowToHigh() const
void addInst(dbInst *inst)
void setRegionType(dbRegionType type)
dbBlock * getBlock() const
int64_t getOverlapArea(const Rect &r) const
void addGroup(dbGroup *group)
bool isInvalid() const
dbSet< dbBox > getBoundaries() const
dbSet< dbInst > getRegionInsts() const
static dbSet< dbRegion >::iterator destroy(dbSet< dbRegion >::iterator &itr)
void setInvalid(bool v)
static dbRegion * create(dbBlock *block, const char *name)
void removeInst(dbInst *inst)
static dbRegion * getRegion(dbBlock *block, uint32_t oid)
std::string getName() const
dbSet< dbGroup > getGroups() const
dbRegionType getRegionType() const
void removeGroup(dbGroup *group)
static void destroy(dbRegion *region)
static void destroy(dbRow *row)
Rect getBBox() const
static dbRow * create(dbBlock *block, const char *name, dbSite *site, int origin_x, int origin_y, dbOrientType orient, dbRowDir direction, int num_sites, int spacing)
std::string getName() const
static dbSet< dbRow >::iterator destroy(dbSet< dbRow >::iterator &itr)
dbRowDir getDirection() const
dbOrientType getOrient() const
const char * getConstName() const
Point getOrigin() const
static dbRow * getRow(dbBlock *block, uint32_t oid)
int getSpacing() const
int getSiteCount() const
dbBlock * getBlock() const
dbSite * getSite() const
bool hasViaLayerMasks() const
static dbSBox * create(dbSWire *swire, dbTechLayer *layer, int x1, int y1, int x2, int y2, dbWireShapeType type, Direction dir=UNDEFINED, int width=0)
Direction getDirection() const
uint32_t getViaBottomLayerMask() const
std::vector< dbSBox * > smashVia()
static dbSBox * create(dbSWire *swire, dbTechVia *via, int x, int y, dbWireShapeType type)
static dbSBox * create(dbSWire *swire, dbVia *via, int x, int y, dbWireShapeType type)
uint32_t getViaCutLayerMask() const
static void destroy(dbSBox *box)
dbSWire * getSWire() const
Direction
Direction of segment.
Definition db.h:479
@ UNDEFINED
Definition db.h:480
@ VERTICAL
Definition db.h:482
@ OCTILINEAR
Definition db.h:483
@ HORIZONTAL
Definition db.h:481
Oct getOct() const
void setViaLayerMask(uint32_t bottom, uint32_t cut, uint32_t top)
dbWireShapeType getWireShapeType() const
uint32_t getViaTopLayerMask() const
static dbSBox * getSBox(dbBlock *block, uint32_t oid)
static dbSBox * create(dbSWire *swire, dbTechLayer *layer, const Rect &rect, dbWireShapeType type, Direction dir=UNDEFINED, int width=0)
static dbSet< dbSWire >::iterator destroy(dbSet< dbSWire >::iterator &itr)
static void destroy(dbSWire *swire)
dbWireType getWireType() const
static dbSWire * create(dbNet *net, dbWireType type, dbNet *shield=nullptr)
dbBlock * getBlock() const
void setWireType(dbWireType type)
dbSet< dbSBox > getWires() const
static dbSWire * getSWire(dbBlock *block, uint32_t oid)
dbNet * getNet() const
dbNet * getShield() const
void setScanIn(dbBTerm *scan_in)
void setScanOut(dbBTerm *scan_out)
std::variant< dbBTerm *, dbITerm * > getScanEnable() const
std::variant< dbBTerm *, dbITerm * > getTestMode() const
std::variant< dbBTerm *, dbITerm * > getScanOut() const
void setTestMode(dbBTerm *test_mode)
const std::string & getName() const
void setScanEnable(dbBTerm *scan_enable)
const std::string & getTestModeName() const
static dbScanChain * create(dbDft *dft)
void setTestModeName(const std::string &test_mode_name)
std::variant< dbBTerm *, dbITerm * > getScanIn() const
dbSet< dbScanPartition > getScanPartitions() const
void setTestMode(dbITerm *test_mode)
void setScanOut(dbITerm *scan_out)
void setScanEnable(dbITerm *scan_enable)
void setName(std::string_view name)
void setScanIn(dbITerm *scan_in)
const std::string & getScanClock() const
void setAccessPins(const AccessPins &access_pins)
uint32_t getBits() const
void setClockEdge(ClockEdge clock_edge)
void setScanEnable(dbBTerm *scan_enable)
void insertAtFront(dbScanList *scan_list)
static dbScanInst * create(dbScanList *scan_list, dbInst *inst)
dbInst * getInst() const
void setScanClock(std::string_view scan_clock)
void setBits(uint32_t bits)
AccessPins getAccessPins() const
std::variant< dbBTerm *, dbITerm * > getScanEnable() const
ClockEdge getClockEdge() const
std::string getClockEdgeString() const
void setScanEnable(dbITerm *scan_enable)
dbSet< dbScanInst > getScanInsts() const
static dbScanList * create(dbScanPartition *scan_partition)
dbScanInst * add(dbInst *inst)
void setName(const std::string &name)
const std::string & getName() const
dbSet< dbScanList > getScanLists() const
static dbScanPartition * create(dbScanChain *chain)
std::variant< dbBTerm *, dbITerm * > getPin() const
void setPin(dbBTerm *bterm)
void setPin(dbITerm *iterm)
static dbScanPin * create(dbDft *dft, dbITerm *iterm)
static dbScanPin * create(dbDft *dft, dbBTerm *bterm)
bool hasRowPattern() const
dbLib * getLib() const
void setWidth(int width)
bool getSymmetryY() const
std::string getName() const
bool getSymmetryX() const
void setSymmetryX()
void setHeight(int height)
int getWidth() const
std::vector< OrientedSite > RowPattern
Definition db.h:5378
void setRowPattern(const RowPattern &row_pattern)
bool isHybrid() const
void setSymmetryY()
const char * getConstName() const
int getHeight() const
static dbSite * create(dbLib *lib, const char *name)
bool getSymmetryR90() const
void setClass(dbSiteClass site_class)
RowPattern getRowPattern() const
dbSiteClass getClass() const
static dbSite * getSite(dbLib *lib, uint32_t oid)
void setSymmetryR90()
void setValue(const char *value)
Set the value of this property.
static dbStringProperty * find(dbObject *object, const char *name)
std::string getValue() const
Get the value of this property.
static dbStringProperty * create(dbObject *object, const char *name, const char *value)
void addMaxAreaCAREntry(double inval, dbTechLayer *refly=nullptr)
void addMaxCutCAREntry(double inval, dbTechLayer *refly=nullptr)
static dbTechAntennaPinModel * getAntennaPinModel(dbMaster *master, uint32_t dbid)
void getMaxCutCAR(std::vector< std::pair< double, dbTechLayer * > > &data) const
void addGateAreaEntry(double inval, dbTechLayer *refly=nullptr)
void getGateArea(std::vector< std::pair< double, dbTechLayer * > > &data) const
void getMaxSideAreaCAR(std::vector< std::pair< double, dbTechLayer * > > &data) const
void getMaxAreaCAR(std::vector< std::pair< double, dbTechLayer * > > &data) const
void addMaxSideAreaCAREntry(double inval, dbTechLayer *refly=nullptr)
void setDiffPAR(double ratio)
void setDiffPSR(double ratio)
pwl_pair getDiffPAR() const
void setAntennaCumRoutingPlusCut(bool value=true)
double getGatePlusDiffFactor() const
void setDiffCSR(const std::vector< double > &diff_idx, const std::vector< double > &ratios)
double getAreaFactor() const
void setGatePlusDiffFactor(double factor)
void setCAR(double ratio)
void setDiffCSR(double ratio)
pwl_pair getAreaDiffReduce() const
void setGatePlusDiffPWL(const std::vector< double > &diff_idx, const std::vector< double > &ratios)
double getSideAreaFactor() const
void setPAR(double ratio)
void setCSR(double ratio)
void setPSR(double ratio)
void setDiffCAR(double ratio)
static dbTechLayerAntennaRule * getAntennaRule(dbTech *inly, uint32_t dbid)
bool hasAntennaCumRoutingPlusCut() const
pwl_pair getDiffCAR() const
void setAreaFactor(double factor, bool diffuse=false)
void setAreaDiffReduce(const std::vector< double > &areas, const std::vector< double > &factors)
void setSideAreaFactor(double factor, bool diffuse=false)
bool isSideAreaFactorDiffUseOnly() const
void setDiffCAR(const std::vector< double > &diff_idx, const std::vector< double > &ratios)
pwl_pair getDiffPSR() const
void setAreaMinusDiffFactor(double factor)
double getAreaMinusDiffFactor() const
void setDiffPAR(const std::vector< double > &diff_idx, const std::vector< double > &ratios)
pwl_pair getGatePlusDiffPWL() const
void setDiffPSR(const std::vector< double > &diff_idx, const std::vector< double > &ratios)
pwl_pair getDiffCSR() const
bool isAreaFactorDiffUseOnly() const
void setExceptMinSize(const std::pair< int, int > &except_min_size)
void setArea(int64_t area)
void setExceptEdgeLengths(const std::pair< int, int > &except_edge_lengths)
std::pair< int, int > getExceptMinSize() const
dbTechLayer * getTrimLayer() const
void setMask(int mask)
static void destroy(dbTechLayerAreaRule *obj)
int getExceptEdgeLength() const
std::pair< int, int > getExceptStep() const
uint32_t getOverlap() const
void setExceptRectangle(bool except_rectangle)
int getExceptMinWidth() const
void setExceptMinWidth(int except_min_width)
void setRectWidth(int rect_width)
int64_t getArea() const
void setOverlap(uint32_t overlap)
std::pair< int, int > getExceptEdgeLengths() const
void setTrimLayer(dbTechLayer *trim_layer)
void setExceptStep(const std::pair< int, int > &except_step)
bool isExceptRectangle() const
void setExceptEdgeLength(int except_edge_length)
static dbTechLayerAreaRule * create(dbTechLayer *parent)
void setCutSpacing(int cut_spacing)
static dbTechLayerArraySpacingRule * getTechLayerArraySpacingRule(dbTechLayer *inly, uint32_t dbid)
const std::map< int, int > & getCutsArraySpacing() const
void setLongArray(bool long_array)
void setWithinValid(bool within_valid)
dbTechLayerCutClassRule * getCutClass() const
void setArrayWidth(int array_width)
void setCutClass(dbTechLayerCutClassRule *cut_class)
static void destroy(dbTechLayerArraySpacingRule *obj)
static dbTechLayerArraySpacingRule * create(dbTechLayer *parent)
void setParallelOverlap(bool parallel_overlap)
void setViaWidthValid(bool via_width_valid)
void setViaWidth(int via_width)
void setCutsArraySpacing(int num_cuts, int spacing)
void getExceptAdjacentExact(std::vector< int > &tbl) const
std::vector< dbTechLayer * > getExceptLayers() const
static void destroy(dbTechLayerCoreEdgeLengthRule *obj)
void setMinLength(int min_length)
std::vector< dbTechLayer * > getWithinLayers() const
void addWithinLayer(dbTechLayer *layer)
void getExceptAdjacentEdgeLengths(std::vector< int > &tbl) const
void addExceptLayer(dbTechLayer *layer)
void getExceptAdjacentLengths(std::vector< int > &tbl) const
void addExceptAdjacentLength(int edge_length, int adj_length, bool exact_adjacent_length)
static dbTechLayerCoreEdgeLengthRule * create(dbTechLayer *parent)
void setMaxLength(int max_length)
void getWidthTable(std::vector< int > &tbl) const
void setSameMask(bool same_mask)
static void destroy(dbTechLayerCornerSpacingRule *obj)
void setExceptSameMetal(bool except_same_metal)
void setJogLength(int jog_length)
static dbTechLayerCornerSpacingRule * getTechLayerCornerSpacingRule(dbTechLayer *inly, uint32_t dbid)
void setMinLength(int min_length)
void setExceptNotch(bool except_notch)
void setType(CornerType _type)
void getSpacingTable(std::vector< std::pair< int, int > > &tbl) const
void addSpacing(uint32_t width, uint32_t spacing1, uint32_t spacing2=0)
void setExceptNotchLengthValid(bool except_notch_length_valid)
void setExceptNotchLength(int except_notch_length)
void setIncludeShape(bool include_shape)
void setExceptSameNet(bool except_same_net)
void setExceptJogLength(bool except_jog_length)
void setEolWidth(int eol_width)
void setExceptEol(bool except_eol)
void setMinLengthValid(bool min_length_valid)
void setEdgeLengthValid(bool edge_length_valid)
void setCheckImplantGroupOnly(bool check_implant_group_only)
void setEdgeLength(int edge_length)
void setAlignedOnly(bool aligned_only)
void setCornerToCorner(bool corner_to_corner)
static dbTechLayerCornerSpacingRule * create(dbTechLayer *parent)
void setCornerOnly(bool corner_only)
static void destroy(dbTechLayerCutClassRule *rule)
const char * getName() const
static dbTechLayerCutClassRule * getTechLayerCutClassRule(dbTechLayer *inly, uint32_t dbid)
void setNumCuts(int num_cuts)
static dbTechLayerCutClassRule * create(dbTechLayer *_layer, const char *name)
void setCutsValid(bool cuts_valid)
void setLengthValid(bool length_valid)
void setLength(int length)
void setExtraCutValid(bool extra_cut_valid)
void setCutClassValid(bool cut_class_valid)
void setConcaveCornersValid(bool concave_corners_valid)
void setShortEdgeOnEol(bool short_edge_on_eol)
void setSecondOverhang(int second_overhang)
void setIncludeAbutted(bool include_abutted)
void setFirstOverhang(int first_overhang)
void setExtension(int extension)
void setExceptExtraCut(bool except_extra_cut)
void setEolMinLengthValid(bool eol_min_length_valid)
void setCutWithin(int cut_within)
void setNumCorners(uint32_t num_corners)
void setMinLength(int min_length)
static dbTechLayerCutEnclosureRule * create(dbTechLayer *parent)
void setExtraOnly(bool extra_only)
void setEndSpacingValid(bool end_spacing_valid)
void setWidthValid(bool width_valid)
static dbTechLayerCutEnclosureRule * getTechLayerCutEnclosureRule(dbTechLayer *inly, uint32_t dbid)
void setCutClass(dbTechLayerCutClassRule *cut_class)
void setSecondParWithinValid(bool second_par_within_valid)
void setParWithin(int par_within)
void setRedundantCutValid(bool redundant_cut_valid)
static void destroy(dbTechLayerCutEnclosureRule *obj)
void setEolMinLength(int eol_min_length)
void setEolOnly(bool eol_only)
void setMinWidth(int min_width)
void setBackwardExtension(int backward_extension)
void setLengthValid(bool length_valid)
void setSecondParLength(int second_par_length)
void setSecondParWithin(int second_par_within)
void setOffCenterLine(bool off_center_line)
void setSideSpacingValid(bool side_spacing_valid)
void setParLength(int par_length)
void setNoSharedEdge(bool no_shared_edge)
void setEolWidth(int eol_width)
void setParallelValid(bool parallel_valid)
void setForwardExtension(int forward_extension)
void setSecondParallelValid(bool second_parallel_valid)
dbTechLayerCutClassRule * getCutClass() const
void setBelowEnclosureValid(bool below_enclosure_valid)
void setBelowEnclosure(int below_enclosure)
void getDefaultRows(std::vector< DefaultRow > &rows) const
static dbTechLayerCutEnclosureTableDefRule * create(dbTechLayer *parent)
void addWidthRow(const WidthRow &row)
static void destroy(dbTechLayerCutEnclosureTableDefRule *obj)
dbTechLayerCutClassRule * getCutClass() const
void addDefaultRow(const DefaultRow &row)
void setCutClass(dbTechLayerCutClassRule *cut_class)
void getWidthRows(std::vector< WidthRow > &rows) const
void setTwoCuts(uint32_t two_cuts)
void setExceptTwoEdges(bool except_two_edges)
static dbTechLayerCutSpacingRule * getTechLayerCutSpacingRule(dbTechLayer *inly, uint32_t dbid)
void setConcaveCornerEdgeLength(bool concave_corner_edge_length)
void setEolWidth(int eol_width)
void setAboveWidth(int above_width)
void setSecondLayer(dbTechLayer *second_layer)
void setNonEolConvexCorner(bool non_eol_convex_corner)
void setConcaveCornerParallel(bool concave_corner_parallel)
void setShortEdgeOnly(bool short_edge_only)
static dbTechLayerCutSpacingRule * create(dbTechLayer *parent)
void setMaskOverlap(bool mask_overlap)
void setConcaveCornerWidth(bool concave_corner_width)
void setSameVia(bool same_via)
void setExceptSameVia(bool except_same_via)
dbTechLayer * getSecondLayer() const
bool isParWithinEnclosureValid() const
void setEdgeEnclosure(int edge_enclosure)
void setConcaveCorner(bool concave_corner)
void setWrongDirection(bool wrong_direction)
void setLongEdgeOnly(bool long_edge_only)
void setExceptSameMetal(bool except_same_metal)
void setCutClassToAll(bool cut_class_to_all)
void setParLength(uint32_t par_length)
dbTechLayerCutClassRule * getCutClass() const
void setSameMetal(bool same_metal)
void setCutArea(int64_t cut_area)
bool isConcaveCornerEdgeLength() const
void setEnclosure(int enclosure)
uint32_t getAdjacentCuts() const
void setAboveWidthEnclosureValid(bool above_width_enclosure_valid)
void setExtension(int extension)
void setType(CutSpacingType _type)
bool isAboveWidthEnclosureValid() const
void setMinLength(int min_length)
dbTechLayer * getTechLayer() const
void setSameCut(bool same_cut)
void setTwoCutsValid(bool two_cuts_valid)
void setPrlValid(bool prl_valid)
void setCenterToCenter(bool center_to_center)
void setSecondWithin(int second_within)
void setExceptSameNet(bool except_same_net)
void setExceptSameMetalOverlap(bool except_same_metal_overlap)
void setExactAligned(bool exact_aligned)
void setSideParallelOverlap(bool side_parallel_overlap)
CutSpacingType getType() const
void setCutClass(dbTechLayerCutClassRule *cut_class)
void setEolWidthValid(bool eol_width_valid)
void setParWithin(int par_within)
void setAdjEnclosure(int adj_enclosure)
void setOrthogonalSpacingValid(bool orthogonal_spacing_valid)
void setCutSpacing(int cut_spacing)
void setSameNet(bool same_net)
void setExceptSamePgnet(bool except_same_pgnet)
void setExtensionValid(bool extension_valid)
void setSameMask(bool same_mask)
void setEdgeLength(int edge_length)
static void destroy(dbTechLayerCutSpacingRule *obj)
void setParEnclosure(int par_enclosure)
void setAboveEnclosure(int above_enclosure)
void setNumCuts(uint32_t num_cuts)
void setOrthogonalSpacing(int orthogonal_spacing)
void setAboveWidthValid(bool above_width_valid)
void setAdjacentCuts(uint32_t adjacent_cuts)
void setParWithinEnclosureValid(bool par_within_enclosure_valid)
void setMinLengthValid(bool min_length_valid)
void addExactElignedEntry(const std::string &cls, int spacing)
void setNonOppositeEnclosureSpacingValid(bool non_opposite_enclosure_spacing_valid)
static dbTechLayerCutSpacingTableDefRule * create(dbTechLayer *parent)
void addCenterToCenterEntry(const std::string &from, const std::string &to)
bool isCenterToCenter(const std::string &cutClass1, const std::string &cutClass2) const
void addSideExtensionEntry(const std::string &cls, int ext)
void addPrlEntry(const std::string &from, const std::string &to, int ccPrl)
dbTechLayer * getSecondLayer() const
void setCenterToCenterValid(bool center_to_center_valid)
bool isPrlForAlignedCutClasses(const std::string &cutClass1, const std::string &cutClass2) const
void setDefaultValid(bool default_valid)
void setOppositeEnclosureResizeSpacingValid(bool opposite_enclosure_resize_spacing_valid)
int getMaxSpacing(const std::string &cutClass1, const std::string &cutClass2, LOOKUP_STRATEGY strategy=MAX) const
void setSideExtensionValid(bool side_extension_valid)
void setPrlHorizontal(bool prl_horizontal)
void setSpacingTable(const std::vector< std::vector< std::pair< int, int > > > &table, const std::map< std::string, uint32_t > &row_map, const std::map< std::string, uint32_t > &col_map)
void setPrlVertical(bool prl_vertical)
void addCenterAndEdgeEntry(const std::string &from, const std::string &to)
int getMaxSpacing(std::string cutClass, bool SIDE) const
void addOppEncSpacingEntry(const std::string &cls, int rsz1, int rsz2, int spacing)
static dbTechLayerCutSpacingTableDefRule * getTechLayerCutSpacingTableDefSubRule(dbTechLayer *parent, uint32_t dbid)
int getPrlEntry(const std::string &cutClass1, const std::string &cutClass2) const
void setPrlForAlignedCut(bool prl_for_aligned_cut)
void setSecondLayer(dbTechLayer *second_layer)
int getSpacing(std::string class1, bool SIDE1, std::string class2, bool SIDE2, LOOKUP_STRATEGY strategy=MAX) const
void setCenterAndEdgeValid(bool center_and_edge_valid)
void setLayerValid(bool layer_valid)
static void destroy(dbTechLayerCutSpacingTableDefRule *obj)
void setEndExtensionValid(bool end_extension_valid)
void getSpacingTable(std::vector< std::vector< std::pair< int, int > > > &table, std::map< std::string, uint32_t > &row_map, std::map< std::string, uint32_t > &col_map) const
int getExactAlignedSpacing(const std::string &cutClass) const
void addEndExtensionEntry(const std::string &cls, int ext)
void addPrlForAlignedCutEntry(const std::string &from, const std::string &to)
void setExactAlignedSpacingValid(bool exact_aligned_spacing_valid)
bool isCenterAndEdge(const std::string &cutClass1, const std::string &cutClass2) const
void addNonOppEncSpacingEntry(const std::string &cls, int spacing)
void setNonZeroEnclosure(bool non_zero_enclosure)
static dbTechLayerCutSpacingTableOrthRule * getTechLayerCutSpacingTableOrthSubRule(dbTechLayer *parent, uint32_t dbid)
void setSpacingTable(const std::vector< std::pair< int, int > > &tbl)
static void destroy(dbTechLayerCutSpacingTableOrthRule *obj)
static dbTechLayerCutSpacingTableOrthRule * create(dbTechLayer *parent)
void getSpacingTable(std::vector< std::pair< int, int > > &tbl) const
static dbTechLayerEolExtensionRule * getTechLayerEolExtensionRule(dbTechLayer *inly, uint32_t dbid)
void addEntry(int eol, int ext)
void setParallelOnly(bool parallel_only)
static void destroy(dbTechLayerEolExtensionRule *obj)
static dbTechLayerEolExtensionRule * create(dbTechLayer *parent)
void getExtensionTable(std::vector< std::pair< int, int > > &tbl) const
static dbTechLayerEolKeepOutRule * getTechLayerEolKeepOutRule(dbTechLayer *inly, uint32_t dbid)
void setClassValid(bool class_valid)
const std::string & getClassName() const
void setWithinHigh(int within_high)
static void destroy(dbTechLayerEolKeepOutRule *obj)
void setClassName(const std::string &class_name)
void setBackwardExt(int backward_ext)
void setSideExt(int side_ext)
void setEolWidth(int eol_width)
void setExceptWithin(bool except_within)
void setForwardExt(int forward_ext)
void setWithinLow(int within_low)
void setCornerOnly(bool corner_only)
static dbTechLayerEolKeepOutRule * create(dbTechLayer *parent)
void setForbiddenSpacing(const std::pair< int, int > &forbidden_spacing)
static dbTechLayerForbiddenSpacingRule * create(dbTechLayer *_layer)
static void destroy(dbTechLayerForbiddenSpacingRule *rule)
std::pair< int, int > getForbiddenSpacing() const
void setMinSpacing(int min_spacing)
void setSecondLayer(dbTechLayer *second_layer)
void setExceptCornerTouch(bool except_corner_touch)
void setHorizontal(bool horizontal)
dbTechLayer * getSecondLayer() const
void setExceptAbutted(bool except_abutted)
std::vector< dbTechLayer * > getIntersectLayers() const
static dbTechLayerImplantSpacingRule * create(dbTechLayer *parent)
void setPrlValid(bool prl_valid)
static void destroy(dbTechLayerImplantSpacingRule *obj)
void addIntersectLayer(dbTechLayer *layer)
void setCellHeight(int cell_height)
void setSecondLayer(dbTechLayer *second_layer)
dbTechLayer * getSecondLayer() const
const std::string & getCheckImplantGroup() const
void setLayerAny(bool layer_any)
static dbTechLayerImplantWidthRule * create(dbTechLayer *parent)
void setMaxWidth(int max_width)
std::vector< dbTechLayer * > getWithinLayers() const
static void destroy(dbTechLayerImplantWidthRule *obj)
void setExceptCornerTouch(bool except_corner_touch)
void setZeroPrl(bool zero_prl)
void setCheckImplantGroup(const std::string &check_implant_group)
void setMinWidth(int min_width)
void addWithinLayer(dbTechLayer *layer)
void setForwardExtension(int forward_extension)
void setSpiralExtension(int spiral_extension)
void setSecondCutClass(const std::string &second_cut_class)
void setSideSideExtension(int side_side_extension)
const std::string & getSecondCutClass() const
void setDiffMetal(bool diff_metal)
void setSideForwardExtension(int side_forward_extension)
void setFirstCutClass(const std::string &first_cut_class)
void setExceptAlignedSide(bool except_aligned_side)
void setExceptAlignedEnd(bool except_aligned_end)
void setSameMetal(bool same_metal)
void setSideExtension(int side_extension)
void setEndSideExtension(int end_side_extension)
void setEndForwardExtension(int end_forward_extension)
void setAlignedSpacing(int aligned_spacing)
void setSameMask(bool same_mask)
static void destroy(dbTechLayerKeepOutZoneRule *obj)
static dbTechLayerKeepOutZoneRule * create(dbTechLayer *parent)
const std::string & getFirstCutClass() const
const std::string & getCutClass() const
static dbTechLayerMaxSpacingRule * create(dbTechLayer *parent)
void setMaxSpacing(int max_spacing)
static void destroy(dbTechLayerMaxSpacingRule *obj)
void setCutClass(const std::string &cut_class)
void setWithinCutDist(int within_cut_dist)
void setLength(int length)
void setAreaWithinDistValid(bool area_within_dist_valid)
const std::map< std::string, int > & getCutClassCutsMap() const
void setWidth(int width)
static dbTechLayerMinCutRule * create(dbTechLayer *parent)
bool isWithinCutDistValid() const
void setArea(int64_t area)
void setAreaValid(bool area_valid)
void setCutsPerCutClass(const std::string &cut_class, int num_cuts)
static dbTechLayerMinCutRule * getTechLayerMinCutRule(dbTechLayer *inly, uint32_t dbid)
bool isSameMetalOverlap() const
void setFromAbove(bool from_above)
void setLengthWithinDist(int length_within_dist)
void setSameMetalOverlap(bool same_metal_overlap)
void setAreaWithinDist(int area_within_dist)
static void destroy(dbTechLayerMinCutRule *obj)
bool isAreaWithinDistValid() const
void setFromBelow(bool from_below)
void setLengthValid(bool length_valid)
void setPerCutClass(bool per_cut_class)
void setWithinCutDistValid(bool within_cut_dist_valid)
void setFullyEnclosed(bool fully_enclosed)
void setNumCuts(int num_cuts)
void setMinAdjLength1(int min_adj_length1)
bool isMinAdjLength1Valid() const
void setMinStepLength(int min_step_length)
void setExceptSameCorners(bool except_same_corners)
void setMaxEdgesValid(bool max_edges_valid)
bool isMinBetweenLengthValid() const
void setMinAdjLength2(int min_adj_length2)
void setEolWidth(int eol_width)
bool isMinAdjLength2Valid() const
void setExceptRectangle(bool except_rectangle)
void setMinAdjLength1Valid(bool min_adj_length1_valid)
void setNoBetweenEol(bool no_between_eol)
void setNoAdjacentEol(bool no_adjacent_eol)
void setMinBetweenLengthValid(bool min_between_length_valid)
static dbTechLayerMinStepRule * create(dbTechLayer *parent)
void setMinBetweenLength(int min_between_length)
void setConcaveCorner(bool concave_corner)
uint32_t getMaxEdges() const
static dbTechLayerMinStepRule * getTechLayerMinStepRule(dbTechLayer *inly, uint32_t dbid)
void setMaxEdges(uint32_t max_edges)
bool isExceptSameCorners() const
static void destroy(dbTechLayerMinStepRule *obj)
void setMinAdjLength2Valid(bool min_adj_length2_valid)
void setConvexCorner(bool convex_corner)
void setSpacing(int spacing)
int getSpacing() const
static dbTechLayerRule * create(dbTechNonDefaultRule *rule, dbTechLayer *layer)
void setCapacitance(double cap)
bool isBlockRule() const
void setWidth(int width)
dbTechNonDefaultRule * getNonDefaultRule() const
double getEdgeCapacitance() const
static dbTechLayerRule * getTechLayerRule(dbBlock *block, uint32_t oid)
double getResistance() const
void setWireExtension(uint32_t ext)
uint32_t getWireExtension() const
int getWidth() const
void setEdgeCapacitance(double cap)
void setResistance(double res)
double getCapacitance() const
static dbTechLayerRule * getTechLayerRule(dbTech *tech, uint32_t oid)
dbTechLayer * getLayer() const
void setCutToMetalSpace(int cut_to_metal_space)
void setEqualRectWidthValid(bool equal_rect_width_valid)
void setParMinLength(int par_min_length)
void setAboveValid(bool above_valid)
void setMinLengthValid(bool min_length_valid)
void setEnclosureEndWithin(int enclosure_end_within)
void setEndPrlSpace(int end_prl_space)
void setCutClassValid(bool cut_class_valid)
static dbTechLayerSpacingEolRule * create(dbTechLayer *parent)
void setExactWidthValid(bool exact_width_valid)
void setMaxLengthValid(bool max_length_valid)
void setFillConcaveCornerValid(bool fill_concave_corner_valid)
void setParallelEdgeValid(bool parallel_edge_valid)
void setWithcutValid(bool withcut_valid)
void setParallelSameMaskValid(bool parallel_same_mask_valid)
void setTwoEdgesValid(bool two_edges_valid)
void setParSpace(int par_space)
void setWithCutSpace(int with_cut_space)
void setTwoMinAdjLengthValid(bool two_min_adj_length_valid)
void setExtension(int extension)
void setMinLength(int min_length)
void setWrongDirExtensionValid(bool wrong_dir_extension_valid)
void setEolWidth(int eol_width)
void setEncloseDist(int enclose_dist)
void setEndToEndValid(bool end_to_end_valid)
void setBelowValid(bool below_valid)
void setOtherWidth(int other_width)
void setNonEolCornerOnlyValid(bool non_eol_corner_only_valid)
void setFillTriangle(int fill_triangle)
void setCutClass(int cut_class)
void setOppositeWidthValid(bool opposite_width_valid)
void setWrongDirWithinValid(bool wrong_dir_within_valid)
void setWrongDirExtension(int wrong_dir_extension)
void setParPrlValid(bool par_prl_valid)
void setExactWidth(int exact_width)
void setTwoSidesValid(bool two_sides_valid)
void setExceptExactWidthValid(bool except_exact_width_valid)
void setEnclosureEndWidth(int enclosure_end_width)
void setSubtractEolWidthValid(bool subtract_eol_width_valid)
void setEnclosureEndWithinValid(bool enclosure_end_within_valid)
void setEolWithin(int eol_within)
void setSameMetalValid(bool same_metal_valid)
void setNotchLength(int notch_length)
void setEnclosureEndValid(bool enclosure_end_valid)
static dbTechLayerSpacingEolRule * getTechLayerSpacingEolRule(dbTechLayer *inly, uint32_t dbid)
void setMaxLength(int max_length)
void setWrongDirWithin(int wrong_dir_within)
void setWrongDirSpace(int wrong_dir_space)
void setOneCutSpace(int one_cut_space)
void setEolSpace(int eol_space)
void setMinAdjLength(int min_adj_length)
void setMinAdjacentLengthValid(bool min_adjacent_length_valid)
void setParMinLengthValid(bool par_min_length_valid)
void setEndPrlSpacingValid(bool end_prl_spacing_valid)
void setMinAdjLength1(int min_adj_length1)
static void destroy(dbTechLayerSpacingEolRule *obj)
void setCutSpacesValid(bool cut_spaces_valid)
void setEndToEndSpace(int end_to_end_space)
void setTwoCutSpace(int two_cut_space)
void setAllCutsValid(bool all_cuts_valid)
void setWithinValid(bool within_valid)
void setParWithin(int par_within)
void setExtensionValid(bool extension_valid)
void setCutSpacingValid(bool cut_spacing_valid)
void setToConcaveCornerValid(bool to_concave_corner_valid)
bool isEnclosureEndWithinValid() const
void setWithCutAboveValid(bool with_cut_above_valid)
void setOppositeWidth(int opposite_width)
void setOtherEndWidth(int other_end_width)
void setPrlValid(bool prl_valid)
void setToNotchLengthValid(bool to_notch_length_valid)
void setSameMaskValid(bool same_mask_valid)
void setMinAdjLength2(int min_adj_length2)
void setEncloseCutValid(bool enclose_cut_valid)
void setWrongDirSpacingValid(bool wrong_dir_spacing_valid)
void setOtherEndWidthValid(bool other_end_width_valid)
static dbTechLayerSpacingRule * create(dbTechLayer *inly)
void setCutParallelOverlap(bool overlap)
bool hasUseLengthThreshold() const
void setSpacingNotchLengthValid(bool val)
bool getInfluence(uint32_t &influence) const
bool getCutLayer4Spacing(dbTechLayer *&outly) const
uint32_t getSpacing() const
void setCutLayer4Spacing(dbTechLayer *cutly)
bool getEol(uint32_t &width, uint32_t &within, bool &parallelEdge, uint32_t &parallelSpace, uint32_t &parallelWithin, bool &twoEdges) const
static dbTechLayerSpacingRule * getTechLayerSpacingRule(dbTechLayer *inly, uint32_t dbid)
bool hasSpacingNotchLength() const
void setRange(uint32_t rmin, uint32_t rmax)
bool getRange(uint32_t &rmin, uint32_t &rmax) const
bool getCutParallelOverlap() const
bool getCutCenterToCenter() const
void setSpacingEndOfNotchWidthValid(bool val)
bool hasSpacingEndOfNotchWidth() const
void setSameNetPgOnly(bool pgonly)
void setLengthThreshold(uint32_t threshold)
void setSpacing(uint32_t spacing)
bool getLengthThreshold(uint32_t &threshold) const
int64_t getCutArea() const
void setLengthThresholdRange(uint32_t rmin, uint32_t rmax)
bool getInfluenceRange(uint32_t &rmin, uint32_t &rmax) const
void setCutArea(int64_t area)
void setInfluenceRange(uint32_t rmin, uint32_t rmax)
void setCutStacking(bool stacking)
void setEol(uint32_t width, uint32_t within, bool parallelEdge, uint32_t parallelSpace, uint32_t parallelWithin, bool twoEdges)
bool getAdjacentCuts(uint32_t &numcuts, uint32_t &within, uint32_t &spacing, bool &except_same_pgnet) const
void setCutCenterToCenter(bool c2c)
bool getRangeRange(uint32_t &rmin, uint32_t &rmax) const
bool getLengthThresholdRange(uint32_t &rmin, uint32_t &rmax) const
void setRangeRange(uint32_t rmin, uint32_t rmax)
bool isUnconditional() const
Combine data and predicates for elements of rule.
void setCutSameNet(bool same_net)
void setAdjacentCuts(uint32_t numcuts, uint32_t within, uint32_t spacing, bool except_same_pgnet)
void setInfluence(uint32_t influence)
void setSpacingTableInfluence(const std::vector< std::tuple< int, int, int > > &influence_tbl)
static dbTechLayerSpacingTablePrlRule * getTechLayerSpacingTablePrlRule(dbTechLayer *inly, uint32_t dbid)
static void destroy(dbTechLayerSpacingTablePrlRule *obj)
void setTable(const std::vector< int > &width_tbl, const std::vector< int > &length_tbl, const std::vector< std::vector< int > > &spacing_tbl, const std::map< uint32_t, std::pair< int, int > > &excluded_map)
void setWrongDirection(bool wrong_direction)
int getSpacing(int width, int length) const
void getTable(std::vector< int > &width_tbl, std::vector< int > &length_tbl, std::vector< std::vector< int > > &spacing_tbl, std::map< uint32_t, std::pair< int, int > > &excluded_map) const
static dbTechLayerSpacingTablePrlRule * create(dbTechLayer *parent)
std::pair< int, int > getExceptWithin(int width) const
void setSameMask(bool same_mask)
void setExceeptEol(bool exceept_eol)
bool hasExceptWithin(int width) const
static dbTechLayerTwoWiresForbiddenSpcRule * create(dbTechLayer *layer)
void setMaxExactSpanLength(bool max_exact_span_length)
void setMaxSpanLength(int max_span_length)
void setMinExactSpanLength(bool min_exact_span_length)
static void destroy(dbTechLayerTwoWiresForbiddenSpcRule *rule)
void setMinSpanLength(int min_span_length)
static void destroy(dbTechLayerVoltageSpacing *obj)
const std::map< float, int > & getTable() const
void setTocutBelow(bool tocut_below)
static dbTechLayerVoltageSpacing * create(dbTechLayer *parent)
void setTocutAbove(bool tocut_above)
void addEntry(float voltage, int spacing)
std::vector< int > getWidthTable() const
void setOrthogonal(bool orthogonal)
static void destroy(dbTechLayerWidthTableRule *rule)
static dbTechLayerWidthTableRule * getTechLayerWidthTableRule(dbTechLayer *inly, uint32_t dbid)
void setWrongDirection(bool wrong_direction)
static dbTechLayerWidthTableRule * create(dbTechLayer *layer)
void setNoneolValid(bool noneol_valid)
void setLengthValid(bool length_valid)
void setNoneolWidth(int noneol_width)
static void destroy(dbTechLayerWrongDirSpacingRule *obj)
void setPrlLength(int prl_length)
void setWrongdirSpace(int wrongdir_space)
static dbTechLayerWrongDirSpacingRule * getTechLayerWrongDirSpacingRule(dbTechLayer *inly, uint32_t dbid)
static dbTechLayerWrongDirSpacingRule * create(dbTechLayer *parent)
dbTechLayerAntennaRule * getOxide2AntennaRule() const
uint32_t getMinStepMaxEdges() const
dbSet< dbTechLayerMaxSpacingRule > getTechLayerMaxSpacingRules() const
uint32_t getProtrusionWidth() const
int getPitchY() const
dbSet< dbTechLayerEolKeepOutRule > getTechLayerEolKeepOutRules() const
dbSet< dbTechLayerImplantSpacingRule > getTechLayerImplantSpacingRules() const
double getEdgeCapacitance() const
void initV55SpacingTable(uint32_t numrows, uint32_t numcols)
void addV55LengthEntry(uint32_t length)
void addV55SpacingTableEntry(uint32_t inrow, uint32_t incol, uint32_t spacing)
void setRightWayOnGridOnly(bool right_way_on_grid_only)
void setMaxWidth(uint32_t max_width)
dbTechLayerType getType() const
int getSpacing() const
dbSet< dbTechLayerSpacingRule > getV54SpacingRules() const
dbSet< dbTechLayerTwoWiresForbiddenSpcRule > getTechLayerTwoWiresForbiddenSpcRules() const
bool hasOrthSpacingTable() const
void setOffset(int pitch)
int getOffsetX() const
bool isRectOnlyExceptNonCorePins() const
int getPitchX() const
dbTechLayerMinStepType getMinStepType() const
bool isBackside() const
bool getMinEnclosureRules(std::vector< dbTechMinEncRule * > &enc_rules) const
void setResistance(double res)
void addOrthSpacingTableEntry(int within, int spacing)
dbSet< dbTechLayerCutSpacingTableDefRule > getTechLayerCutSpacingTableDefRules() const
bool getTwoWidthsSpacingTableHasPRL(uint32_t row) const
bool hasMinStepMaxLength() const
bool getV55SpacingWidthsAndLengths(std::vector< uint32_t > &width_idx, std::vector< uint32_t > &length_idx) const
void getMinWideDRCRange(int &owidth, int &olength) const
dbSet< dbTechLayerVoltageSpacing > getTechLayerVoltageSpacings() const
void setPitchXY(int pitch_x, int pitch_y)
uint32_t getProtrusionLength() const
double getCapacitance() const
void setDirection(dbTechLayerDir direction)
bool hasOxide2AntennaRule() const
int getOffsetY() const
dbTechLayerAntennaRule * getOrCreateAntennaModel(int oxide_idx)
dbTechLayer * getUpperLayer() const
void setOffsetXY(int pitch_x, int pitch_y)
std::string getName() const
void setLef58Type(LEF58_TYPE type)
LEF58_TYPE getLef58Type() const
uint32_t getMinWidth() const
bool hasMaxWidth() const
void setWrongWayMinWidth(uint32_t wrong_way_min_width)
void setWrongWayWidth(uint32_t wrong_way_width)
float getLayerAdjustment() const
uint32_t getWidth() const
uint32_t getMinStepMaxLength() const
void setPitch(int pitch)
uint32_t getWireExtension() const
void setMinStepMaxLength(uint32_t length)
dbSet< dbTechLayerCutSpacingTableOrthRule > getTechLayerCutSpacingTableOrthRules() const
dbSet< dbTechLayerCutSpacingRule > getTechLayerCutSpacingRules() const
void setAlias(const char *alias)
bool hasMinStepMaxEdges() const
int getPitch() const
bool hasV55SpacingRules() const
void setLayerAdjustment(float layer_adjustment)
static dbTechLayer * create(dbTech *tech, const char *name, dbTechLayerType type)
void getMaxWideDRCRange(int &owidth, int &olength) const
void setNumMasks(uint32_t number)
void setArea(int64_t area)
dbSet< dbTechLayerWrongDirSpacingRule > getTechLayerWrongDirSpacingRules() const
void setMinStepMaxEdges(uint32_t edges)
dbSet< dbTechLayerImplantWidthRule > getTechLayerImplantWidthRules() const
dbSet< dbTechMinEncRule > getMinEncRules() const
void setCapacitance(double cap)
int getOffset() const
uint32_t getMinStep() const
void addTwoWidthsSpacingTableEntry(uint32_t inrow, uint32_t incol, uint32_t spacing)
void getOrthSpacingTable(std::vector< std::pair< int, int > > &tbl) const
uint32_t getTwoWidthsSpacingTableEntry(uint32_t row, uint32_t col) const
dbSet< dbTechLayerEolExtensionRule > getTechLayerEolExtensionRules() const
const char * getConstName() const
bool hasMinStep() const
void setMinStepType(dbTechLayerMinStepType type)
dbSet< dbTechLayerForbiddenSpacingRule > getTechLayerForbiddenSpacingRules() const
bool getMinimumCutRules(std::vector< dbTechMinCutRule * > &cut_rules) const
std::string getLef58TypeString() const
bool hasXYPitch() const
bool hasArea() const
bool hasDefaultAntennaRule() const
dbSet< dbTechLayerAreaRule > getTechLayerAreaRules() const
dbSet< dbTechLayerKeepOutZoneRule > getTechLayerKeepOutZoneRules() const
bool hasProtrusion() const
void setWireExtension(uint32_t ext)
void initV55WidthIndex(uint32_t numelems)
void initV55LengthIndex(uint32_t numelems)
bool hasXYOffset() const
uint32_t getMaxWidth() const
int findTwSpacing(int width1, int width2, int prl) const
int getNumber() const
bool isRightWayOnGridOnlyCheckMask() const
dbSet< dbTechLayerCutEnclosureTableDefRule > getTechLayerCutEnclosureTableDefRules() const
void setBackside(bool is_backside)
static dbTechLayer * getTechLayer(dbTech *tech, uint32_t oid)
void setFirstLastPitch(int first_last_pitch)
dbSet< dbTechLayerSpacingTablePrlRule > getTechLayerSpacingTablePrlRules() const
dbSet< dbTechLayerCornerSpacingRule > getTechLayerCornerSpacingRules() const
dbSet< dbTechLayerMinCutRule > getTechLayerMinCutRules() const
bool getThickness(uint32_t &inthk) const
int getRoutingLevel() const
int64_t getArea() const
void setRectOnly(bool rect_only)
void setSpacing(int spacing)
bool getTwoWidthsSpacingTable(std::vector< std::vector< uint32_t > > &sptbl) const
dbTechLayerAntennaRule * getDefaultAntennaRule() const
uint32_t getTwoWidthsSpacingTablePRL(uint32_t row) const
dbSet< dbTechMinCutRule > getMinCutRules() const
void addTwoWidthsIndexEntry(uint32_t width, int parallel_run_length=-1)
double getResistance() const
void addV55WidthEntry(uint32_t width)
dbSet< dbTechLayerWidthTableRule > getTechLayerWidthTableRules() const
void setRectOnlyExceptNonCorePins(bool rect_only_except_non_core_pins)
void setThickness(uint32_t thickness)
uint32_t getTwoWidthsSpacingTableNumWidths() const
dbTechLayerCutClassRule * findTechLayerCutClassRule(const char *name) const
dbTechLayerDir getDirection() const
void initTwoWidths(uint32_t num_widths)
bool isRectOnly() const
dbTechLayerAntennaRule * createOxide2AntennaRule()
dbTech * getTech() const
uint32_t getProtrusionFromWidth() const
dbTechLayerAntennaRule * createDefaultAntennaRule()
int findV55Spacing(int width, int prl) const
void setMinStep(uint32_t min_step)
uint32_t getWrongWayMinWidth() const
int getFirstLastPitch() const
void setProtrusion(uint32_t pt_width, uint32_t pt_length, uint32_t pt_from_width)
dbSet< dbTechLayerArraySpacingRule > getTechLayerArraySpacingRules() const
dbSet< dbTechV55InfluenceEntry > getV55InfluenceRules() const
void setWidth(int width)
uint32_t getTwoWidthsSpacingTableWidth(uint32_t row) const
void setMinWidth(uint32_t max_width)
bool hasAlias() const
dbSet< dbTechLayerSpacingEolRule > getTechLayerSpacingEolRules() const
dbSet< dbTechLayerCoreEdgeLengthRule > getTechLayerCoreEdgeLengthRules() const
bool isRightWayOnGridOnly() const
bool getV55SpacingTable(std::vector< std::vector< uint32_t > > &sptbl) const
bool hasTwoWidthsSpacingRules() const
dbSet< dbTechLayerMinStepRule > getTechLayerMinStepRules() const
dbSet< dbTechLayerCutClassRule > getTechLayerCutClassRules() const
void setRightWayOnGridOnlyCheckMask(bool right_way_on_grid_only_check_mask)
uint32_t getNumMasks() const
void setEdgeCapacitance(double cap)
int getSpacing(int width, int length=0) const
uint32_t getWrongWayWidth() const
std::string getAlias() const
dbTechLayer * getLowerLayer() const
dbSet< dbTechLayerCutEnclosureRule > getTechLayerCutEnclosureRules() const
static dbTechMinCutRule * getMinCutRule(dbTechLayer *inly, uint32_t dbid)
bool isBelowOnly() const
bool getMinimumCuts(uint32_t &numcuts, uint32_t &width) const
bool isAboveOnly() const
bool getCutDistance(uint32_t &cut_distance) const
static dbTechMinCutRule * create(dbTechLayer *inly)
void setLengthForCuts(uint32_t length, uint32_t distance)
void setCutDistance(uint32_t cut_distance)
bool getLengthForCuts(uint32_t &length, uint32_t &distance) const
void setMinimumCuts(uint32_t numcuts, uint32_t width, bool above_only, bool below_only)
bool getEnclosureWidth(uint32_t &width) const
static dbTechMinEncRule * create(dbTechLayer *inly)
bool getEnclosure(int64_t &area) const
void setEnclosure(int64_t area)
static void destroy(dbTechMinEncRule *rule)
static dbTechMinEncRule * getMinEncRule(dbTechLayer *inly, uint32_t dbid)
void setEnclosureWidth(uint32_t width)
void getLayerRules(std::vector< dbTechLayerRule * > &layer_rules) const
void getUseVias(std::vector< dbTechVia * > &vias) const
static dbTechNonDefaultRule * getTechNonDefaultRule(dbBlock *block, uint32_t oid)
void getVias(std::vector< dbTechVia * > &vias) const
void setMinCuts(dbTechLayer *cut_layer, int count)
void getSameNetRules(std::vector< dbTechSameNetRule * > &rules) const
static dbTechNonDefaultRule * create(dbTech *tech, const char *name)
static dbTechNonDefaultRule * getTechNonDefaultRule(dbTech *tech, uint32_t oid)
bool getMinCuts(dbTechLayer *cut_layer, int &count) const
void addUseVia(dbTechVia *via)
void setHardSpacing(bool value)
void getUseViaRules(std::vector< dbTechViaGenerateRule * > &rules) const
dbTechSameNetRule * findSameNetRule(dbTechLayer *l1, dbTechLayer *l2) const
dbTechLayerRule * getLayerRule(dbTechLayer *layer) const
void addUseViaRule(dbTechViaGenerateRule *rule)
const char * getConstName() const
static dbTechNonDefaultRule * create(dbBlock *block, const char *name)
std::string getName() const
dbTechLayer * getLayer2() const
dbTechLayer * getLayer1() const
static dbTechSameNetRule * create(dbTechNonDefaultRule *rule, dbTechLayer *layer1, dbTechLayer *layer2)
static dbTechSameNetRule * create(dbTechLayer *layer1, dbTechLayer *layer2)
void setAllowStackedVias(bool value)
bool getAllowStackedVias() const
static dbTechSameNetRule * getTechSameNetRule(dbTech *tech, uint32_t oid)
void setSpacing(int spacing)
bool getV55InfluenceEntry(uint32_t &width, uint32_t &within, uint32_t &spacing) const
static dbTechV55InfluenceEntry * getV55InfluenceEntry(dbTechLayer *inly, uint32_t dbid)
void setV55InfluenceEntry(const uint32_t &width, const uint32_t &within, const uint32_t &spacing)
static dbTechV55InfluenceEntry * create(dbTechLayer *inly)
dbTechViaLayerRule * getViaLayerRule(uint32_t idx) const
static dbTechViaGenerateRule * getTechViaGenerateRule(dbTech *tech, uint32_t oid)
std::string getName() const
static dbTechViaGenerateRule * create(dbTech *tech, const char *name, bool is_default)
uint32_t getViaLayerRuleCount() const
void setSpacing(int x_spacing, int y_spacing)
static dbTechViaLayerRule * create(dbTech *tech, dbTechViaGenerateRule *rule, dbTechLayer *layer)
bool hasEnclosure() const
void getWidth(int &minWidth, int &maxWidth) const
void setEnclosure(int overhang1, int overhang2)
void setWidth(int minWidth, int maxWidth)
int getMetalOverhang() const
static dbTechViaLayerRule * create(dbTech *tech, dbTechViaRule *rule, dbTechLayer *layer)
void getEnclosure(int &overhang1, int &overhang2) const
void getRect(Rect &r) const
static dbTechViaLayerRule * getTechViaLayerRule(dbTech *tech, uint32_t oid)
void setResistance(double r)
bool hasOverhang() const
void setOverhang(int overhang)
dbTechLayerDir getDirection() const
bool hasResistance() const
double getResistance() const
dbTechLayer * getLayer() const
void setMetalOverhang(int overhang)
void setDirection(dbTechLayerDir dir)
void setRect(const Rect &r)
bool hasMetalOverhang() const
void getSpacing(int &x_spacing, int &y_spacing) const
std::string getName() const
dbTechViaLayerRule * getViaLayerRule(uint32_t idx) const
static dbTechViaRule * getTechViaRule(dbTech *tech, uint32_t oid)
static dbTechViaRule * create(dbTech *tech, const char *name)
void addVia(dbTechVia *via)
uint32_t getViaCount() const
dbTechVia * getVia(uint32_t idx) const
uint32_t getViaLayerRuleCount() const
dbViaParams getViaParams() const
void setViaParams(const dbViaParams &params)
static dbTechVia * clone(dbTechNonDefaultRule *rule, dbTechVia *invia_, const char *new_name)
dbTechViaGenerateRule * getViaGenerateRule() const
bool isDefault() const
void setTopOfStack()
void setViaGenerateRule(dbTechViaGenerateRule *rule)
dbSet< dbBox > getBoxes() const
void setPattern(const char *pattern)
void setResistance(double res)
dbTech * getTech() const
dbBox * getBBox() const
static dbTechVia * create(dbTechNonDefaultRule *rule, const char *name)
dbTechNonDefaultRule * getNonDefaultRule() const
bool hasParams() const
static dbTechVia * create(dbTech *tech, const char *name)
bool isTopOfStack() const
double getResistance() const
dbTechLayer * getTopLayer() const
dbTechLayer * getBottomLayer() const
const char * getConstName() const
std::string getName() const
std::string getPattern() const
static dbTechVia * getTechVia(dbTech *tech, uint32_t oid)
dbTechVia * findVia(const char *name) const
dbClMeasureType getClearanceMeasure() const
void setLefUnits(int units)
bool hasUseMinSpacingPin() const
dbTechLayer * findLayer(int layer_number) const
int getDbUnitsPerMicron() const
void setNamesCaseSensitive(dbOnOffType intyp)
int getLefUnits() const
std::string getName() const
dbSet< dbCellEdgeSpacing > getCellEdgeSpacingTable() const
dbTechLayer * firstBacksideRoutingLayer() const
void setUseMinSpacingPin(dbOnOffType inval)
void setClearanceMeasure(dbClMeasureType inmeas)
dbSet< dbTechViaGenerateRule > getViaGenerateRules() const
dbOnOffType getUseMinSpacingPin() const
dbTechNonDefaultRule * findNonDefaultRule(const char *rulename) const
dbSet< dbTechVia > getVias() const
dbOnOffType getUseMinSpacingObs() const
double getLefVersion() const
PtrMap< dbTechLayer, dbTechVia * > getDefaultVias() const
dbTechLayer * firstFrontsideRoutingLayer() const
bool hasNoWireExtAtPin() const
bool hasManufacturingGrid() const
int getRoutingLayerCount() const
void setNoWireExtAtPin(dbOnOffType intyp)
dbTechSameNetRule * findSameNetRule(dbTechLayer *l1, dbTechLayer *l2) const
dbSet< dbMetalWidthViaMap > getMetalWidthViaMap() const
static dbTech * getTech(dbDatabase *db, uint32_t oid)
void setManufacturingGrid(int ingrd)
int getLayerCount() const
dbOnOffType getNoWireExtAtPin() const
int getViaCount() const
void setLefVersion(double inver)
static dbTech * create(dbDatabase *db, const char *name)
dbOnOffType getNamesCaseSensitive() const
void checkLayer(bool typeChk, bool widthChk, bool pitchChk, bool spacingChk) const
dbSet< dbTechViaRule > getViaRules() const
void setUseMinSpacingObs(dbOnOffType inval)
int getManufacturingGrid() const
bool hasClearanceMeasure() const
static void destroy(dbTech *tech)
dbTechViaGenerateRule * findViaGenerateRule(const char *name) const
std::string getLefVersionStr() const
dbSet< dbTechLayer > getLayers() const
dbTechLayer * findLayer(const char *name) const
dbTechLayer * findRoutingLayer(int level_number) const
bool hasUseMinSpacingObs() const
dbTechViaRule * findViaRule(const char *name) const
void getSameNetRules(std::vector< dbTechSameNetRule * > &rules) const
dbSet< dbTechNonDefaultRule > getNonDefaultRules() const
void getGridPatternX(int i, int &origin_x, int &line_count, int &step, int &first_mask, bool &samemask) const
static void destroy(dbTrackGrid *grid_)
void getGridPatternY(int i, int &origin_y, int &line_count, int &step, int &first_mask, bool &samemask) const
void addGridPatternX(int origin_x, int line_count, int step, int first_mask=0, bool samemask=false)
void getAverageTrackSpacing(int &track_step, int &track_init, int &num_tracks) const
const std::vector< int > & getGridX() const
int getNumGridPatternsX() const
int getNumGridPatternsY() const
void addGridPatternY(int origin_y, int line_count, int step, int first_mask=0, bool samemask=false)
void getGridPatternY(int i, int &origin_y, int &line_count, int &step) const
dbTechLayer * getTechLayer() const
static dbTrackGrid * getTrackGrid(dbBlock *block, uint32_t oid)
void getGridX(std::vector< int > &x_grid) const
void getGridPatternX(int i, int &origin_x, int &line_count, int &step) const
void getGridY(std::vector< int > &y_grid) const
const std::vector< int > & getGridY() const
static dbTrackGrid * create(dbBlock *block, dbTechLayer *layer)
dbBlock * getBlock() const
dbChipBumpInst * getChipBumpInst() const
Point3D getGlobalPosition() const
dbUnfoldedChipRegionInst * getParentRegion() const
dbUnfoldedChipRegionInst * getBottomRegion() const
dbChipConn * getChipConn() const
dbUnfoldedChipRegionInst * getTopRegion() const
const std::string & getName() const
Cuboid getCuboid() const
std::vector< dbChipInst * > getChipInstPath() const
dbTransform getTransform() const
dbSet< dbUnfoldedChipRegionInst > getRegions() const
dbUnfoldedChipRegionInst * findRegion(dbChipRegionInst *source) const
std::vector< dbUnfoldedChipBumpInst * > getConnectedBumps() const
dbChipNet * getChipNet() const
dbUnfoldedChipInst * getParentChip() const
EffectiveSide getEffectiveSide() const
dbSet< dbUnfoldedChipBumpInst > getBumps() const
dbChipRegionInst * getChipRegionInst() const
void setEffectiveSide(EffectiveSide side)
dbViaParams(const dbViaParams &p)=default
dbTechLayer * getTopLayer() const
void setXBottomOffset(int value)
int getYTopEnclosure() const
int getYCutSpacing() const
friend class dbVia
Definition db.h:7201
int getXOrigin() const
int getXCutSpacing() const
dbTechLayer * getBottomLayer() const
int getYOrigin() const
void setYBottomEnclosure(int value)
void setNumCutCols(int value)
void setYOrigin(int value)
int getXTopOffset() const
void setYCutSpacing(int value)
int getYTopOffset() const
void setXTopOffset(int value)
void setXOrigin(int value)
int getNumCutCols() const
dbViaParams(const _dbViaParams &p)
void setCutLayer(dbTechLayer *layer)
void setYTopOffset(int value)
int getYBottomEnclosure() const
void setXCutSize(int value)
void setBottomLayer(dbTechLayer *layer)
void setYTopEnclosure(int value)
int getXCutSize() const
friend class dbTechVia
Definition db.h:7202
void setTopLayer(dbTechLayer *layer)
int getYCutSize() const
dbTechLayer * getCutLayer() const
int getNumCutRows() const
void setXCutSpacing(int value)
void setYCutSize(int value)
void setYBottomOffset(int value)
void setNumCutRows(int value)
dbTech * _tech
Definition db.h:7199
int getYBottomOffset() const
void setXBottomEnclosure(int value)
int getXBottomOffset() const
int getXBottomEnclosure() const
int getXTopEnclosure() const
void setXTopEnclosure(int value)
dbViaParams getViaParams() const
dbTechVia * getTechVia() const
Returns nullptr if this via does not represent a tech via.
bool isViaRotated() const
dbOrientType getOrient() const
static dbVia * create(dbBlock *block, const char *name, dbTechVia *via, dbOrientType type)
dbTechViaGenerateRule * getViaGenerateRule() const
void setDefault(bool)
dbVia * getBlockVia() const
Returns nullptr if this via does not represent a block via.
void setViaGenerateRule(dbTechViaGenerateRule *rule)
bool isDefault() const
dbSet< dbBox > getBoxes() const
dbTechLayer * getBottomLayer() const
std::string getName() const
dbTechLayer * getTopLayer() const
static bool copy(dbBlock *dst, dbBlock *src)
dbBlock * getBlock() const
std::string getPattern() const
bool hasParams() const
static dbVia * create(dbBlock *block, const char *name, dbVia *via, dbOrientType type)
void setViaParams(const dbViaParams &params)
static dbVia * getVia(dbBlock *block, uint32_t oid)
const char * getConstName() const
static dbVia * create(dbBlock *block, const char *name)
dbBox * getBBox() const
void setPattern(const char *pattern)
static dbVia * copy(dbBlock *dst, dbVia *src)
Copy the VIA to the dst-block.
void append(dbWire *wire, bool singleSegmentWire=false)
dbNet * getNet() const
uint32_t count() const
void setNormalizedConnectivity(bool normalized_connectivity)
bool getViaBoxes(int via_shape_id, std::vector< dbShape > &shapes) const
bool getNextVia(int shape_id, dbShape &shape) const
static dbWire * getWire(dbBlock *block, uint32_t oid)
int getData(int idx) const
static dbWire * create(dbBlock *block, bool global_wire=false)
uint64_t getLength() const
bool isGlobalWire() const
std::optional< Rect > getBBox() const
uint32_t getTermShapeJunctionId(int term_id) const
dbBlock * getBlock() const
unsigned char getOpcode(int idx) const
void attach(dbNet *net)
friend class dbNet
Definition db.h:3870
static void destroy(dbWire *wire)
void addOneSeg(unsigned char op, int value, uint32_t jj, int *did, dbRSeg **new_rsegs)
static dbWire * create(dbNet *net, bool global_wire=false)
void getSegment(int segment_id, dbShape &shape) const
void addOneSeg(unsigned char op, int value)
bool getProperty(int jid, int &property) const
bool hasNormalizedConnectivity() const
void detach()
uint32_t length() const
void getShape(int shape_id, dbShape &shape) const
bool setProperty(int jid, int property)
bool getPrevVia(int shape_id, dbShape &shape) const
Point getCoord(int jid) const
void getSegment(int segment_id, dbTechLayer *layer, dbShape &shape) const
constexpr const char * kDefaultBufBaseName
Definition db.h:33
constexpr int ADS_MAX_CORNER
Definition db.h:32
constexpr const char * kDefaultNetBaseName
Definition db.h:34
Definition db.h:40
Definition db.h:36
std::vector< dbBTerm * > bterms
Definition db.h:617
std::vector< dbChipInst * > chip_inst_path
Definition db.h:7671
dbChipRegionInst * region
Definition db.h:7672
std::string boolean_expression
Definition db.h:9181
std::string input_supply_port
Definition db.h:9180
std::variant< dbBTerm *, dbITerm * > scan_out
Definition db.h:9317
std::variant< dbBTerm *, dbITerm * > scan_in
Definition db.h:9316
dbOrientType orientation
Definition db.h:5374
friend bool operator==(const OrientedSite &lhs, const OrientedSite &rhs)
friend bool operator!=(const OrientedSite &lhs, const OrientedSite &rhs)
const std::vector< double > & ratios
Definition db.h:6811
const std::vector< double > & indices
Definition db.h:6810