Skip to content

Commit

Permalink
Merge branch 'master' into grt_delete_FrNet
Browse files Browse the repository at this point in the history
  • Loading branch information
arthurjolo committed Dec 7, 2023
2 parents f1ccd52 + aae7fc8 commit abd7faa
Show file tree
Hide file tree
Showing 27 changed files with 184 additions and 227 deletions.
6 changes: 3 additions & 3 deletions src/dpl/src/Opendp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -744,18 +744,18 @@ int Opendp::gridEndX(const Cell* cell) const

int Opendp::gridEndY(const Cell* cell) const
{
return gridEndY(cell->y_, cell);
return gridEndY(cell->y_ + cell->height_, cell);
}

int Opendp::gridEndY(int y, const Cell* cell) const
{
if (cell->isHybrid()) {
auto grid_info = getGridInfo(cell);
const auto& grid_sites = grid_info.getSites();
return gridY(y + cell->height_, grid_sites).first;
return gridY(y, grid_sites).first;
}
int row_height = getRowHeight(cell);
return divCeil(y + cell->height_, row_height);
return divCeil(y, row_height);
}

double Opendp::dbuToMicrons(int64_t dbu) const
Expand Down
1 change: 1 addition & 0 deletions src/drt/src/io/io.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3204,6 +3204,7 @@ void io::Writer::updateDbConn(odb::dbBlock* block,
}
}
_wire_encoder.end();
net->setWireOrdered(false);
}
}
}
Expand Down
6 changes: 4 additions & 2 deletions src/gpl/src/replace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -482,8 +482,10 @@ void Replace::setUniformTargetDensityMode(bool mode)
float Replace::getUniformTargetDensity()
{
// TODO: update to be compatible with multiple target densities
initNesterovPlace();
return nbVec_[0]->uniformTargetDensity();
if (initNesterovPlace()) {
return nbVec_[0]->uniformTargetDensity();
}
return 1;
}

void Replace::setInitDensityPenalityFactor(float penaltyFactor)
Expand Down
3 changes: 3 additions & 0 deletions src/ppl/include/ppl/IOPlacer.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@

#pragma once

#include <map>
#include <memory>
#include <set>
#include <unordered_map>
Expand Down Expand Up @@ -268,6 +269,7 @@ class IOPlacer
double dbuToMicrons(int64_t dbu);
int micronsToDbu(double microns);
Edge getMirroredEdge(const Edge& edge);
int computeRegionIncrease(const Interval& interval, int num_pins);

// db functions
void populateIOPlacer(const std::set<int>& hor_layer_idx,
Expand All @@ -293,6 +295,7 @@ class IOPlacer
// router
const int num_tracks_offset_ = 15;
const int pins_per_report_ = 5;
const int default_min_dist_ = 2;

std::vector<Interval> excluded_intervals_;
std::vector<Constraint> constraints_;
Expand Down
62 changes: 32 additions & 30 deletions src/ppl/src/Core.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@

#pragma once

#include <map>

#include "odb/geom.h"

namespace ppl {
Expand All @@ -47,16 +49,16 @@ class Core
public:
Core();
Core(const Rect& boundary,
const std::vector<int>& min_dst_pins_x,
const std::vector<int>& min_dst_pins_y,
const std::vector<int>& init_tracks_x,
const std::vector<int>& init_tracks_y,
const std::vector<int>& num_tracks_x,
const std::vector<int>& num_tracks_y,
const std::vector<int>& min_area_x,
const std::vector<int>& min_area_y,
const std::vector<int>& min_width_x,
const std::vector<int>& min_width_y,
const std::map<int, int>& min_dst_pins_x,
const std::map<int, int>& min_dst_pins_y,
const std::map<int, int>& init_tracks_x,
const std::map<int, int>& init_tracks_y,
const std::map<int, int>& num_tracks_x,
const std::map<int, int>& num_tracks_y,
const std::map<int, int>& min_area_x,
const std::map<int, int>& min_area_y,
const std::map<int, int>& min_width_x,
const std::map<int, int>& min_width_y,
const int& database_unit)
: boundary_(boundary),
min_dst_pins_x_(min_dst_pins_x),
Expand All @@ -74,32 +76,32 @@ class Core
}

Rect getBoundary() const { return boundary_; }
std::vector<int> getMinDstPinsX() const { return min_dst_pins_x_; }
std::vector<int> getMinDstPinsY() const { return min_dst_pins_y_; }
std::vector<int> getInitTracksX() const { return init_tracks_x_; }
std::vector<int> getInitTracksY() const { return init_tracks_y_; }
std::vector<int> getNumTracksX() const { return num_tracks_x_; }
std::vector<int> getNumTracksY() const { return num_tracks_y_; }
std::vector<int> getMinAreaX() const { return min_area_x_; }
std::vector<int> getMinAreaY() const { return min_area_y_; }
std::vector<int> getMinWidthX() const { return min_width_x_; }
std::vector<int> getMinWidthY() const { return min_width_y_; }
std::map<int, int> getMinDstPinsX() const { return min_dst_pins_x_; }
std::map<int, int> getMinDstPinsY() const { return min_dst_pins_y_; }
std::map<int, int> getInitTracksX() const { return init_tracks_x_; }
std::map<int, int> getInitTracksY() const { return init_tracks_y_; }
std::map<int, int> getNumTracksX() const { return num_tracks_x_; }
std::map<int, int> getNumTracksY() const { return num_tracks_y_; }
std::map<int, int> getMinAreaX() const { return min_area_x_; }
std::map<int, int> getMinAreaY() const { return min_area_y_; }
std::map<int, int> getMinWidthX() const { return min_width_x_; }
std::map<int, int> getMinWidthY() const { return min_width_y_; }
int getDatabaseUnit() const { return database_unit_; }
int getPerimeter() const;
odb::Point getMirroredPosition(const odb::Point& position) const;

private:
Rect boundary_;
std::vector<int> min_dst_pins_x_;
std::vector<int> min_dst_pins_y_;
std::vector<int> init_tracks_x_;
std::vector<int> init_tracks_y_;
std::vector<int> num_tracks_x_;
std::vector<int> num_tracks_y_;
std::vector<int> min_area_x_;
std::vector<int> min_area_y_;
std::vector<int> min_width_x_;
std::vector<int> min_width_y_;
std::map<int, int> min_dst_pins_x_;
std::map<int, int> min_dst_pins_y_;
std::map<int, int> init_tracks_x_;
std::map<int, int> init_tracks_y_;
std::map<int, int> num_tracks_x_;
std::map<int, int> num_tracks_y_;
std::map<int, int> min_area_x_;
std::map<int, int> min_area_y_;
std::map<int, int> min_width_x_;
std::map<int, int> min_width_y_;
int database_unit_;
};

Expand Down
Loading

0 comments on commit abd7faa

Please sign in to comment.