Skip to content

Commit 7930002

Browse files
authored
Merge pull request #8950 from The-OpenROAD-Project-staging/mpl-dbu
mpl: conversion from microns to dbu
2 parents 6f60c55 + cabd40a commit 7930002

Some content is hidden

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

50 files changed

+2986
-3205
lines changed

src/mpl/include/mpl/rtl_mp.h

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#include <vector>
1010

1111
#include "odb/db.h"
12+
#include "odb/geom.h"
1213
#include "utl/Logger.h"
1314

1415
namespace odb {
@@ -30,7 +31,6 @@ namespace mpl {
3031

3132
class HierRTLMP;
3233
class MplObserver;
33-
struct Rect;
3434

3535
class MacroPlacer
3636
{
@@ -51,12 +51,9 @@ class MacroPlacer
5151
int max_num_level,
5252
float coarsening_ratio,
5353
int large_net_threshold,
54-
float halo_width,
55-
float halo_height,
56-
float fence_lx,
57-
float fence_ly,
58-
float fence_ux,
59-
float fence_uy,
54+
int halo_width,
55+
int halo_height,
56+
odb::Rect global_fence,
6057
float area_weight,
6158
float outline_weight,
6259
float wirelength_weight,
@@ -80,7 +77,7 @@ class MacroPlacer
8077
std::vector<odb::dbInst*> findOverlappedMacros(odb::dbInst* macro);
8178

8279
void setMacroPlacementFile(const std::string& file_name);
83-
void addGuidanceRegion(odb::dbInst* macro, const Rect& region);
80+
void addGuidanceRegion(odb::dbInst* macro, odb::Rect region);
8481

8582
void setDebug(std::unique_ptr<MplObserver>& graphics);
8683
void setDebugShowBundledNets(bool show_bundled_nets);
@@ -94,7 +91,7 @@ class MacroPlacer
9491
utl::Logger* logger_ = nullptr;
9592
odb::dbDatabase* db_ = nullptr;
9693

97-
std::map<odb::dbInst*, Rect> guidance_regions_;
94+
std::map<odb::dbInst*, odb::Rect> guidance_regions_;
9895
};
9996

10097
} // namespace mpl

src/mpl/src/MplObserver.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@ class MplObserver
3737
virtual void finishedClustering(PhysicalHierarchy* tree) {}
3838

3939
virtual void setMaxLevel(int max_level) {}
40-
virtual void setMacroBlockages(const std::vector<mpl::Rect>& macro_blockages)
40+
virtual void setMacroBlockages(const std::vector<odb::Rect>& macro_blockages)
4141
{
4242
}
4343
virtual void setPlacementBlockages(
44-
const std::vector<mpl::Rect>& placement_blockages)
44+
const std::vector<odb::Rect>& placement_blockages)
4545
{
4646
}
4747
virtual void setBundledNets(const std::vector<BundledNet>& bundled_nets) {}
@@ -54,8 +54,8 @@ class MplObserver
5454
virtual void setCurrentCluster(Cluster* current_cluster) {}
5555

5656
virtual void setOutline(const odb::Rect& outline) {}
57-
virtual void setGuides(const std::map<int, Rect>& guides) {}
58-
virtual void setFences(const std::map<int, Rect>& fences) {}
57+
virtual void setGuides(const std::map<int, odb::Rect>& guides) {}
58+
virtual void setFences(const std::map<int, odb::Rect>& fences) {}
5959
virtual void setIOConstraintsMap(
6060
const ClusterToBoundaryRegionMap& io_cluster_to_constraint)
6161
{

src/mpl/src/SACoreHardMacro.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#include "mpl-util.h"
1313
#include "object.h"
1414
#include "odb/db.h"
15+
#include "odb/geom.h"
1516
#include "utl/Logger.h"
1617

1718
namespace mpl {
@@ -21,7 +22,7 @@ using utl::MPL;
2122
// Class SACoreHardMacro
2223
// constructors
2324
SACoreHardMacro::SACoreHardMacro(PhysicalHierarchy* tree,
24-
const Rect& outline,
25+
const odb::Rect& outline,
2526
const std::vector<HardMacro>& macros,
2627
const SACoreWeights& core_weights,
2728
// probability of each action
@@ -210,7 +211,7 @@ void SACoreHardMacro::initialize()
210211
// store current penalties
211212
width_list.push_back(width_);
212213
height_list.push_back(height_);
213-
area_penalty_list.push_back(width_ * height_);
214+
area_penalty_list.push_back(getAreaPenalty());
214215
outline_penalty_list.push_back(outline_penalty_);
215216
wirelength_list.push_back(wirelength_);
216217
guidance_penalty_list.push_back(guidance_penalty_);

src/mpl/src/SACoreHardMacro.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#include "mpl-util.h"
1212
#include "object.h"
1313
#include "odb/db.h"
14+
#include "odb/geom.h"
1415

1516
namespace utl {
1617
class Logger;
@@ -22,7 +23,7 @@ class SACoreHardMacro : public SimulatedAnnealingCore<HardMacro>
2223
{
2324
public:
2425
SACoreHardMacro(PhysicalHierarchy* tree,
25-
const Rect& outline,
26+
const odb::Rect& outline,
2627
const std::vector<HardMacro>& macros,
2728
const SACoreWeights& core_weights,
2829
// probability of each action

0 commit comments

Comments
 (0)