Skip to content

Commit c6e6ab6

Browse files
committed
Merge remote-tracking branch 'origin/master' into gui-fix-instance-loop
2 parents e4a843d + 728f450 commit c6e6ab6

File tree

135 files changed

+81598
-1718
lines changed

Some content is hidden

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

135 files changed

+81598
-1718
lines changed

.clang-tidy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ CheckOptions:
6565

6666
# All modules but sta
6767
# Exclude build as there is too much noise from swig generated code
68-
HeaderFilterRegex: "(?!build/.*)/(ant|cts|dbSta|dft|dpl|drt|dst|est|exa|fin|gpl|grt|gui|ifp|mpl|odb|ord|pad|par|pdn|ppl|psm|rcx|rmp|rsz|stt|tap|upf|utl)/.*"
68+
HeaderFilterRegex: "(?!build/.*)/(ant|cgt|cts|cut|dbSta|dft|dpl|drt|dst|est|exa|fin|gpl|grt|gui|ifp|mpl|odb|ord|pad|par|pdn|ppl|psm|rcx|ram|rmp|rsz|stt|tap|upf|utl)/.*"
6969

7070
# Not currently handling identifier naming
7171
# WarningsAsErrors: "*"

.github/workflows/github-actions-format-on-push.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
fetch-depth: 0
1919
- name: Get changed files
2020
id: changed-files
21-
uses: tj-actions/changed-files@v46
21+
uses: tj-actions/changed-files@v47
2222
- name: Check format of cpp changed files
2323
run: |
2424
clang-format --version

BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ OPENROAD_LIBRARY_DEPS = [
9090
"//src/pdn",
9191
"//src/ppl",
9292
"//src/psm",
93+
"//src/ram",
9394
"//src/rcx",
9495
"//src/rcx:ui",
9596
"//src/rmp",

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ save_flow_metrics_limits <TEST_NAME>
329329

330330
``` text
331331
openroad [-help] [-version] [-no_init] [-exit] [-gui]
332-
[-threads count|max] [-log file_name] cmd_file
332+
[-threads count|max] [-log file_name] [-db file_name] cmd_file
333333
-help show help and exit
334334
-version show version and exit
335335
-no_init do not read .openroad init file
@@ -339,6 +339,7 @@ openroad [-help] [-version] [-no_init] [-exit] [-gui]
339339
-gui start in gui mode
340340
-python start with python interpreter [limited to db operations]
341341
-log <file_name> write a log in <file_name>
342+
-db <file_name> open a .odb database at startup
342343
cmd_file source cmd_file
343344
```
344345

include/ord/OpenRoad.hh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,10 @@ namespace fin {
6464
class Finale;
6565
}
6666

67+
namespace ram {
68+
class RamGen;
69+
}
70+
6771
namespace exa {
6872
class Example;
6973
}
@@ -156,6 +160,7 @@ class OpenRoad
156160
dbVerilogNetwork* getVerilogNetwork() { return verilog_network_; }
157161
dpl::Opendp* getOpendp() { return opendp_; }
158162
fin::Finale* getFinale() { return finale_; }
163+
ram::RamGen* getRamGen() { return ram_gen_; }
159164
tap::Tapcell* getTapcell() { return tapcell_; }
160165
mpl::MacroPlacer* getMacroPlacer() { return macro_placer_; }
161166
exa::Example* getExample() { return example_; }
@@ -255,6 +260,7 @@ class OpenRoad
255260
ppl::IOPlacer* ioPlacer_ = nullptr;
256261
dpl::Opendp* opendp_ = nullptr;
257262
fin::Finale* finale_ = nullptr;
263+
ram::RamGen* ram_gen_ = nullptr;
258264
mpl::MacroPlacer* macro_placer_ = nullptr;
259265
exa::Example* example_ = nullptr;
260266
grt::GlobalRouter* global_router_ = nullptr;

src/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,7 @@ add_subdirectory(gpl)
263263
add_subdirectory(dpl)
264264
add_subdirectory(exa)
265265
add_subdirectory(fin)
266+
add_subdirectory(ram)
266267
add_subdirectory(ppl)
267268
add_subdirectory(rmp)
268269
add_subdirectory(cgt)
@@ -326,6 +327,7 @@ target_link_libraries(openroad
326327
dpl
327328
exa
328329
fin
330+
ram
329331
rsz
330332
ppl
331333
stt
@@ -422,6 +424,7 @@ if (Python3_FOUND AND BUILD_PYTHON)
422424
cts_py
423425
drt_py
424426
fin_py
427+
# ram_py
425428
rcx_py
426429
rmp_py
427430
stt_py

src/Main.cc

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ int cmd_argc;
8888
char** cmd_argv;
8989
static const char* log_filename = nullptr;
9090
static const char* metrics_filename = nullptr;
91+
static const char* read_odb_filename = nullptr;
9192
static bool no_settings = false;
9293
static bool minimize = false;
9394

@@ -243,6 +244,7 @@ int main(int argc, char* argv[])
243244
std::filesystem::remove(metrics_filename, err_ignored);
244245
}
245246

247+
read_odb_filename = findCmdLineKey(argc, argv, "-db");
246248
no_settings = findCmdLineFlag(argc, argv, "-no_settings");
247249
minimize = findCmdLineFlag(argc, argv, "-minimize");
248250

@@ -449,6 +451,21 @@ static int tclAppInit(int& argc,
449451

450452
const bool gui_enabled = gui::Gui::enabled();
451453

454+
if (read_odb_filename) {
455+
std::string cmd = fmt::format("read_db {{{}}}", read_odb_filename);
456+
if (!gui_enabled) {
457+
if (Tcl_Eval(interp, cmd.c_str()) != TCL_OK) {
458+
fprintf(stderr,
459+
"Error: failed to read_db %s: %s\n",
460+
read_odb_filename,
461+
Tcl_GetStringResult(interp));
462+
exit(1);
463+
}
464+
} else {
465+
gui::Gui::get()->addRestoreStateCommand(cmd);
466+
}
467+
}
468+
452469
const char* home = getenv("HOME");
453470
if (!findCmdLineFlag(argc, argv, "-no_init") && home) {
454471
const char* restore_state_cmd = "include -echo -verbose {{{}}}";
@@ -525,7 +542,7 @@ static void showUsage(const char* prog, const char* init_filename)
525542
{
526543
printf("Usage: %s [-help] [-version] [-no_init] [-no_splash] [-exit] ", prog);
527544
printf("[-gui] [-threads count|max] [-log file_name] [-metrics file_name] ");
528-
printf("[-no_settings] [-minimize] cmd_file\n");
545+
printf("[-db file_name] [-no_settings] [-minimize] cmd_file\n");
529546
printf(" -help show help and exit\n");
530547
printf(" -version show version and exit\n");
531548
printf(" -no_init do not read %s init file\n", init_filename);
@@ -543,6 +560,7 @@ static void showUsage(const char* prog, const char* init_filename)
543560
printf(" -log <file_name> write a log in <file_name>\n");
544561
printf(
545562
" -metrics <file_name> write metrics in <file_name> in JSON format\n");
563+
printf(" -db <file_name> open a .odb database at startup\n");
546564
printf(" cmd_file source cmd_file\n");
547565
}
548566

src/OpenRoad.cc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@
6767
#include "ppl/MakeIoplacer.h"
6868
#include "psm/MakePDNSim.hh"
6969
#include "psm/pdnsim.h"
70+
#include "ram/MakeRam.h"
71+
#include "ram/ram.h"
7072
#include "rcx/MakeOpenRCX.h"
7173
#include "rcx/ext.h"
7274
#include "rmp/MakeRestructure.h"
@@ -135,6 +137,7 @@ OpenRoad::~OpenRoad()
135137
delete replace_;
136138
delete pdnsim_;
137139
delete finale_;
140+
delete ram_gen_;
138141
delete antenna_checker_;
139142
odb::dbDatabase::destroy(db_);
140143
delete partitionMgr_;
@@ -220,6 +223,7 @@ void OpenRoad::init(Tcl_Interp* tcl_interp,
220223
opendp_,
221224
estimate_parasitics_);
222225
finale_ = new fin::Finale(db_, logger_);
226+
ram_gen_ = new ram::RamGen(getDbNetwork(), db_, logger_);
223227
restructure_ = new rmp::Restructure(
224228
logger_, sta_, db_, resizer_, estimate_parasitics_);
225229
clock_gating_ = new cgt::ClockGating(logger_, sta_);
@@ -253,6 +257,7 @@ void OpenRoad::init(Tcl_Interp* tcl_interp,
253257
utl::evalTclInit(tcl_interp, ord::ord_tcl_inits);
254258

255259
utl::initLogger(tcl_interp);
260+
256261
// GUI first so we can register our sink with the logger
257262
gui::initGui(tcl_interp, db_, sta_, logger_);
258263
odb::initOdb(tcl_interp);
@@ -264,6 +269,7 @@ void OpenRoad::init(Tcl_Interp* tcl_interp,
264269
gpl::initReplace(tcl_interp);
265270
dpl::initOpendp(tcl_interp);
266271
fin::initFinale(tcl_interp);
272+
ram::initRamGen(tcl_interp);
267273
grt::initTcl(tcl_interp);
268274
cts::initTritonCts(tcl_interp);
269275
tap::initTapcell(tcl_interp);

src/cts/BUILD

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ cc_library(
1919
"src/CtsObserver.h",
2020
"src/HTreeBuilder.h",
2121
"src/LatencyBalancer.h",
22-
"src/LevelBalancer.h",
2322
"src/SinkClustering.h",
2423
"src/TreeBuilder.h",
2524
"src/Util.h",
@@ -41,7 +40,6 @@ cc_library(
4140
"src/CtsOptions.cpp",
4241
"src/HTreeBuilder.cpp",
4342
"src/LatencyBalancer.cpp",
44-
"src/LevelBalancer.cpp",
4543
"src/SinkClustering.cpp",
4644
"src/TechChar.cpp",
4745
"src/TreeBuilder.cpp",

src/cts/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ set_cts_config
151151
[-sink_clustering_levels levels]
152152
[-sink_clustering_max_diameter max_diameter]
153153
[-sink_clustering_size cluster_size]
154+
[-skip_nets <list_of_clk_nets_to_skip>]
154155
[-tree_buf <buf>]
155156
[-wire_unit wire_unit]
156157
```
@@ -176,6 +177,7 @@ set_cts_config
176177
| `-sink_clustering_max_diameter` | Specifies maximum diameter (in microns) of sink cluster for the register tree. The allowed values are integers `[0, MAX_INT]`. If this is not specified the diameter will be automatically chosen between `50, 100 or 200`, based on the tree buffer max cap. |
177178
| `-sink_clustering_size` | Specifies the maximum number of sinks per cluster for the register tree. The allowed values are integers `[0, MAX_INT]`. If this is not specified the size will be automatically chosen between `10, 20 or 30` based on the tree buffer max cap. |
178179
| `-sink_clustering_levels` | ... |
180+
| `-skip_nets` | Tcl list containing the clock nets to be skipped (e.g. `{net1, net2}`). If the net is a root clock net, the whole clock is skipped, otherwise only the subnet specified is skipped. |
179181
| `-wire_unit` | Minimum unit distance between buffers for a specific wire. If this parameter is omitted, the code gets the value from ten times the height of `-root_buffer`. |
180182

181183
### Report CTS configuration
@@ -208,6 +210,7 @@ reset_cts_config
208210
[-sink_clustering_levels]
209211
[-sink_clustering_max_diameter]
210212
[-sink_clustering_size]
213+
[-skip_nets]
211214
[-tree_buf]
212215
[-wire_unit]
213216
```

0 commit comments

Comments
 (0)