Skip to content

Commit

Permalink
Merge branch 'master' into mpl2-constraints
Browse files Browse the repository at this point in the history
Signed-off-by: Arthur Koucher <arthurkoucher@precisioninno.com>
  • Loading branch information
AcKoucher committed Nov 14, 2024
2 parents 1f4f8a3 + d34d2ba commit 575c168
Show file tree
Hide file tree
Showing 99 changed files with 22,704 additions and 14,967 deletions.
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ def getParallelTests(String image) {

'Compile with C++20': {
node {
docker.image('openroad/ubuntu-cpp20').inside('--user=root --privileged -v /var/run/docker.sock:/var/run/docker.sock') {
docker.image(image).inside('--user=root --privileged -v /var/run/docker.sock:/var/run/docker.sock') {
stage('Setup C++20 Compile') {
sh label: 'Configure git', script: "git config --system --add safe.directory '*'";
checkout scm;
Expand Down
26 changes: 0 additions & 26 deletions docker/Dockerfile.cpp20

This file was deleted.

8 changes: 8 additions & 0 deletions etc/DependencyInstaller.sh
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,9 @@ _installCI() {
apt-transport-https \
ca-certificates \
curl \
gnupg \
jq \
lsb-release \
parallel \
software-properties-common

Expand Down Expand Up @@ -696,6 +698,12 @@ _installCI() {
docker-ce-cli \
containerd.io \
docker-buildx-plugin

# Install clang for C++20 support
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
./llvm.sh 16 all

}

_checkIsLocal() {
Expand Down
1 change: 1 addition & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,7 @@ if (NOT USE_SYSTEM_OPENSTA)
if (TCL_READLINE_LIBRARY AND TCL_READLINE_H)
# Pass along tcl readline enablement to OpenSTA build
set(USE_TCL_READLINE ON)
set(CMAKE_POLICY_DEFAULT_CMP0077 NEW)
endif()
add_subdirectory(sta)
endif()
Expand Down
7 changes: 5 additions & 2 deletions src/Main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ char** cmd_argv;
const char* log_filename = nullptr;
const char* metrics_filename = nullptr;
bool no_settings = false;
bool minimize = false;

static const char* init_filename = ".openroad";

Expand Down Expand Up @@ -267,6 +268,7 @@ int main(int argc, char* argv[])
}

no_settings = findCmdLineFlag(argc, argv, "-no_settings");
minimize = findCmdLineFlag(argc, argv, "-minimize");

cmd_argc = argc;
cmd_argv = argv;
Expand Down Expand Up @@ -412,7 +414,7 @@ static int tclAppInit(int& argc,
;
}

gui::startGui(argc, argv, interp, "", true, !no_settings);
gui::startGui(argc, argv, interp, "", true, !no_settings, minimize);
} else {
// init tcl
if (Tcl_Init(interp) == TCL_ERROR) {
Expand Down Expand Up @@ -554,14 +556,15 @@ static void showUsage(const char* prog, const char* init_filename)
{
printf("Usage: %s [-help] [-version] [-no_init] [-no_splash] [-exit] ", prog);
printf("[-gui] [-threads count|max] [-log file_name] [-metrics file_name] ");
printf("[-no_settings] cmd_file\n");
printf("[-no_settings] [-minimize] cmd_file\n");
printf(" -help show help and exit\n");
printf(" -version show version and exit\n");
printf(" -no_init do not read %s init file\n", init_filename);
printf(" -threads count|max use count threads\n");
printf(" -no_splash do not show the license splash at startup\n");
printf(" -exit exit after reading cmd_file\n");
printf(" -gui start in gui mode\n");
printf(" -minimize start the gui minimized\n");
printf(" -no_settings do not load the previous gui settings\n");
#ifdef ENABLE_PYTHON3
printf(
Expand Down
4 changes: 3 additions & 1 deletion src/dbSta/include/db_sta/dbNetwork.hh
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,8 @@ class dbNetwork : public ConcreteNetwork

bool ConnectionToModuleExists(dbITerm* source_pin,
dbModule* dest_module,
dbModBTerm*& dest_modbterm);
dbModBTerm*& dest_modbterm,
dbModITerm*& dest_moditerm);

void hierarchicalConnect(dbITerm* source_pin,
dbITerm* dest_pin,
Expand Down Expand Up @@ -268,6 +269,7 @@ class dbNetwork : public ConcreteNetwork

////////////////////////////////////////////////////////////////
// Port functions

Cell* cell(const Port* port) const override;
void registerConcretePort(const Port*);

Expand Down
40 changes: 36 additions & 4 deletions src/dbSta/src/dbNetwork.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2896,6 +2896,7 @@ class PinModuleConnection : public PinVisitor
const Pin* drvr_pin_;
const dbModule* target_module_;
dbModBTerm* dest_modbterm_;
dbModITerm* dest_moditerm_;
friend class dbNetwork;
};

Expand All @@ -2907,6 +2908,7 @@ PinModuleConnection::PinModuleConnection(const dbNetwork* nwk,
drvr_pin_ = drvr_pin;
target_module_ = target_module;
dest_modbterm_ = nullptr;
dest_moditerm_ = nullptr;
}

void PinModuleConnection::operator()(const Pin* pin)
Expand All @@ -2915,6 +2917,7 @@ void PinModuleConnection::operator()(const Pin* pin)
dbBTerm* bterm;
dbModBTerm* modbterm;
dbModITerm* moditerm;

db_network_->staToDb(pin, iterm, bterm, moditerm, modbterm);
(void) (iterm);
(void) (bterm);
Expand All @@ -2924,19 +2927,32 @@ void PinModuleConnection::operator()(const Pin* pin)
if (modbterm->getParent() == target_module_) {
dest_modbterm_ = modbterm;
}
} else if (modbterm) {
if (modbterm->getParent() == target_module_) {
dest_modbterm_ = modbterm;
}
dbModITerm* moditerm = modbterm->getParentModITerm();
if (moditerm->getParent()->getParent() == target_module_) {
dest_moditerm_ = moditerm;
}
}
}

bool dbNetwork::ConnectionToModuleExists(dbITerm* source_pin,
dbModule* dest_module,
dbModBTerm*& dest_modbterm)
dbModBTerm*& dest_modbterm,
dbModITerm*& dest_moditerm)
{
PinModuleConnection visitor(this, dbToSta(source_pin), dest_module);
network_->visitConnectedPins(dbToSta(source_pin), visitor);
if (visitor.dest_modbterm_ != nullptr) {
dest_modbterm = visitor.dest_modbterm_;
return true;
}
if (visitor.dest_moditerm_ != nullptr) {
dest_moditerm = visitor.dest_moditerm_;
return true;
}
return false;
}

Expand Down Expand Up @@ -2964,9 +2980,17 @@ void dbNetwork::hierarchicalConnect(dbITerm* source_pin,
dest_pin->connect(source_db_mod_net);
} else {
// Attempt to factor connection (minimize punch through)
dbModBTerm* dest_modbterm;
if (ConnectionToModuleExists(source_pin, dest_db_module, dest_modbterm)) {
dbModNet* dest_mod_net = dest_modbterm->getModNet();
//
dbModBTerm* dest_modbterm = nullptr;
dbModITerm* dest_moditerm = nullptr;
if (ConnectionToModuleExists(
source_pin, dest_db_module, dest_modbterm, dest_moditerm)) {
dbModNet* dest_mod_net = nullptr;
if (dest_modbterm) {
dest_mod_net = dest_modbterm->getModNet();
} else if (dest_moditerm) {
dest_mod_net = dest_moditerm->getModNet();
}
if (dest_mod_net) {
dest_pin->connect(dest_mod_net);
return;
Expand All @@ -2992,6 +3016,11 @@ void dbNetwork::hierarchicalConnect(dbITerm* source_pin,
= std::string(connection_name) + std::string("_o");
dbModBTerm* mod_bterm
= dbModBTerm::create(cur_module, connection_name_o.c_str());
if (!source_db_mod_net) {
source_db_mod_net
= dbModNet::create(source_db_module, connection_name_o.c_str());
}
source_pin->connect(source_db_mod_net);
mod_bterm->connect(source_db_mod_net);
mod_bterm->setIoType(dbIoType::OUTPUT);
mod_bterm->setSigType(dbSigType::SIGNAL);
Expand All @@ -3000,10 +3029,12 @@ void dbNetwork::hierarchicalConnect(dbITerm* source_pin,
dbModITerm* mod_iterm
= dbModITerm::create(parent_inst, connection_name_o.c_str());
mod_iterm->setChildModBTerm(mod_bterm);
mod_bterm->setParentModITerm(mod_iterm);
source_db_mod_net = dbModNet::create(cur_module, connection_name);
mod_iterm->connect(source_db_mod_net);
top_net = source_db_mod_net;
}

// make dest hierarchy
cur_module = dest_db_module;
while (cur_module != highest_common_module) {
Expand All @@ -3028,6 +3059,7 @@ void dbNetwork::hierarchicalConnect(dbITerm* source_pin,
dbModITerm* mod_iterm
= dbModITerm::create(parent_inst, connection_name_i.c_str());
mod_iterm->setChildModBTerm(mod_bterm);
mod_bterm->setParentModITerm(mod_iterm);
if (cur_module != highest_common_module) {
dest_db_mod_net = dbModNet::create(cur_module, connection_name);
mod_iterm->connect(dest_db_mod_net);
Expand Down
31 changes: 28 additions & 3 deletions src/dbSta/src/dbReadVerilog.cc
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,7 @@ void Verilog2db::makeDbModule(
dbModule* module = modinst->getMaster();
modbterm = module->findModBTerm(port_name_str.c_str());
moditerm->setChildModBTerm(modbterm);
modbterm->setParentModITerm(moditerm);

(void) moditerm;
debugPrint(logger_,
Expand Down Expand Up @@ -644,9 +645,9 @@ void Verilog2db::makeDbNets(const Instance* inst)
while (net_iter->hasNext()) {
Net* net = net_iter->next();
const char* net_name = network_->pathName(net);

if (is_top || !hasTerminals(net)) {
dbNet* db_net = dbNet::create(block_, net_name);

if (network_->isPower(net)) {
db_net->setSigType(odb::dbSigType::POWER);
}
Expand Down Expand Up @@ -716,14 +717,38 @@ void Verilog2db::makeVModNets(const Instance* inst, dbModInst* mod_inst)
std::unique_ptr<InstancePinIterator> pinIter{network_->pinIterator(inst)};
while (pinIter->hasNext()) {
Pin* inst_pin = pinIter->next();

Net* inst_pin_net = network_->net(inst_pin);

if (!inst_pin_net) {
continue;
}

dbModNet* upper_mod_net = constructModNet(inst_pin_net, parent_module);
(void) upper_mod_net;

dbModITerm* mod_iterm = nullptr;
dbModBTerm* mod_bterm = nullptr;
dbBTerm* bterm = nullptr;
dbITerm* iterm = nullptr;
staToDb(child_module, inst_pin, bterm, iterm, mod_bterm, mod_iterm);
if (mod_bterm) {
mod_iterm = mod_bterm->getParentModITerm();
if (mod_iterm) {
mod_iterm->connect(upper_mod_net);
}
}

// make sure any top level bterms are connected to this net too...
if (parent_module == block_->getTopModule()) {
NetConnectedPinIterator* pin_iter
= network_->connectedPinIterator(inst_pin_net);
while (pin_iter->hasNext()) {
const Pin* pin = pin_iter->next();
staToDb(parent_module, pin, bterm, iterm, mod_bterm, mod_iterm);
if (bterm) {
bterm->connect(upper_mod_net);
}
}
}

// push down inside the hierarchical instance to find any
// modnets connected on the inside of the instance
Expand Down
4 changes: 2 additions & 2 deletions src/drt/src/gc/FlexGC_cut.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -797,7 +797,7 @@ gtl::rectangle_data<frCoord> bloatRectangle(
gtl::rectangle_data<frCoord> temp_rect(rect);
gtl::bloat(temp_rect, dir, spacing);
return temp_rect;
};
}
gtl::polygon_90_set_data<frCoord> getQueryPolygonSet(
const gtl::rectangle_data<frCoord>& marker_rect,
const gtl::rectangle_data<frCoord>& rect1,
Expand All @@ -810,7 +810,7 @@ gtl::polygon_90_set_data<frCoord> getQueryPolygonSet(
query_polygon_set.insert(bloatRectangle(rect1, dir, spacing));
query_polygon_set.insert(bloatRectangle(rect2, dir, spacing));
return query_polygon_set;
};
}

} // namespace orth

Expand Down
16 changes: 16 additions & 0 deletions src/gui/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,22 @@ To close the GUI and return to the command-line:
gui::hide
```

### Minimize the GUI

To minimize the GUI window to an icon:

```tcl
gui::minimize
```

### Unminimize the GUI

To unminimize the GUI window from an icon:

```tcl
gui::unminimize
```

### Layout Fit

To fit the whole layout in the window:
Expand Down
5 changes: 4 additions & 1 deletion src/gui/include/gui/gui.h
Original file line number Diff line number Diff line change
Expand Up @@ -708,6 +708,8 @@ class Gui
void showGui(const std::string& cmds = "",
bool interactive = true,
bool load_settings = true);
void minimize();
void unminimize();

// set the system logger
void setLogger(utl::Logger* logger);
Expand Down Expand Up @@ -814,6 +816,7 @@ int startGui(int& argc,
Tcl_Interp* interp,
const std::string& script = "",
bool interactive = true,
bool load_settings = true);
bool load_settings = true,
bool minimize = false);

} // namespace gui
1 change: 1 addition & 0 deletions src/gui/src/drcWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ void DRCWidget::clicked(const QModelIndex& index)
} else {
Selected t = Gui::get()->makeSelected(marker);
emit selectDRC(t);
focusIndex(index);
}
} else {
if (item->hasChildren()) {
Expand Down
Loading

0 comments on commit 575c168

Please sign in to comment.