Skip to content

Commit 2ac698b

Browse files
committed
Remove all remaning uses of uint and use uint32_t instead.
Signed-off-by: Matt Liberty <[email protected]>
1 parent c357d17 commit 2ac698b

File tree

124 files changed

+6013
-5859
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

124 files changed

+6013
-5859
lines changed

src/ant/src/AntennaChecker.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ void AntennaChecker::Impl::initAntennaRules()
167167
const odb::dbTechLayerAntennaRule::pwl_pair diffPSR
168168
= antenna_rule->getDiffPSR();
169169

170-
uint wire_thickness_dbu = 0;
170+
uint32_t wire_thickness_dbu = 0;
171171
tech_layer->getThickness(wire_thickness_dbu);
172172

173173
const odb::dbTechLayerType layerType = tech_layer->getType();
@@ -492,7 +492,7 @@ void AntennaChecker::Impl::calculateAreas(
492492

493493
if (it.first->getRoutingLevel() != 0) {
494494
// Calculate side area of wire
495-
uint wire_thickness_dbu = 0;
495+
uint32_t wire_thickness_dbu = 0;
496496
it.first->getThickness(wire_thickness_dbu);
497497
double wire_thickness = block_->dbuToMicrons(wire_thickness_dbu);
498498
info.side_area = block_->dbuToMicrons(gtl::perimeter(node_it->pol)

src/cts/src/TreeBuilder.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#include <algorithm>
77
#include <cassert>
88
#include <cmath>
9+
#include <cstdint>
910
#include <limits>
1011
#include <string>
1112
#include <vector>
@@ -26,7 +27,7 @@ void TreeBuilder::mergeBlockages()
2627
namespace gtl = boost::polygon;
2728
using boost::polygon::operators::operator+=;
2829

29-
uint macros_max_dx = 0, macros_max_dy = 0;
30+
uint32_t macros_max_dx = 0, macros_max_dy = 0;
3031
odb::dbBlock* block = db_->getChip()->getBlock();
3132
gtl::polygon_90_set_data<int> blockage_polygons;
3233
// Add the macros into the polygon set

src/cts/src/TritonCTS.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1627,7 +1627,7 @@ void TritonCTS::writeClockNetsToDb(TreeBuilder* builder,
16271627
topClockInstInputPin->connect(topClockNet);
16281628
topClockNet->setSigType(odb::dbSigType::CLOCK);
16291629

1630-
std::map<int, odb::uint> fanoutcount;
1630+
std::map<int, int> fanoutcount;
16311631

16321632
// create subNets
16331633
numClkNets_ = 0;
@@ -1875,8 +1875,8 @@ int TritonCTS::getNetSpacing(odb::dbTechLayer* layer,
18751875
} else if (!layer->getV54SpacingRules().empty()) {
18761876
for (auto rule : layer->getV54SpacingRules()) {
18771877
if (rule->hasRange()) {
1878-
uint rmin;
1879-
uint rmax;
1878+
uint32_t rmin;
1879+
uint32_t rmax;
18801880
rule->getRange(rmin, rmax);
18811881
if (width1 < rmin || width2 > rmax) {
18821882
continue;

src/cut/src/blif.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#include "cut/blif.h"
55

66
#include <algorithm>
7+
#include <cstdint>
78
#include <fstream>
89
#include <iostream>
910
#include <iterator>
@@ -74,15 +75,15 @@ bool Blif::writeBlif(const char* file_name, bool write_arrival_requireds)
7475
}
7576

7677
std::set<odb::dbInst*>& insts = this->instances_to_optimize_;
77-
std::map<odb::uint, odb::dbInst*> instMap;
78+
std::map<uint32_t, odb::dbInst*> instMap;
7879
std::vector<std::string> subckts;
7980
std::set<std::string> inputs, outputs, const0, const1, clocks;
8081

8182
subckts.resize(insts.size());
8283
int instIndex = 0;
8384

8485
for (auto&& inst : insts) {
85-
instMap.insert(std::pair<odb::uint, odb::dbInst*>(inst->getId(), inst));
86+
instMap.insert(std::pair<uint32_t, odb::dbInst*>(inst->getId(), inst));
8687
}
8788

8889
for (auto&& inst : insts) {

src/dpl/src/infrastructure/network.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
#pragma once
55

6+
#include <cstdint>
67
#include <memory>
78
#include <string>
89
#include <unordered_map>
@@ -71,8 +72,8 @@ class Network
7172
public:
7273
std::vector<std::unique_ptr<Node>>& getNodes() { return nodes_; }
7374
int getNumNodes() const { return (int) nodes_.size(); }
74-
uint getNumCells() const { return cells_cnt_; }
75-
uint getNumTerminals() const { return terminals_cnt_; }
75+
uint32_t getNumCells() const { return cells_cnt_; }
76+
uint32_t getNumTerminals() const { return terminals_cnt_; }
7677
Node* getNode(int i) { return nodes_[i].get(); }
7778
Node* getNode(odb::dbInst* inst);
7879
Node* getNode(odb::dbBTerm* term);
@@ -130,8 +131,8 @@ class Network
130131
std::unordered_map<odb::dbBTerm*, int> term_to_node_idx_;
131132
std::unordered_map<odb::dbMaster*, int> master_to_idx_;
132133
std::unordered_map<odb::dbNet*, int> net_to_edge_idx_;
133-
uint cells_cnt_{0};
134-
uint terminals_cnt_{0};
134+
uint32_t cells_cnt_{0};
135+
uint32_t terminals_cnt_{0};
135136
};
136137

137138
} // namespace dpl

src/drt/src/dr/FlexDR.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -654,7 +654,7 @@ void FlexDR::reportIterationViolations() const
654654
getDesign()->getTopBlock()->getNumMarkers());
655655
if (getDesign()->getTopBlock()->getNumMarkers() > 0) {
656656
// report violations
657-
std::map<std::string, std::map<frLayerNum, uint>> violations;
657+
std::map<std::string, std::map<frLayerNum, uint32_t>> violations;
658658
std::set<frLayerNum> layers;
659659
const std::map<std::string, std::string> relabel
660660
= {{"Lef58SpacingEndOfLine", "EOL"},

src/drt/src/io/GuideProcessor.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#include <algorithm>
77
#include <cmath>
88
#include <cstddef>
9+
#include <cstdint>
910
#include <iterator>
1011
#include <limits>
1112
#include <map>
@@ -1605,7 +1606,7 @@ void GuidePathFinder::updateNodeMap(
16051606
void GuidePathFinder::clipGuides(std::vector<frRect>& rects)
16061607
{
16071608
for (auto& [pt, indices] : node_map_) {
1608-
const uint num_indices = indices.size();
1609+
const uint32_t num_indices = indices.size();
16091610
if (num_indices != 1) {
16101611
continue;
16111612
}
@@ -1648,7 +1649,7 @@ void GuidePathFinder::mergeGuides(std::vector<frRect>& rects)
16481649
};
16491650
for (auto& [pt, indices] : node_map_) {
16501651
std::vector<int> visited_indices = getVisitedIndices(indices, visited_);
1651-
const uint num_indices = visited_indices.size();
1652+
const uint32_t num_indices = visited_indices.size();
16521653
if (num_indices == 2) {
16531654
const auto first_idx = *(visited_indices.begin());
16541655
const auto second_idx = *std::prev(visited_indices.end());

src/drt/src/io/io.cpp

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#include <cassert>
88
#include <cmath>
99
#include <cstddef>
10+
#include <cstdint>
1011
#include <iterator>
1112
#include <limits>
1213
#include <list>
@@ -493,36 +494,36 @@ void io::Parser::getSBoxCoords(odb::dbSBox* box,
493494
int y1 = box->yMin();
494495
int x2 = box->xMax();
495496
int y2 = box->yMax();
496-
uint dx = box->getDX();
497-
uint dy = box->getDY();
498-
uint w;
497+
uint32_t dx = box->getDX();
498+
uint32_t dy = box->getDY();
499+
uint32_t w;
499500
switch (box->getDirection()) {
500501
case odb::dbSBox::UNDEFINED: {
501502
bool dx_even = ((dx & 1) == 0);
502503
bool dy_even = ((dy & 1) == 0);
503504
if (dx_even && dy_even) {
504505
if (dy < dx) {
505506
w = dy;
506-
uint dw = dy >> 1;
507+
uint32_t dw = dy >> 1;
507508
y1 += dw;
508509
y2 -= dw;
509510
assert(y1 == y2);
510511
} else {
511512
w = dx;
512-
uint dw = dx >> 1;
513+
uint32_t dw = dx >> 1;
513514
x1 += dw;
514515
x2 -= dw;
515516
assert(x1 == x2);
516517
}
517518
} else if (dx_even) {
518519
w = dx;
519-
uint dw = dx >> 1;
520+
uint32_t dw = dx >> 1;
520521
x1 += dw;
521522
x2 -= dw;
522523
assert(x1 == x2);
523524
} else if (dy_even) {
524525
w = dy;
525-
uint dw = dy >> 1;
526+
uint32_t dw = dy >> 1;
526527
y1 += dw;
527528
y2 -= dw;
528529
assert(y1 == y2);
@@ -533,15 +534,15 @@ void io::Parser::getSBoxCoords(odb::dbSBox* box,
533534
}
534535
case odb::dbSBox::HORIZONTAL: {
535536
w = dy;
536-
uint dw = dy >> 1;
537+
uint32_t dw = dy >> 1;
537538
y1 += dw;
538539
y2 -= dw;
539540
assert(y1 == y2);
540541
break;
541542
}
542543
case odb::dbSBox::VERTICAL: {
543544
w = dx;
544-
uint dw = dx >> 1;
545+
uint32_t dw = dx >> 1;
545546
x1 += dw;
546547
x2 -= dw;
547548
assert(x1 == x2);
@@ -2380,7 +2381,7 @@ void io::Parser::addRoutingLayer(odb::dbTechLayer* layer)
23802381
}
23812382

23822383
frCollection<frSpacingTableTwRowType> rowVals;
2383-
for (uint j = 0; j < layer->getTwoWidthsSpacingTableNumWidths(); ++j) {
2384+
for (uint32_t j = 0; j < layer->getTwoWidthsSpacingTableNumWidths(); ++j) {
23842385
frCoord width = layer->getTwoWidthsSpacingTableWidth(j);
23852386
frCoord prl = layer->getTwoWidthsSpacingTablePRL(j);
23862387
rowVals.push_back(frSpacingTableTwRowType(width, prl));
@@ -3996,7 +3997,7 @@ int io::TopLayerBTermHandler::countNetBTermsAboveMaxLayer(odb::dbNet* net)
39963997
bool io::TopLayerBTermHandler::netHasStackedVias(odb::dbNet* net)
39973998
{
39983999
int bterms_above_max_layer = countNetBTermsAboveMaxLayer(net);
3999-
uint wire_cnt = 0, via_cnt = 0;
4000+
uint32_t wire_cnt = 0, via_cnt = 0;
40004001
net->getWireCount(wire_cnt, via_cnt);
40014002

40024003
if (wire_cnt != 0 || via_cnt == 0) {

src/drt/test/gcTest.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2727
*/
2828

29+
#include <cstdint>
2930
#include <map>
3031
#include <memory>
3132
#include <tuple>
@@ -1260,8 +1261,8 @@ TEST_P(CutSpcTblFixture, cut_spc_tbl)
12601261
auto dbRule = odb::dbTechLayerCutSpacingTableDefRule::create(layer);
12611262
dbRule->setDefault(100);
12621263
dbRule->setVertical(true);
1263-
std::map<std::string, uint> row_map;
1264-
std::map<std::string, uint> col_map;
1264+
std::map<std::string, uint32_t> row_map;
1265+
std::map<std::string, uint32_t> col_map;
12651266
std::vector<std::vector<std::pair<int, int>>> table;
12661267
row_map["Vx/SIDE"] = 1;
12671268
row_map["Vx/END"] = 0;

src/grt/src/GlobalRouter.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3962,8 +3962,8 @@ std::vector<std::pair<int, int>> GlobalRouter::calcLayerPitches(int max_layer)
39623962
int minSpc = 0;
39633963
for (auto rule : layer->getV54SpacingRules()) {
39643964
if (rule->hasRange()) {
3965-
uint rmin;
3966-
uint rmax;
3965+
uint32_t rmin;
3966+
uint32_t rmax;
39673967
rule->getRange(rmin, rmax);
39683968
if (layer_width < rmin || layer_width > rmax) {
39693969
continue;
@@ -4465,11 +4465,11 @@ void GlobalRouter::findLayerExtensions(std::vector<int>& layer_extensions)
44654465
// PARALLELRUNLENGTH
44664466

44674467
if (obstruct_layer->hasTwoWidthsSpacingRules()) {
4468-
std::vector<std::vector<odb::uint>> spacing_table;
4468+
std::vector<std::vector<uint32_t>> spacing_table;
44694469
obstruct_layer->getTwoWidthsSpacingTable(spacing_table);
44704470
if (!spacing_table.empty()) {
4471-
std::vector<odb::uint> last_row = spacing_table.back();
4472-
odb::uint last_value = last_row.back();
4471+
std::vector<uint32_t> last_row = spacing_table.back();
4472+
uint32_t last_value = last_row.back();
44734473
if (last_value > spacing_extension) {
44744474
spacing_extension = last_value;
44754475
}
@@ -4726,7 +4726,7 @@ void GlobalRouter::findNetsObstructions(odb::Rect& die_area)
47264726
}
47274727

47284728
for (odb::dbNet* db_net : nets) {
4729-
odb::uint wire_cnt = 0, via_cnt = 0;
4729+
uint32_t wire_cnt = 0, via_cnt = 0;
47304730
db_net->getWireCount(wire_cnt, via_cnt);
47314731
if (wire_cnt == 0) {
47324732
continue;

0 commit comments

Comments
 (0)