#!/usr/local/bin/tclsh8.6 # lib functions proc req_paths {paths} { foreach p $paths { puts "require_path -from [lindex $p 0] -to [lindex $p 1]" } } proc get_ltcu_srcm_paths {ltcu_inst srcm name} { return { \ { "dft_${name}_scan_mode_o" ${srcm}.scan_mode} \ { dft_${name}_scan_delay_scan_mode_o ${srcm}.scan_mode_atspeed_i} \ { dft_${name}_scan_hatpg_src_en_o ${srcm}.scan_rst_byenb} \ } } #block functions set ltcu_inst "path/to/ltcu" set srcm_inst "p/to/src" set ltcu_name "bpss" if {[info exist ltcu_inst] && $ltcu_inst !=""} { req_paths [get_ltcu_srcm_paths $ltcu_inst $srcm_inst $ltcu_name] }