Skip to content

Commit 44c6cb8

Browse files
committed
rcx: honor deprecated ext_model_file option in Ext::extract
Signed-off-by: Arthur Koucher <arthurkoucher@precisioninno.com>
1 parent aa93740 commit 44c6cb8

3 files changed

Lines changed: 15 additions & 22 deletions

File tree

src/rcx/src/OpenRCX.tcl

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -83,13 +83,7 @@ proc extract_parasitics { args } {
8383

8484
set ext_model_file ""
8585
if { [info exists keys(-ext_model_file)] } {
86-
utl::warn RCX 514 "The -ext_model_file option is deprecated. Use\
87-
set_extraction_rules_file command instead."
88-
89-
# We may have multiple technologies loaded, so use the current block's
90-
# tech to prevent an error resolving an ambiguous default tech.
91-
set tech [[ord::get_db_block] getTech]
92-
set_extraction_rules_file -tech [$tech getName] $keys(-ext_model_file)
86+
set ext_model_file $keys(-ext_model_file)
9387
}
9488

9589
set corner_cnt 1

src/rcx/src/ext.cpp

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,17 @@ void Ext::extract(ExtractOptions options)
216216

217217
odb::orderWires(logger_, block);
218218

219-
std::string rules_file = block->getTech()->getExtractionRulesFile();
219+
odb::dbTech* tech = block->getTech();
220+
if (options.ext_model_file != nullptr && options.ext_model_file[0] != '\0') {
221+
logger_->warn(RCX,
222+
514,
223+
"The ext_model_file option is deprecated. Use "
224+
"set_extraction_rules_file command instead.");
225+
226+
tech->setExtractionRulesFile(options.ext_model_file);
227+
}
228+
229+
std::string rules_file = tech->getExtractionRulesFile();
220230
if (!rules_file.empty()) {
221231
options.ext_model_file = rules_file.c_str();
222232
}

src/rcx/test/rcx_aux.py

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import utl
21
import rcx
32

43
# Thin wrapper over api defined in ext.i (and reused by ext-py.i)
@@ -28,21 +27,11 @@ def extract_parasitics(
2827
dbg=0
2928
):
3029

31-
if ext_model_file is not None:
32-
utl.warn(
33-
utl.RCX,
34-
514,
35-
"The ext_model_file option is deprecated. Use "
36-
"set_extraction_rules_file command instead.",
37-
)
38-
39-
# We may have multiple technologies loaded, so use the current block's
40-
# tech to prevent an error resolving an ambiguous default tech.
41-
db_tech = design.getBlock().getTech()
42-
db_tech.setExtractionRulesFile(ext_model_file)
43-
4430
opts = rcx.ExtractOptions()
4531

32+
if ext_model_file is not None:
33+
opts.ext_model_file = ext_model_file
34+
4635
opts.corner_cnt = corner_cnt
4736
opts.corner = corner
4837
opts.max_res = max_res

0 commit comments

Comments
 (0)