Skip to content

Commit aa51884

Browse files
committed
dft: renaming main dft tcl commands
preview_dft => report_dft_plan insert_dft => execute_dft_plan Signed-off-by: Felipe Garay <[email protected]>
1 parent 5959513 commit aa51884

19 files changed

+56
-49
lines changed

src/dft/README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ in `no_mix` clock mode it specifies a maximum number of chains per clock-edge pa
4747

4848
### Report DFT Config
4949

50-
Prints the current DFT configuration to be used by `preview_dft` and
51-
`insert_dft`.
50+
Prints the current DFT configuration to be used by `report_dft_plan` and
51+
`execute_dft_plan`.
5252

5353
```tcl
5454
report_dft_config
@@ -63,15 +63,15 @@ placement, as it changes the area of cells.
6363
scan_replace
6464
```
6565

66-
### Preview DFT
66+
### Report DFT Plan
6767

68-
Prints a preview of the scan chains that will be stitched by `insert_dft`. Use
68+
Prints a preview of the scan chains that will be stitched by `execute_dft_plan`. Use
6969
this command to iterate and try different DFT configurations. This command does
7070
not perform any modification to the design, and should be run after `scan_replace`
7171
and global placement.
7272

7373
```tcl
74-
preview_dft
74+
report_dft_plan
7575
[-verbose]
7676
```
7777

@@ -81,13 +81,13 @@ preview_dft
8181
| ---- | ---- |
8282
| `-verbose` | Shows more information about each one of the scan chains that will be created. |
8383

84-
### Insert DFT
84+
### Execute DFT Plan
8585

8686
Architect scan chains and connect them up in a way that minimises wirelength. As
8787
a result, this should be run after placement, and after `scan_replace`.
8888

8989
```tcl
90-
insert_dft
90+
execute_dft_plan
9191
```
9292

9393
## Example scripts
@@ -100,8 +100,8 @@ set_dft_config -max_length 10 -clock_mixing clock_mix
100100
report_dft_config
101101
scan_replace
102102
# Run global placement...
103-
preview_dft -verbose
104-
insert_dft
103+
report_dft_plan -verbose
104+
execute_dft_plan
105105
```
106106

107107
## Regression tests

src/dft/include/dft/Dft.hh

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ class Dft
5757
//
5858
// If verbose is true, then we show all the cells that are inside the scan
5959
// chains
60-
void previewDft(bool verbose);
60+
void reportDftPlan(bool verbose);
6161

6262
// Inserts the scan chains into the design. For now this just replace the
6363
// cells in the design with scan equivalent. This functions mutates the
@@ -68,7 +68,14 @@ class Dft
6868
//
6969
void scanReplace();
7070

71-
void insertDft();
71+
// Runs the complete flow for scan insertion based on the user's settings
72+
//
73+
// Here we do:
74+
// - Scan Replace
75+
// - Scan Architect
76+
// - Scan Insertion
77+
// - Store the inserted DFT (scan chains) into odb for later optimization
78+
void executeDftPlan();
7279

7380
// Returns a mutable version of DftConfig
7481
DftConfig* getMutableDftConfig();
@@ -87,7 +94,7 @@ class Dft
8794
void reset();
8895

8996
// Common function to perform scan replace and scan architect. Shared between
90-
// preview_dft and insert_dft
97+
// report_dft_plan and execute_dft_plan
9198
std::vector<std::unique_ptr<ScanChain>> scanArchitect();
9299

93100
// Global state

src/dft/src/Dft.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ void Dft::pre_dft()
5656
need_to_run_pre_dft_ = false;
5757
}
5858

59-
void Dft::previewDft(bool verbose)
59+
void Dft::reportDftPlan(bool verbose)
6060
{
6161
if (need_to_run_pre_dft_) {
6262
pre_dft();
@@ -65,7 +65,7 @@ void Dft::previewDft(bool verbose)
6565
std::vector<std::unique_ptr<ScanChain>> scan_chains = scanArchitect();
6666

6767
logger_->report("***************************");
68-
logger_->report("Preview DFT Report");
68+
logger_->report("Report DFT Plan");
6969
logger_->report("Number of chains: {:d}", scan_chains.size());
7070
logger_->report("Clock domain: {:s}",
7171
ScanArchitectConfig::ClockMixingName(
@@ -85,7 +85,7 @@ void Dft::scanReplace()
8585
scan_replace_->scanReplace();
8686
}
8787

88-
void Dft::insertDft()
88+
void Dft::executeDftPlan()
8989
{
9090
if (need_to_run_pre_dft_) {
9191
pre_dft();

src/dft/src/dft.i

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,19 +70,19 @@ utl::Logger* getLogger()
7070
%inline
7171
%{
7272

73-
void preview_dft(bool verbose)
73+
void report_dft_plan(bool verbose)
7474
{
75-
getDft()->previewDft(verbose);
75+
getDft()->reportDftPlan(verbose);
7676
}
7777

7878
void scan_replace()
7979
{
8080
getDft()->scanReplace();
8181
}
8282

83-
void insert_dft()
83+
void execute_dft_plan()
8484
{
85-
getDft()->insertDft();
85+
getDft()->executeDftPlan();
8686
}
8787

8888
void set_dft_config_max_length(int max_length)

src/dft/src/dft.tcl

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
# SPDX-License-Identifier: BSD-3-Clause
22
# Copyright (c) 2023-2025, The OpenROAD Authors
33

4-
sta::define_cmd_args "preview_dft" {[-verbose]}
4+
sta::define_cmd_args "report_dft_plan" {[-verbose]}
55

6-
proc preview_dft { args } {
7-
sta::parse_key_args "preview_dft" args \
6+
proc report_dft_plan { args } {
7+
sta::parse_key_args "report_dft_plan" args \
88
keys {} \
99
flags {-verbose}
1010

11-
sta::check_argc_eq0 "preview_dft" $args
11+
sta::check_argc_eq0 "report_dft_plan" $args
1212

1313
if { [ord::get_db_block] == "NULL" } {
1414
utl::error DFT 1 "No design block found."
1515
}
1616

1717
set verbose [info exists flags(-verbose)]
1818

19-
dft::preview_dft $verbose
19+
dft::report_dft_plan $verbose
2020
}
2121

2222
sta::define_cmd_args "scan_replace" { }
@@ -30,16 +30,16 @@ proc scan_replace { args } {
3030
dft::scan_replace
3131
}
3232

33-
sta::define_cmd_args "insert_dft" {}
34-
proc insert_dft { args } {
35-
sta::parse_key_args "insert_dft" args \
33+
sta::define_cmd_args "execute_dft_plan" {}
34+
proc execute_dft_plan { args } {
35+
sta::parse_key_args "execute_dft_plan" args \
3636
keys {} \
3737
flags {}
3838

3939
if { [ord::get_db_block] == "NULL" } {
4040
utl::error DFT 9 "No design block found."
4141
}
42-
dft::insert_dft
42+
dft::execute_dft_plan
4343
}
4444

4545
sta::define_cmd_args "set_dft_config" { [-max_length max_length]

src/dft/test/max_chain_count_sky130.ok

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[INFO ODB-0227] LEF file: sky130hd/sky130hd.tlef, created 13 layers, 25 vias
22
[INFO ODB-0227] LEF file: sky130hd/sky130_fd_sc_hd_merged.lef, created 437 library cells
33
***************************
4-
Preview DFT Report
4+
Report DFT Plan
55
Number of chains: 1
66
Clock domain: No Mix
77
***************************

src/dft/test/max_chain_count_sky130.tcl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ set_dft_config -max_length 4 -max_chains 1
1313

1414
scan_replace
1515

16-
preview_dft -verbose
17-
insert_dft
16+
report_dft_plan -verbose
17+
execute_dft_plan
1818

1919
set verilog_file [make_result_file max_chain_count_sky130.v]
2020
write_verilog $verilog_file

src/dft/test/one_cell_sky130.ok

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Instance ff1
2828
Q output output1
2929
Q_N output (unconnected)
3030
***************************
31-
Preview DFT Report
31+
Report DFT Plan
3232
Number of chains: 1
3333
Clock domain: No Mix
3434
***************************

src/dft/test/one_cell_sky130.tcl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ set_dft_config -max_length 10
1313
report_instance ff1
1414
scan_replace
1515
report_instance ff1
16-
preview_dft -verbose
16+
report_dft_plan -verbose
1717
report_instance ff1
18-
insert_dft
18+
execute_dft_plan
1919
report_instance ff1
2020

2121
set verilog_file [make_result_file one_cell_sky130.v]

src/dft/test/place_sort_sky130.ok

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[INFO ODB-0227] LEF file: sky130hd/sky130hd.tlef, created 13 layers, 25 vias
22
[INFO ODB-0227] LEF file: sky130hd/sky130_fd_sc_hd_merged.lef, created 437 library cells
33
***************************
4-
Preview DFT Report
4+
Report DFT Plan
55
Number of chains: 1
66
Clock domain: No Mix
77
***************************

0 commit comments

Comments
 (0)