Skip to content

Commit 91c3200

Browse files
committed
Merge remote-tracking branch 'private/master' into gpl-binSize-float
2 parents 95a69dd + e13c66b commit 91c3200

19 files changed

Lines changed: 201 additions & 34 deletions

File tree

.bazelrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,4 +55,4 @@ build --incompatible_strict_action_env
5555
#build --remote_cache=https://storage.googleapis.com/megaboom-bazel-artifacts
5656
#build --remote_cache_compression=true
5757

58-
try-import %workspace$/user.bazelrc
58+
try-import %workspace%/user.bazelrc

Jenkinsfile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,20 @@ def getParallelTests(String image) {
224224
}
225225

226226
node {
227+
228+
def isDefaultBranch = (env.BRANCH_NAME == 'master')
229+
def daysToKeep = '20';
230+
def numToKeep = (isDefaultBranch ? '-1' : '10');
231+
232+
properties([
233+
buildDiscarder(logRotator(
234+
daysToKeepStr: daysToKeep,
235+
artifactDaysToKeepStr: daysToKeep,
236+
237+
numToKeepStr: numToKeep,
238+
artifactNumToKeepStr: numToKeep
239+
))
240+
]);
227241
stage('Checkout') {
228242
checkout scm;
229243
}

include/ord/InitOpenRoad.hh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,6 @@ namespace ord {
1212
// Call this inside of Tcl_Main.
1313
void initOpenRoad(Tcl_Interp* interp,
1414
const char* log_filename,
15-
const char* metrics_filename);
15+
const char* metrics_filename,
16+
bool batch_mode);
1617
} // namespace ord

include/ord/OpenRoad.hh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,8 @@ class OpenRoad
128128
static void setOpenRoad(OpenRoad* app, bool reinit_ok = false);
129129
void init(Tcl_Interp* tcl_interp,
130130
const char* log_filename,
131-
const char* metrics_filename);
131+
const char* metrics_filename,
132+
bool batch_mode);
132133

133134
Tcl_Interp* tclInterp() { return tcl_interp_; }
134135
utl::Logger* getLogger() { return logger_; }

src/Main.cc

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ FOREACH_TOOL(X)
102102
#undef X
103103

104104
#if PY_VERSION_HEX >= 0x03080000
105-
static void initPython(int argc, char* argv[])
105+
static void initPython(int argc, char* argv[], const bool exit_after_cmd_file)
106106
#else
107107
static void initPython()
108108
#endif
@@ -115,11 +115,10 @@ static void initPython()
115115
FOREACH_TOOL(X)
116116
#undef X
117117
#if PY_VERSION_HEX >= 0x03080000
118-
bool inspect = !findCmdLineFlag(argc, argv, "-exit");
119118
PyConfig config;
120119
PyConfig_InitPythonConfig(&config);
121120
PyConfig_SetBytesArgv(&config, argc, argv);
122-
config.inspect = inspect;
121+
config.inspect = !exit_after_cmd_file;
123122
Py_InitializeFromConfig(&config);
124123
PyConfig_Clear(&config);
125124
#else
@@ -294,7 +293,8 @@ int main(int argc, char* argv[])
294293
the_tech_and_design.design
295294
= std::make_unique<ord::Design>(the_tech_and_design.tech.get());
296295
ord::OpenRoad::setOpenRoad(the_tech_and_design.design->getOpenRoad());
297-
ord::initOpenRoad(interp, log_filename, metrics_filename);
296+
const bool exit = findCmdLineFlag(cmd_argc, cmd_argv, "-exit");
297+
ord::initOpenRoad(interp, log_filename, metrics_filename, exit);
298298
if (!findCmdLineFlag(cmd_argc, cmd_argv, "-no_splash")) {
299299
showSplash();
300300
}
@@ -318,11 +318,10 @@ int main(int argc, char* argv[])
318318
}
319319

320320
#if PY_VERSION_HEX >= 0x03080000
321-
initPython(cmd_argc, cmd_argv);
321+
initPython(cmd_argc, cmd_argv, exit);
322322
return Py_RunMain();
323323
#else
324324
initPython();
325-
bool exit = findCmdLineFlag(cmd_argc, cmd_argv, "-exit");
326325
std::vector<wchar_t*> args;
327326
args.push_back(Py_DecodeLocale(cmd_argv[0], nullptr));
328327
if (!exit) {
@@ -463,7 +462,8 @@ static int tclAppInit(int& argc,
463462
}
464463
#endif
465464

466-
ord::initOpenRoad(interp, log_filename, metrics_filename);
465+
ord::initOpenRoad(
466+
interp, log_filename, metrics_filename, exit_after_cmd_file);
467467

468468
bool no_splash = findCmdLineFlag(argc, argv, "-no_splash");
469469
if (!no_splash) {

src/OpenRoad.cc

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
#include "upf/MakeUpf.h"
5555
#include "utl/Logger.h"
5656
#include "utl/MakeLogger.h"
57+
#include "utl/Progress.h"
5758
#include "utl/ScopedTemporaryFile.h"
5859
#include "utl/decode.h"
5960

@@ -139,18 +140,22 @@ void OpenRoad::setOpenRoad(OpenRoad* app, bool reinit_ok)
139140

140141
void initOpenRoad(Tcl_Interp* interp,
141142
const char* log_filename,
142-
const char* metrics_filename)
143+
const char* metrics_filename,
144+
const bool batch_mode)
143145
{
144-
OpenRoad::openRoad()->init(interp, log_filename, metrics_filename);
146+
OpenRoad::openRoad()->init(
147+
interp, log_filename, metrics_filename, batch_mode);
145148
}
146149

147150
void OpenRoad::init(Tcl_Interp* tcl_interp,
148151
const char* log_filename,
149-
const char* metrics_filename)
152+
const char* metrics_filename,
153+
const bool batch_mode)
150154
{
151155
tcl_interp_ = tcl_interp;
152156

153157
// Make components.
158+
utl::Progress::setBatchMode(batch_mode);
154159
logger_ = makeLogger(log_filename, metrics_filename);
155160
db_->setLogger(logger_);
156161
sta_ = makeDbSta();

src/Tech.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Tech::Tech(Tcl_Interp* interp,
2525
if (!interp) {
2626
interp = Tcl_CreateInterp();
2727
Tcl_Init(interp);
28-
app_->init(interp, log_filename, metrics_filename);
28+
app_->init(interp, log_filename, metrics_filename, false);
2929
}
3030
}
3131

src/cts/README.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ clock_tree_synthesis
6666
[-dont_use_dummy_load]
6767
[-sink_buffer_max_cap_derate derate_value]
6868
[-delay_buffer_derate derate_value]
69+
[-library liberty_library_name]
6970
```
7071

7172
#### Options
@@ -93,7 +94,17 @@ clock_tree_synthesis
9394
| `-dont_use_dummy_load` | Don't apply dummy buffer or inverter cells at clock tree leaves to balance loads. The default values is `False`. |
9495
| `-sink_buffer_max_cap_derate` | Use this option to control automatic buffer selection. To favor strong(weak) drive strength buffers use a small(large) value. The default value is `0.01`, meaning that buffers are selected by derating max cap limit by 0.01. The value of 1.0 means no derating of max cap limit. |
9596
| `-delay_buffer_derate` | This option balances latencies between macro cells and registers by inserting delay buffers. The default value is `1.0`, meaning all needed delay buffers are inserted. A value of 0.5 means only half of necessary delay buffers are inserted. A value of 0.0 means no insertion of delay buffers. |
96-
| `-library` | This option specifies the name of library from which clock buffers will be selected, such as the LVT or uLVT library. It is assumed that the library has already been loaded using the read_liberty command. If this option is not specified, clock buffers will be chosen from the currently loaded libraries, which may not include LVT or uLVT cells. |
97+
| `-library` | This option specifies the name of Liberty library from which clock buffers will be selected, such as the LVT or uLVT library. It is assumed that the library has already been loaded using the read_liberty command. If this option is not specified, clock buffers will be chosen from the currently loaded libraries, which may not include LVT or uLVT cells. |
98+
99+
#### Instance Name Prefixes
100+
101+
`clock_tree_synthesis` uses the following prefixes for the instances that it inserts:
102+
103+
| Instance Prefix | Purpose |
104+
| ----- | ----- |
105+
| clkbuf_regs | Splitting registers from macros |
106+
| clkload | Dummy loads to help balance the clock tree |
107+
| delaybuf | Delay buffers to help balance the tree |
97108

98109
### Report CTS
99110

src/cts/src/TechChar.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -699,7 +699,7 @@ void TechChar::trimSortBufferList(std::vector<std::string>& buffers)
699699
if (cap < lowCap || cap > highCap) {
700700
it = buffers.erase(it);
701701
// clang-format off
702-
debugPrint(logger_, CTS, "buffering", 1, " removing {}", buf);
702+
debugPrint(logger_, CTS, "buffering", 1, " removing {} outside of low/high max cap", buf);
703703
// clang-format on
704704
} else {
705705
++it;
@@ -720,9 +720,13 @@ void TechChar::trimSortBufferList(std::vector<std::string>& buffers)
720720
float prev = getMaxCapLimit(*it);
721721
++it;
722722
while (it != buffers.end()) {
723-
float curr = getMaxCapLimit(*it);
723+
std::string buf = *it;
724+
float curr = getMaxCapLimit(buf);
724725
if (std::abs(prev - curr) / curr < 0.1) {
725726
it = buffers.erase(it);
727+
// clang-format off
728+
debugPrint(logger_, CTS, "buffering", 1, " removing {} within 10% of prev neighbor's max cap", buf);
729+
// clang-format on
726730
} else {
727731
++it;
728732
prev = curr;

src/odb/test/BUILD

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,7 @@ filegroup(
171171
"sky130hd/sky130hd_vt.tlef",
172172
"sky130hd/work_around_yosys/formal_pdk.v",
173173
],
174+
visibility = ["//src/odb/test/cpp:__subpackages__"],
174175
)
175176

176177
[

0 commit comments

Comments
 (0)