Skip to content

Commit f953797

Browse files
openroad: insert scan_chain
1 parent fa87859 commit f953797

5 files changed

Lines changed: 37 additions & 1 deletion

File tree

openroad/scripts/01_floorplan.tcl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,12 @@ utl::report "Read netlist: ${netlist}"
4141
read_verilog $netlist
4242
link_design $top_design
4343

44+
utl::report "Read DFT configuration"
45+
source src/dft_config.tcl
46+
47+
utl::report "Insert scan flip-flops"
48+
scan_replace
49+
4450
utl::report "Read constraints"
4551
read_sdc src/constraints.sdc
4652

openroad/scripts/02_placement.tcl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ utl::report "Repair tie fanout"
5151
repair_tie_fanout $tieHiPin
5252
repair_tie_fanout $tieLoPin
5353

54+
utl::report "Read DFT configuration"
55+
source src/dft_config.tcl
56+
5457
utl::report "Remove buffers"
5558
remove_buffers
5659

@@ -112,6 +115,9 @@ detailed_placement
112115
utl::report "Optimize mirroring"
113116
optimize_mirroring
114117

118+
utl::report "Stitch Scan Chain"
119+
execute_dft_plan
120+
115121
utl::report "Estimate parasitics"
116122
estimate_parasitics -placement
117123

openroad/src/constraints.sdc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@ set_input_delay -max [ expr $TCK_JTG * 0.10 ] [get_ports {rst_ni testmode_i}]
8787
set_false_path -hold -from [get_ports {rst_ni testmode_i}]
8888
set_max_delay $TCK_SYS -from [get_ports {rst_ni testmode_i}]
8989

90+
set_input_delay -min -add_delay -clock clk_sys [ expr $TCK_SYS * 0.10 ] [get_ports scan_en_i]
91+
set_input_delay -max -add_delay -clock clk_sys [ expr $TCK_SYS * 0.10 ] [get_ports scan_en_i]
9092

9193
##########
9294
## JTAG ##

openroad/src/dft_config.tcl

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Copyright 2026 ETH Zurich and University of Bologna.
2+
# Solderpad Hardware License, Version 0.51, see LICENSE for details.
3+
# SPDX-License-Identifier: SHL-0.51
4+
5+
# Authors:
6+
# - Tobias Senti <tsenti@ethz.ch>
7+
8+
## Scan chain configuration
9+
10+
# max_chains: 1 scan chain per clock domain (clk_i and jtag_tck_i)
11+
# scan_enable_name_pattern: Connecto to p2c pin of pad_scan_en_i
12+
# scan_in_name_pattern: Connect to p2c pin of pad_gpio{}_io (0 and 1)
13+
# scan_out_name_pattern: Connect to A1 pin of i_scan_out_mux_{} (0 and 1)
14+
15+
set_dft_config\
16+
-max_chains 1 \
17+
-scan_enable_name_pattern pad_scan_en_i/p2c \
18+
-scan_in_name_pattern pad_gpio{}_io/p2c \
19+
-scan_out_name_pattern i_scan_out_mux_{}/A1
20+
21+
# Report config
22+
report_dft_config

openroad/src/padring.tcl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ place_pad -row IO_NORTH -location [expr {$northStart - 9*$northPitch}] "pad_gpi
131131
place_pad -row IO_NORTH -location [expr {$northStart - 10*$northPitch}] "pad_unused0_o" ; # pin no: 11
132132
place_pad -row IO_NORTH -location [expr {$northStart - 11*$northPitch}] "pad_unused1_o" ; # pin no: 12
133133
place_pad -row IO_NORTH -location [expr {$northStart - 12*$northPitch}] "pad_unused2_o" ; # pin no: 13
134-
place_pad -row IO_NORTH -location [expr {$northStart - 13*$northPitch}] "pad_unused3_o" ; # pin no: 14
134+
place_pad -row IO_NORTH -location [expr {$northStart - 13*$northPitch}] "pad_scan_en_i" ; # pin no: 14
135135
place_pad -row IO_NORTH -location [expr {$northStart - 14*$northPitch}] "pad_vss3" ; # pin no: 15
136136
place_pad -row IO_NORTH -location [expr {$northStart - 15*$northPitch}] "pad_vdd3" ; # pin no: 16
137137

0 commit comments

Comments
 (0)