Skip to content

Commit

Permalink
Merge pull request The-OpenROAD-Project#5736 from The-OpenROAD-Projec…
Browse files Browse the repository at this point in the history
…t-staging/odb-site-int

odb: use int for dbSite getWidth & getHeight
  • Loading branch information
maliberty authored Sep 12, 2024
2 parents 55c3345 + 3a6ca89 commit 057382f
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions src/dpo/src/Optdp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -694,12 +694,12 @@ void Optdp::createArchitecture()

odb::Rect dieRect = block->getDieArea();

odb::uint min_row_height = std::numeric_limits<odb::uint>::max();
auto min_row_height = std::numeric_limits<int>::max();
for (dbRow* row : block->getRows()) {
min_row_height = std::min(min_row_height, row->getSite()->getHeight());
}

std::map<odb::uint, std::unordered_set<std::string>> skip_list;
std::map<int, std::unordered_set<std::string>> skip_list;

for (dbRow* row : block->getRows()) {
if (row->getSite()->getClass() == odb::dbSiteClass::PAD) {
Expand Down
8 changes: 4 additions & 4 deletions src/odb/include/odb/db.h
Original file line number Diff line number Diff line change
Expand Up @@ -5362,22 +5362,22 @@ class dbSite : public dbObject
///
/// Get the width of this site
///
uint getWidth();
int getWidth();

///
/// Set the width of this site
///
void setWidth(uint width);
void setWidth(int width);

///
/// Get the height of this site
///
uint getHeight() const;
int getHeight() const;

///
/// Set the height of this site
///
void setHeight(uint height);
void setHeight(int height);

///
/// Get the class of this site.
Expand Down
8 changes: 4 additions & 4 deletions src/odb/src/db/dbSite.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -202,25 +202,25 @@ const char* dbSite::getConstName()
return site->_name;
}

uint dbSite::getWidth()
int dbSite::getWidth()
{
_dbSite* site = (_dbSite*) this;
return site->_width;
}

void dbSite::setWidth(uint w)
void dbSite::setWidth(int w)
{
_dbSite* site = (_dbSite*) this;
site->_width = w;
}

uint dbSite::getHeight() const
int dbSite::getHeight() const
{
_dbSite* site = (_dbSite*) this;
return site->_height;
}

void dbSite::setHeight(uint h)
void dbSite::setHeight(int h)
{
_dbSite* site = (_dbSite*) this;
site->_height = h;
Expand Down
4 changes: 2 additions & 2 deletions src/odb/src/db/dbSite.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ class _dbSite : public _dbObject
// PERSISTANT-MEMBERS
dbSiteFlags _flags;
char* _name;
uint _height;
uint _width;
int _height;
int _width;
dbId<_dbSite> _next_entry;
dbVector<OrientedSiteInternal> _row_pattern;

Expand Down
6 changes: 3 additions & 3 deletions src/pad/src/ICeWall.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -399,9 +399,9 @@ void ICeWall::makeIORow(odb::dbSite* horizontal_site,
corner_origins.yMax() / dbus);

// Create corners
const int corner_sites = std::max(static_cast<uint>(horizontal_box.maxDXDY()),
corner_site->getWidth())
/ corner_site->getWidth();
const int corner_sites
= std::max(horizontal_box.maxDXDY(), corner_site->getWidth())
/ corner_site->getWidth();
debugPrint(logger_,
utl::PAD,
"Rows",
Expand Down

0 comments on commit 057382f

Please sign in to comment.