Skip to content

Commit

Permalink
Merge branch 'master' into cts_enable_obstruction_aware
Browse files Browse the repository at this point in the history
  • Loading branch information
arthurjolo committed Jan 16, 2025
2 parents 29ac046 + d20db5d commit 6434582
Show file tree
Hide file tree
Showing 269 changed files with 277,587 additions and 224,051 deletions.
2 changes: 2 additions & 0 deletions docs/toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ entries:
title: Floorplan Initialization
- file: main/src/ppl/README
title: Pin Placement
- file: main/src/dft/README
title: Design for Test
- file: main/src/pad/README
title: Chip-level Connections
- file: main/src/mpl/README
Expand Down
2 changes: 0 additions & 2 deletions src/OpenRoad.i
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@
%{

#include "odb/db.h"
#include "odb/lefin.h"
#include "odb/defin.h"
#include "odb/defout.h"
#include "sta/Report.hh"
#include "sta/Network.hh"
Expand Down
1 change: 0 additions & 1 deletion src/Tech.cc
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@

#include "db_sta/dbSta.hh"
#include "odb/db.h"
#include "odb/lefin.h"
#include "ord/OpenRoad.hh"

namespace ord {
Expand Down
4 changes: 2 additions & 2 deletions src/ant/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ target_link_libraries(ant
PUBLIC
ant_lib
grt_lib
utl
utl_lib
OpenMP::OpenMP_CXX
)

Expand Down Expand Up @@ -96,7 +96,7 @@ if (Python3_FOUND AND BUILD_PYTHON)
odb
OpenSTA
grt
utl
utl_lib
)

endif()
24 changes: 20 additions & 4 deletions src/cts/src/TechChar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -821,8 +821,8 @@ void TechChar::collectSlewsLoadsFromTableAxis(sta::LibertyCell* libCell,
axisLoads.push_back((*loads)[i]);
}
}
} // if (gateModel)
} // for each arc
}
}

if (logger_->debugCheck(utl::CTS, "tech char", 2)) {
logger_->report("axis slews at {}", libCell->name());
Expand Down Expand Up @@ -1544,6 +1544,19 @@ unsigned TechChar::normalizeCharResults(float value,

void TechChar::create()
{
//
// Note that none of the techchar uses anything hierarchical.
// Techchar builds intermediate structures of (liberty) gates in a separate
// block Rather than register them as concrete we simply turn off hierarchy
// here so that the default (flat) dbNetwork apis are used
// during characterization. This pattern is likely to repeat
// whenever a "scratchpad" dbBlock and sta are created for characterizing
// structures.
//
bool is_hierarchical = db_network_->hasHierarchy();
if (is_hierarchical) {
db_network_->disableHierarchy();
}
// Setup of the attributes required to run the characterization.
initCharacterization();
long unsigned int topologiesCreated = 0;
Expand Down Expand Up @@ -1663,8 +1676,8 @@ void TechChar::create()
"Number of created patterns = {}.",
topologiesCreated);
}
} // for each slew
} // for each load
}
}
// If the solution is not a pure-wire, update the buffer topologies.
if (!solution.isPureWire) {
updateBufferTopologies(solution);
Expand All @@ -1688,6 +1701,9 @@ void TechChar::create()
printSolution();
}
odb::dbBlock::destroy(charBlock_);
if (is_hierarchical) {
db_network_->setHierarchy();
}
}

// Compute possible buffering solution combinations given #buffers and
Expand Down
2 changes: 1 addition & 1 deletion src/dbSta/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ target_link_libraries(dbSta
OpenSTA
odb
gui
utl
utl_lib
dbSta_lib
)

Expand Down
2 changes: 1 addition & 1 deletion src/dft/src/stitch/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ target_link_libraries(dft_stitch_lib
odb
dbSta
OpenSTA
utl
utl_lib
dft_cells_lib
dft_architect_lib
dft_utils_lib
Expand Down
6 changes: 6 additions & 0 deletions src/dpl/include/dpl/Opendp.h
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,12 @@ class Opendp
void addDecapMaster(dbMaster* decap_master, double decap_cap);
void insertDecapCells(double target, IRDropByPoint& psm_ir_drops);

// Get the instance adjacent to the left or right of a given instance
dbInst* getAdjacentInstance(dbInst* inst, bool left) const;

// Find a cluster of instances that are touching each other
std::vector<dbInst*> getAdjacentInstancesCluster(dbInst* inst) const;

private:
using bgPoint
= boost::geometry::model::d2::point_xy<int,
Expand Down
48 changes: 48 additions & 0 deletions src/dpl/src/Opendp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,54 @@ void Opendp::groupInitPixels2()
}
}

dbInst* Opendp::getAdjacentInstance(dbInst* inst, bool left) const
{
const Rect core = grid_->getCore();
const Rect inst_rect = inst->getBBox()->getBox();
DbuX x_dbu = left ? DbuX{inst_rect.xMin() - 1} : DbuX{inst_rect.xMax() + 1};
x_dbu -= core.xMin();
GridX x = grid_->gridX(x_dbu);

GridY y = grid_->gridSnapDownY(DbuY{inst_rect.yMin() - core.yMin()});

Pixel* pixel = grid_->gridPixel(x, y);

dbInst* adjacent_inst = nullptr;

// do not return macros, endcaps and tapcells
if (pixel != nullptr && pixel->cell && pixel->cell->db_inst_->isCore()) {
adjacent_inst = pixel->cell->db_inst_;
}

return adjacent_inst;
}

std::vector<dbInst*> Opendp::getAdjacentInstancesCluster(dbInst* inst) const
{
const bool left = true;
const bool right = false;
std::vector<dbInst*> adj_inst_cluster;

dbInst* left_inst = getAdjacentInstance(inst, left);
while (left_inst != nullptr) {
adj_inst_cluster.push_back(left_inst);
// the right instance can be ignored, since it was added in the line above
left_inst = getAdjacentInstance(left_inst, left);
}

std::reverse(adj_inst_cluster.begin(), adj_inst_cluster.end());
adj_inst_cluster.push_back(inst);

dbInst* right_inst = getAdjacentInstance(inst, right);
while (right_inst != nullptr) {
adj_inst_cluster.push_back(right_inst);
// the left instance can be ignored, since it was added in the line above
right_inst = getAdjacentInstance(right_inst, right);
}

return adj_inst_cluster;
}

/* static */
bool Opendp::isInside(const Rect& cell, const Rect& box)
{
Expand Down
2 changes: 1 addition & 1 deletion src/dpo/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ target_link_libraries(dpo
PRIVATE
odb
OpenSTA
utl
utl_lib
dpl_lib
)

Expand Down
4 changes: 2 additions & 2 deletions src/drt/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ target_link_libraries(drt
odb
stt
OpenSTA
utl
utl_lib
dst
dbSta
Threads::Threads
Expand Down Expand Up @@ -263,4 +263,4 @@ if (Python3_FOUND AND BUILD_PYTHON)

endif()

add_subdirectory(test)
add_subdirectory(test)
10 changes: 2 additions & 8 deletions src/drt/src/dr/FlexDR.h
Original file line number Diff line number Diff line change
Expand Up @@ -862,19 +862,13 @@ class FlexDRWorker
void modMinSpacingCostVia_eol(const Rect& box,
const Rect& tmpBx,
ModCostType type,
bool isUpperVia,
const drEolSpacingConstraint& drCon,
frMIdx i,
frMIdx j,
frMIdx z,
frMIdx idx,
bool ndr = false);
void modMinSpacingCostVia_eol_helper(const Rect& box,
const Rect& testBox,
ModCostType type,
bool isUpperVia,
frMIdx i,
frMIdx j,
frMIdx z,
frMIdx idx,
bool ndr = false);
// eolSpc
void modEolSpacingCost_helper(const Rect& testbox,
Expand Down
Loading

0 comments on commit 6434582

Please sign in to comment.