custom_boundry_test_tasks
package provide custom_boundry_test_tasks 1.1
namespace eval ::ATE::jtagtest {
namespace export vih_fb_clamp vih_gc6_HV_CLAMP_s1 vih_gc6_HV_CLAMP_s0 vol_gc6_HVALT_EN_s1 vih_gc6_HVALT_EN_s0
proc vih_fb_clamp { args } {
global DEBUG
set orig_args $args
set test "vih_fb_clamp"
set options {
{prgmConfig.arg.secret "" ""}
{testConfig.arg "" "Optional argument for test config object needed by test APIs" "NO_CUSTOMIZE"}
{pkg_obj.arg.secret "" ""}
{chip_name.arg.secret "" ""}
{sub_mode_dotting_type.arg "full" " -sub_mode_dotting_type
{bsdl.arg "" " -bsdl
{ballmap.arg "" " -ballmap
{ListArgs.arg "" " -option helper"}
}
::ATE::AteFlowUtils::setTestApiProperty -name_of_list options \
-categoryName "execution_ctrl" \
-propName "ieee_1149_compliance" \
-value 1149.1
set usages "testApi \"[namespace current]::$test allowed\""
array set params [::cmdline::getKnownOptions args $options ]
::ATE::AteFlowUtils::setTestApiProperty -name_of_list options -categoryName "execution_ctrl" -propName "global_init_behavior" -value skip_init
::ATE::AteFlowUtils::setTestApiProperty -name_of_list options -categoryName "execution_ctrl" -propName "test_features" -value "secSHA2"
puts "==\$params(bsdl) is : $params(bsdl)"
set valid_submodes [ list primary secondary full ]
if { $params(ListArgs) != "" } {
upvar $params(ListArgs) fullopt
#set options "$fullopt $options"
llappend options $fullopt
set fullopt $options
return
} else {
#parray params
## Parse arguments
if {$params(testConfig) != ""} {
set testConfig $params(testConfig)
set ate_config [config_find $testConfig "CURRENT_TEST/CURRENT_SUBTEST/TESTSCRIPT_DEFINED_ARGS/ATE_config"]
set relative_path_local2jtag [config_find $testConfig CURRENT_TEST/relative_path/test2jtag]
if {$ate_config == "" || $ate_config == "None"} {
set iocm_file "$relative_path_local2jtag/custom_IOCM_spec.tn"
} else {
set iocm_file "$relative_path_local2jtag/custom_IOCM_${ate_config}_spec.tn"
}
} else {
puts "Error : (::ATE::jtagtest::$test) Missing testConfig object"
}
if {$params(prgmConfig) != ""} {
set prgmConfig $params(prgmConfig) ;#old set jtagConfig $params(jtagConfig)
} else {
puts "Error : (::ATE::jtagtest::$test) Missing jtagConfig object"
}
if {$params(pkg_obj) != ""} {
set package_obj $params(pkg_obj)
} else {
puts "Error : (::ATE::jtagtest::$test) Missing package object"
}
if {$params(chip_name) != ""} {
set chip_name $params(chip_name)
} else {
puts stderr "Error : There is no CHIP NAME found. Please check your ATE ENV"
exit 1
}
set sub_mode_dotting_type $params(sub_mode_dotting_type)
if {[lsearch -exact $valid_submodes $sub_mode_dotting_type] == -1 } {
puts stderr "Error : (::ATE::jtagtest:$test) You must specify a valid sub_mode_dotting_type"
puts stderr " Use \"jtagtest.tn -help -test $test\" to see valid sub modes"
exit 1
}
if { $params(bsdl) != "" } {
set bsdl_file $params(bsdl)
if { [file exists $bsdl_file]} {
} else {
puts stderr "Error: $bsdl_file doesn't exist, please use -bsdl
}
} else {
puts stderr "Error: Please use -bsdl
exit 1
}
if { $params(ballmap) != "" } {
set ballmap_file $params(ballmap)
if { [file exists $ballmap_file]} {
} else {
puts stderr "Error: $ballmap_file doesn't exist, please use -bsdl
}
} else {
puts stderr "Error: Please use -ballmap
exit 1
}
}
puts "jtagtest subtest \"$test\" called ..."
# tie chip_reset 0 , so won't need unlock
# $prgmConfig set_enable_value Pex_pwr_goodn 1
# $prgmConfig set_pin_value Pex_pwr_goodn 0
# $prgmConfig waitRti 1
set die_obj [config_map_value [config_find $testConfig "CURRENT_TEST"] "die_obj"]
set resetList [::pkgtool::get_vlog_pins_with_test_function $die_obj "RESET#"]
set resetList [lreplace $resetList [lsearch $resetList "jtag_trst_"] [lsearch $resetList "jtag_trst_"]]
puts "Reset pins are : $resetList"
if {[llength $resetList] != 1} {
puts "ERROR, expect only one chip reset"
} else {
foreach reset_signal $resetList {
$prgmConfig set_enable_value $reset_signal 1
$prgmConfig set_pin_value $reset_signal 0
$prgmConfig waitRti 1
}
}
puts "blueg , should program non_bypass_wsc_pipeline to 0 "
$prgmConfig set_program_value ".*/TEST_MASTER_CTRL" .*non_bypass_wsc_pipeline.* -value 0
$prgmConfig program
# TODO , remove this after we have UPM working
#$prgmConfig set_program_value {.*/GENPADS_CTRLS} {.*pad_control_disab} -value 1 -replicate
#$prgmConfig program
#puts "blueg , dbg , print all pin list"
#foreach tempPin [get_pin_list [$prgmConfig get_jtag_config]] {
# puts "blueg , dbg , we have $tempPin"
#}
set pinShortMode 0
set extraArg 0
#set patterns [initialize_bsdl_pattern $prgmConfig $bsdl_file $ballmap_file $package_obj $pin_dot_file pinShortMode $chip_name $extraArg]
set patterns [initialize_bsdl_pattern $prgmConfig $bsdl_file $ballmap_file $package_obj $iocm_file pinShortMode $chip_name $extraArg]
puts "creadt skipped fab_cmd pin list accroding to pkg type: $params(bsdl)"
set skipped_fba_cmd_pin_list ""
if { [regexp "gb2_64" $params(bsdl) ] == 1 } {
set skipped_fba_cmd_pin_list "33"
} elseif { [regexp "gb4_128A" $params(bsdl) ] == 1 } {
set skipped_fba_cmd_pin_list ""
}
puts "skipped_fba_cmd_pin_list is : $skipped_fba_cmd_pin_list"
if { $pinShortMode == 1} {
if { $sub_mode_dotting_type == "primary" } {
$patterns set_pin_shorting_mode primary
puts "INFO: set pin shorting mode to primary"
puts "Running $test..."
vih_fb_clamp_test $prgmConfig $patterns "vih_fb_clamp" $skipped_fba_cmd_pin_list ;#old vih_fb_clamp_test $jtagConfig $patterns "vih_fb_clamp" $skipped_fba_cmd_pin_list
} elseif {$sub_mode_dotting_type == "secondary" } {
$patterns set_pin_shorting_mode secondary
puts "INFO: set pin shorting mode to secondary"
puts "Running $test..."
vih_fb_clamp_test $prgmConfig $patterns "vih_fb_clamp" $skipped_fba_cmd_pin_list ;#old vih_fb_clamp_test $jtagConfig $patterns "vih_fb_clamp" $skipped_fba_cmd_pin_list
} else {
$patterns set_pin_shorting_mode primary
puts "INFO: set pin shorting mode to primary"
puts "Running $test..."
vih_fb_clamp_test $prgmConfig $patterns "vih_fb_clamp" $skipped_fba_cmd_pin_list ;#old vih_fb_clamp_test $jtagConfig $patterns "vih_fb_clamp" $skipped_fba_cmd_pin_list
$patterns set_pin_shorting_mode secondary
puts "INFO: set pin shorting mode to secondary"
puts "Running $test..."
vih_fb_clamp_test $prgmConfig $patterns "vih_fb_clamp" $skipped_fba_cmd_pin_list ;#old vih_fb_clamp_test $jtagConfig $patterns "vih_fb_clamp" $skipped_fba_cmd_pin_list
}
} else {
puts "Running $test..."
vih_fb_clamp_test $prgmConfig $patterns "vih_fb_clamp" $skipped_fba_cmd_pin_list ;#old vih_fb_clamp_test $jtagConfig $patterns "vih_fb_clamp" $skipped_fba_cmd_pin_list
}
}
proc vih_gc6_HV_CLAMP_s1 {args} {
global DEBUG
set orig_args $args
set test "vih_gc6_HV_CLAMP_s1"
set options {
{prgmConfig.arg.secret "" ""}
{testConfig.arg "" "Optional argument for test config object needed by test APIs" "NO_CUSTOMIZE"}
{pkg_obj.arg.secret "" ""}
{chip_name.arg.secret "" ""}
{sub_mode_dotting_type.arg "full" " -sub_mode_dotting_type
{bsdl.arg "" " -bsdl
{ballmap.arg "" " -ballmap
{ListArgs.arg "" " -option helper"}
}
set usages "testApi \"[namespace current]::$test allowed\""
array set params [::cmdline::getKnownOptions args $options ]
::ATE::AteFlowUtils::setTestApiProperty -name_of_list options -categoryName "execution_ctrl" -propName "global_init_behavior" -value skip_init
::ATE::AteFlowUtils::setTestApiProperty -name_of_list options -categoryName "execution_ctrl" -propName "test_features" -value "secSHA2"
puts "==\$params(bsdl) is : $params(bsdl)"
set valid_submodes [ list primary secondary full ]
if { $params(ListArgs) != "" } {
upvar $params(ListArgs) fullopt
#set options "$fullopt $options"
llappend options $fullopt
set fullopt $options
return
} else {
#parray params
## Parse arguments
if {$params(prgmConfig) != ""} {
set prgmConfig $params(prgmConfig) ;#old set jtagConfig $params(jtagConfig)
} else {
puts "Error : (::ATE::jtagtest::$test) Missing jtagConfig object"
}
if {$params(testConfig) != ""} {
set testConfig $params(testConfig)
set ate_config [config_find $testConfig "CURRENT_TEST/CURRENT_SUBTEST/TESTSCRIPT_DEFINED_ARGS/ATE_config"]
set relative_path_local2jtag [config_find $testConfig CURRENT_TEST/relative_path/test2jtag]
if {$ate_config == "" || $ate_config == "None"} {
set iocm_file "$relative_path_local2jtag/custom_IOCM_spec.tn"
} else {
set iocm_file "$relative_path_local2jtag/custom_IOCM_${ate_config}_spec.tn"
}
} else {
puts "Error : (::ATE::jtagtest::$test) Missing testConfig object"
}
if {$params(pkg_obj) != ""} {
set package_obj $params(pkg_obj)
} else {
puts "Error : (::ATE::jtagtest::$test) Missing package object"
}
if {$params(chip_name) != ""} {
set chip_name $params(chip_name)
} else {
puts stderr "Error : There is no CHIP NAME found. Please check your ATE ENV"
exit 1
}
set sub_mode_dotting_type $params(sub_mode_dotting_type)
if {[lsearch -exact $valid_submodes $sub_mode_dotting_type] == -1 } {
puts stderr "Error : (::ATE::jtagtest:$test) You must specify a valid sub_mode_dotting_type"
puts stderr " Use \"jtagtest.tn -help -test $test\" to see valid sub modes"
exit 1
}
if { $params(bsdl) != "" } {
set bsdl_file $params(bsdl)
if { [file exists $bsdl_file]} {
} else {
puts stderr "Error: $bsdl_file doesn't exist, please use -bsdl
}
} else {
puts stderr "Error: Please use -bsdl
exit 1
}
if { $params(ballmap) != "" } {
set ballmap_file $params(ballmap)
if { [file exists $ballmap_file]} {
} else {
puts stderr "Error: $ballmap_file doesn't exist, please use -bsdl
}
} else {
puts stderr "Error: Please use -ballmap
exit 1
}
}
puts "jtagtest subtest \"$test\" called ..."
# tie chip_reset 0 , so won't need unlock
# $prgmConfig set_enable_value Pex_pwr_goodn 1
# $prgmConfig set_pin_value Pex_pwr_goodn 0
# $prgmConfig waitRti 1
set die_obj [config_map_value [config_find $testConfig "CURRENT_TEST"] "die_obj"]
set resetList [::pkgtool::get_vlog_pins_with_test_function $die_obj "RESET#"]
set resetList [lreplace $resetList [lsearch $resetList "jtag_trst_"] [lsearch $resetList "jtag_trst_"]]
puts "Reset pins are : $resetList"
if {[llength $resetList] != 1} {
puts "ERROR, expect only one chip reset"
} else {
foreach reset_signal $resetList {
$prgmConfig set_enable_value $reset_signal 1
$prgmConfig set_pin_value $reset_signal 0
$prgmConfig waitRti 1
}
}
puts "blueg , should program non_bypass_wsc_pipeline to 0 "
$prgmConfig set_program_value ".*/TEST_MASTER_CTRL" .*non_bypass_wsc_pipeline.* -value 0
$prgmConfig program
$prgmConfig set_program_value {.*TOP_FS.*} {.*} -value 0 -replicate
$prgmConfig program
set pinShortMode 0
set extraArg [list]
#set patterns [initialize_bsdl_pattern $prgmConfig $bsdl_file $ballmap_file $package_obj $pin_dot_file pinShortMode $chip_name $extraArg]
set patterns [initialize_bsdl_pattern $prgmConfig $bsdl_file $ballmap_file $package_obj $iocm_file pinShortMode $chip_name $extraArg]
#$prgmConfig set_pin_value {strap[0]} 1 ;#old #set_pin_value $jtagConfig {strap[0]} 1
$prgmConfig waitRti 10 ;#old waitRti $jtagConfig 10
if { $test == "vih_gc6_HV_CLAMP_s1" } {
$prgmConfig set_program_value {.*/GENPADS_CTRLS} {.*pad_control_disab} -value 1 -replicate
$prgmConfig program
puts "Programming HV_CORE_CLMP 0"
$prgmConfig set_program_value {.*INTFC.*PADCAL_MASK} {.*_mask.*} -value 0 -replicate
# $prgmConfig set_program_value {.*INTFC.*PADCAL_MASK} {.*HV_CORE_CLMP.*} -value 1 -replicate
$prgmConfig set_program_value {.*INTFC.*PADCAL_MASK} {.*VAUXS_CORE_CLMP.*} -value 1 -replicate
$prgmConfig set_program_value {.*INTFC.*PADCAL_VALS} {.*_vals.*} -value 0 -replicate
#$prgmConfig set_program_value {.*INTFC.*PADCAL_VALS} .*sci_vals.*HV_CORE_CLMP.* -value 0 -replicate
$prgmConfig program
$prgmConfig waitRti 10
# $prgmConfig jtag_force {tb.boundary_mode} 1
$prgmConfig jtag_force {tb.boundary_leakage_mode} 0
}
if { $pinShortMode == 1} {
if { $sub_mode_dotting_type == "primary" } {
$patterns set_pin_shorting_mode primary
puts "INFO: set pin shorting mode to primary"
puts "Running $test..."
vih_gc6_HV_CLAMP_s1_test $prgmConfig $patterns "vih_gc6_HV_CLAMP_s1" ;#old vih_gc6_HV_CLAMP_s1_test $jtagConfig $patterns "vih_gc6_HV_CLAMP_s1"
} elseif {$sub_mode_dotting_type == "secondary" } {
$patterns set_pin_shorting_mode secondary
puts "INFO: set pin shorting mode to secondary"
puts "Running $test..."
vih_gc6_HV_CLAMP_s1_test $prgmConfig $patterns "vih_gc6_HV_CLAMP_s1" ;#old vih_gc6_HV_CLAMP_s1_test $jtagConfig $patterns "vih_gc6_HV_CLAMP_s1"
} else {
$patterns set_pin_shorting_mode primary
puts "INFO: set pin shorting mode to primary"
puts "Running $test..."
vih_gc6_HV_CLAMP_s1_test $prgmConfig $patterns "vih_gc6_HV_CLAMP_s1" ;#old vih_gc6_HV_CLAMP_s1_test $jtagConfig $patterns "vih_gc6_HV_CLAMP_s1"
$patterns set_pin_shorting_mode secondary
puts "INFO: set pin shorting mode to secondary"
puts "Running $test..."
vih_gc6_HV_CLAMP_s1_test $prgmConfig $patterns "vih_gc6_HV_CLAMP_s1" ;#old vih_gc6_HV_CLAMP_s1_test $jtagConfig $patterns "vih_gc6_HV_CLAMP_s1"
}
} else {
puts "Running $test..."
vih_gc6_HV_CLAMP_s1_test $prgmConfig $patterns "vih_gc6_HV_CLAMP_s1" ;#old vih_gc6_HV_CLAMP_s1_test $jtagConfig $patterns "vih_gc6_HV_CLAMP_s1"
}
}
proc vih_gc6_HV_CLAMP_s0 {args} {
global DEBUG
set orig_args $args
set test "vih_gc6_HV_CLAMP_s0"
set options {
{prgmConfig.arg.secret "" ""}
{testConfig.arg "" "Optional argument for test config object needed by test APIs" "NO_CUSTOMIZE"}
{pkg_obj.arg.secret "" ""}
{chip_name.arg.secret "" ""}
{sub_mode_dotting_type.arg "full" " -sub_mode_dotting_type
{bsdl.arg "" " -bsdl
{ballmap.arg "" " -ballmap
{ListArgs.arg "" " -option helper"}
}
set usages "testApi \"[namespace current]::$test allowed\""
array set params [::cmdline::getKnownOptions args $options ]
::ATE::AteFlowUtils::setTestApiProperty -name_of_list options -categoryName "execution_ctrl" -propName "global_init_behavior" -value skip_init
::ATE::AteFlowUtils::setTestApiProperty -name_of_list options -categoryName "execution_ctrl" -propName "test_features" -value "secSHA2"
puts "==\$params(bsdl) is : $params(bsdl)"
set valid_submodes [ list primary secondary full ]
if { $params(ListArgs) != "" } {
upvar $params(ListArgs) fullopt
#set options "$fullopt $options"
llappend options $fullopt
set fullopt $options
return
} else {
#parray params
## Parse arguments
if {$params(prgmConfig) != ""} {
set prgmConfig $params(prgmConfig) ;#old set jtagConfig $params(jtagConfig)
} else {
puts "Error : (::ATE::jtagtest::$test) Missing jtagConfig object"
}
if {$params(testConfig) != ""} {
set testConfig $params(testConfig)
set ate_config [config_find $testConfig "CURRENT_TEST/CURRENT_SUBTEST/TESTSCRIPT_DEFINED_ARGS/ATE_config"]
set relative_path_local2jtag [config_find $testConfig CURRENT_TEST/relative_path/test2jtag]
if {$ate_config == "" || $ate_config == "None"} {
set iocm_file "$relative_path_local2jtag/custom_IOCM_spec.tn"
} else {
set iocm_file "$relative_path_local2jtag/custom_IOCM_${ate_config}_spec.tn"
}
} else {
puts "Error : (::ATE::jtagtest::$test) Missing testConfig object"
}
if {$params(pkg_obj) != ""} {
set package_obj $params(pkg_obj)
} else {
puts "Error : (::ATE::jtagtest::$test) Missing package object"
}
if {$params(chip_name) != ""} {
set chip_name $params(chip_name)
} else {
puts stderr "Error : There is no CHIP NAME found. Please check your ATE ENV"
exit 1
}
set sub_mode_dotting_type $params(sub_mode_dotting_type)
if {[lsearch -exact $valid_submodes $sub_mode_dotting_type] == -1 } {
puts stderr "Error : (::ATE::jtagtest:$test) You must specify a valid sub_mode_dotting_type"
puts stderr " Use \"jtagtest.tn -help -test $test\" to see valid sub modes"
exit 1
}
if { $params(bsdl) != "" } {
set bsdl_file $params(bsdl)
if { [file exists $bsdl_file]} {
} else {
puts stderr "Error: $bsdl_file doesn't exist, please use -bsdl
}
} else {
puts stderr "Error: Please use -bsdl
exit 1
}
if { $params(ballmap) != "" } {
set ballmap_file $params(ballmap)
if { [file exists $ballmap_file]} {
} else {
puts stderr "Error: $ballmap_file doesn't exist, please use -bsdl
}
} else {
puts stderr "Error: Please use -ballmap
exit 1
}
}
puts "jtagtest subtest \"$test\" called ..."
# tie chip_reset 0 , so won't need unlock
#$prgmConfig set_enable_value Pex_pwr_goodn 1
# $prgmConfig set_pin_value Pex_pwr_goodn 0
# $prgmConfig waitRti 1
if {[config_isa [config_find $testConfig CURRENT_TEST/CURRENT_SUBTEST/sub_modes]] == "VECTOR"} {
set sub_modes [config_list [config_find $testConfig CURRENT_TEST/CURRENT_SUBTEST/sub_modes]]
} else {
set sub_modes [config_find $testConfig CURRENT_TEST/CURRENT_SUBTEST/sub_modes]
}
puts "sub_modes is: $sub_modes"
set die_obj [config_map_value [config_find $testConfig "CURRENT_TEST"] "die_obj"]
set resetList [::pkgtool::get_vlog_pins_with_test_function $die_obj "RESET#"]
set resetList [lreplace $resetList [lsearch $resetList "jtag_trst_"] [lsearch $resetList "jtag_trst_"]]
puts "Reset pins are : $resetList"
if {[llength $resetList] != 1} {
puts "ERROR, expect only one chip reset"
} else {
foreach reset_signal $resetList {
$prgmConfig set_enable_value $reset_signal 1
$prgmConfig set_pin_value $reset_signal 0
$prgmConfig waitRti 1
}
}
puts "blueg , should program non_bypass_wsc_pipeline to 0 "
$prgmConfig set_program_value ".*/TEST_MASTER_CTRL" .*non_bypass_wsc_pipeline.* -value 0
$prgmConfig program
$prgmConfig set_program_value {.*TOP_FS.*} {.*} -value 0 -replicate
$prgmConfig program
# puts "Setting OVERT to 1 for vih_GC6_HV_CLAMP_s0 test @Noel Pangilinan
# $prgmConfig set_enable_value overt 1
# $prgmConfig set_pin_value overt 1
set pinShortMode 0
set extraArg [list]
#set patterns [initialize_bsdl_pattern $prgmConfig $bsdl_file $ballmap_file $package_obj $pin_dot_file pinShortMode $chip_name $extraArg]
set patterns [initialize_bsdl_pattern $prgmConfig $bsdl_file $ballmap_file $package_obj $iocm_file pinShortMode $chip_name $extraArg]
$prgmConfig waitRti 10 ;#old waitRti $jtagConfig 10
if { $test == "vih_gc6_HV_CLAMP_s0" } {
$prgmConfig set_program_value ".*/GENPADS_CTRLS" .*pad_control_disab.* -value 1 -replicate
$prgmConfig program
puts "Programming sci2pad_HV_CORE_CLMP 1 ; "
$prgmConfig set_program_value {.*INTFC.*PADCAL_MASK} {.*_mask.*} -value b0
# $prgmConfig set_program_value {.*INTFC.*PADCAL_MASK} {.*_mask.*HV_CORE_CLMP.*} -value b1
$prgmConfig set_program_value {.*INTFC.*PADCAL_MASK} {.*_mask.*VAUXS_CORE_CLMP.*} -value b1
$prgmConfig set_program_value {.*INTFC.*PADCAL_VALS} {.*_vals.*} -value 0 -replicate
#$prgmConfig set_program_value {.*INTFC.*PADCAL_VALS} {.*_vals.*HV_CORE_CLMP.*} -value b1
#There's no HV_CORE_CLMP in ga100, change to VAUXS_CORE_CLMP
$prgmConfig set_program_value {.*INTFC.*PADCAL_VALS} {.*_vals.*VAUXS_CORE_CLMP.*} -value b1
$prgmConfig program
$prgmConfig waitRti 10
# $prgmConfig jtag_force {tb.boundary_mode} 1
$prgmConfig jtag_force {tb.boundary_leakage_mode} 0
}
if { $pinShortMode == 1} {
if { $sub_mode_dotting_type == "primary" } {
$patterns set_pin_shorting_mode primary
puts "INFO: set pin shorting mode to primary"
puts "Running $test..."
vih_gc6_HV_CLAMP_s0_test $prgmConfig $patterns "vih_gc6_HV_CLAMP_s0" $sub_modes ;#old vih_gc6_HV_CLAMP_s0_test $jtagConfig $patterns "vih_gc6_HV_CLAMP_s0"
} elseif {$sub_mode_dotting_type == "secondary" } {
$patterns set_pin_shorting_mode secondary
puts "INFO: set pin shorting mode to secondary"
puts "Running $test..."
vih_gc6_HV_CLAMP_s0_test $prgmConfig $patterns "vih_gc6_HV_CLAMP_s0" $sub_modes ;#old vih_gc6_HV_CLAMP_s0_test $jtagConfig $patterns "vih_gc6_HV_CLAMP_s0"
} else {
$patterns set_pin_shorting_mode primary
puts "INFO: set pin shorting mode to primary"
puts "Running $test..."
vih_gc6_HV_CLAMP_s0_test $prgmConfig $patterns "vih_gc6_HV_CLAMP_s0" $sub_modes ;#old vih_gc6_HV_CLAMP_s0_test $jtagConfig $patterns "vih_gc6_HV_CLAMP_s0"
$patterns set_pin_shorting_mode secondary
puts "INFO: set pin shorting mode to secondary"
puts "Running $test..."
vih_gc6_HV_CLAMP_s0_test $prgmConfig $patterns "vih_gc6_HV_CLAMP_s0" $sub_modes ;#old vih_gc6_HV_CLAMP_s0_test $jtagConfig $patterns "vih_gc6_HV_CLAMP_s0"
}
} else {
puts "Running $test..."
vih_gc6_HV_CLAMP_s0_test $prgmConfig $patterns "vih_gc6_HV_CLAMP_s0" $sub_modes ;#old vih_gc6_HV_CLAMP_s0_test $jtagConfig $patterns "vih_gc6_HV_CLAMP_s0"
}
}
proc vol_gc6_HVALT_EN_s1 {args} {
global DEBUG
set orig_args $args
set test "vol_gc6_HVALT_EN_s1"
set options {
{prgmConfig.arg.secret "" ""}
{testConfig.arg "" "Optional argument for test config object needed by test APIs" "NO_CUSTOMIZE"}
{pkg_obj.arg.secret "" ""}
{chip_name.arg.secret "" ""}
{sub_mode_dotting_type.arg "full" " -sub_mode_dotting_type
{bsdl.arg "" " -bsdl
{ballmap.arg "" " -ballmap
{ListArgs.arg "" " -option helper"}
}
::ATE::AteFlowUtils::setTestApiProperty -name_of_list options \
-categoryName "execution_ctrl" \
-propName "ieee_1149_compliance" \
-value 1149.1
set usages "testApi \"[namespace current]::$test allowed\""
array set params [::cmdline::getKnownOptions args $options ]
::ATE::AteFlowUtils::setTestApiProperty -name_of_list options -categoryName "execution_ctrl" -propName "global_init_behavior" -value skip_init
::ATE::AteFlowUtils::setTestApiProperty -name_of_list options -categoryName "execution_ctrl" -propName "test_features" -value "secSHA2"
set valid_submodes [ list primary secondary full ]
if { $params(ListArgs) != "" } {
upvar $params(ListArgs) fullopt
llappend options $fullopt
set fullopt $options
return
} else {
#parray params
## Parse arguments
if {$params(prgmConfig) != ""} {
set prgmConfig $params(prgmConfig) ;#old set jtagConfig $params(jtagConfig)
} else {
puts "Error : (::ATE::jtagtest::$test) Missing jtagConfig object"
}
if {$params(testConfig) != ""} {
set testConfig $params(testConfig)
set ate_config [config_find $testConfig "CURRENT_TEST/CURRENT_SUBTEST/TESTSCRIPT_DEFINED_ARGS/ATE_config"]
set relative_path_local2jtag [config_find $testConfig CURRENT_TEST/relative_path/test2jtag]
if {$ate_config == "" || $ate_config == "None"} {
set iocm_file "$relative_path_local2jtag/custom_IOCM_spec.tn"
} else {
set iocm_file "$relative_path_local2jtag/custom_IOCM_${ate_config}_spec.tn"
}
} else {
puts "Error : (::ATE::jtagtest::$test) Missing testConfig object"
}
if {$params(pkg_obj) != ""} {
set package_obj $params(pkg_obj)
} else {
puts "Error : (::ATE::jtagtest::$test) Missing package object"
}
if {$params(chip_name) != ""} {
set chip_name $params(chip_name)
} else {
puts stderr "Error : There is no CHIP NAME found. Please check your ATE ENV"
exit 1
}
set sub_mode_dotting_type $params(sub_mode_dotting_type)
if {[lsearch -exact $valid_submodes $sub_mode_dotting_type] == -1 } {
puts stderr "Error : (::ATE::jtagtest:$test) You must specify a valid sub_mode_dotting_type"
puts stderr " Use \"jtagtest.tn -help -test $test\" to see valid sub modes"
exit 1
}
if { $params(bsdl) != "" } {
set bsdl_file $params(bsdl)
if { [file exists $bsdl_file]} {
} else {
puts stderr "Error: $bsdl_file doesn't exist, please use -bsdl
}
} else {
puts stderr "Error: Please use -bsdl
exit 1
}
if { $params(ballmap) != "" } {
set ballmap_file $params(ballmap)
if { [file exists $ballmap_file]} {
} else {
puts stderr "Error: $ballmap_file doesn't exist, please use -bsdl
}
} else {
puts stderr "Error: Please use -ballmap
exit 1
}
}
puts "jtagtest subtest \"$test\" called ..."
# tie chip_reset 0 , so won't need unlock
# $prgmConfig set_enable_value Pex_pwr_goodn 1
# $prgmConfig set_pin_value Pex_pwr_goodn 0
# $prgmConfig waitRti 1
set die_obj [config_map_value [config_find $testConfig "CURRENT_TEST"] "die_obj"]
set resetList [::pkgtool::get_vlog_pins_with_test_function $die_obj "RESET#"]
set resetList [lreplace $resetList [lsearch $resetList "jtag_trst_"] [lsearch $resetList "jtag_trst_"]]
puts "Reset pins are : $resetList"
if {[llength $resetList] != 1} {
puts "ERROR, expect only one chip reset"
} else {
foreach reset_signal $resetList {
$prgmConfig set_enable_value $reset_signal 1
$prgmConfig set_pin_value $reset_signal 0
$prgmConfig waitRti 1
}
}
puts "blueg , should program non_bypass_wsc_pipeline to 0 "
$prgmConfig set_program_value ".*/TEST_MASTER_CTRL" .*non_bypass_wsc_pipeline.* -value 0
$prgmConfig program
$prgmConfig set_program_value {.*TOP_FS.*} {.*} -value 0 -replicate
$prgmConfig program
# turn-off the termination of OD pad
set jtagConfig [$prgmConfig get_jtag_config]; jtag_force $jtagConfig {tb.boundary_leakage_mode} 1 ;#old jtag_force $jtagConfig {tb.boundary_leakage_mode} 1
set pinShortMode 0
set extraArg [list]
#set patterns [initialize_bsdl_pattern $prgmConfig $bsdl_file $ballmap_file $package_obj $pin_dot_file pinShortMode $chip_name $extraArg]
set patterns [initialize_bsdl_pattern $prgmConfig $bsdl_file $ballmap_file $package_obj $iocm_file pinShortMode $chip_name $extraArg]
#$prgmConfig set_pin_value {strap[0]} 1 ;#old #set_pin_value $jtagConfig {strap[0]} 1
$prgmConfig waitRti 10 ;#old waitRti $jtagConfig 10
if { $test == "vol_gc6_HVALT_EN_s1" } {
puts "Programming HV_ALT_CTL_SEL=1 ; HV_ALT_EN 0 ; HV_ALT_A 1 ."
$prgmConfig set_program_value {.*INTFC.*PADCAL_MASK} {.*} -value 0 -replicate
$prgmConfig set_program_value {.*INTFC.*PADCAL_MASK} {.*VAUXS_ALT_CTL_SEL.*} -value 1
$prgmConfig set_program_value {.*INTFC.*PADCAL_MASK} {.*VAUXS_ALT_EN.*} -value 1
$prgmConfig set_program_value {.*INTFC.*PADCAL_MASK} {.*VAUXS_ALT_A.*} -value 1
$prgmConfig program
$prgmConfig set_program_value {.*INTFC.*PADCAL_VALS} {.*} -value 0 -replicate
$prgmConfig set_program_value {.*INTFC.*PADCAL_VALS} {.*VAUXS_ALT_CTL_SEL.*} -value b1
$prgmConfig set_program_value {.*INTFC.*PADCAL_VALS} {.*VAUXS_ALT_EN.*} -value b0
$prgmConfig set_program_value {.*INTFC.*PADCAL_VALS} {.*VAUXS_ALT_A.*} -value b1
$prgmConfig program
$prgmConfig waitRti 10
}
if { $pinShortMode == 1} {
if { $sub_mode_dotting_type == "primary" } {
$patterns set_pin_shorting_mode primary
puts "INFO: set pin shorting mode to primary"
puts "Running $test..."
vol_gc6_HVALT_EN_s1_test $prgmConfig $patterns $test ;#old vol_gc6_HVALT_EN_s1_test $jtagConfig $patterns $test
} elseif {$sub_mode_dotting_type == "secondary" } {
$patterns set_pin_shorting_mode secondary
puts "INFO: set pin shorting mode to secondary"
puts "Running $test..."
vol_gc6_HVALT_EN_s1_test $prgmConfig $patterns $test ;#old vol_gc6_HVALT_EN_s1_test $jtagConfig $patterns $test
} else {
$patterns set_pin_shorting_mode primary
puts "INFO: set pin shorting mode to primary"
puts "Running $test..."
vol_gc6_HVALT_EN_s1_test $prgmConfig $patterns $test ;#old vol_gc6_HVALT_EN_s1_test $jtagConfig $patterns $test
$patterns set_pin_shorting_mode secondary
puts "INFO: set pin shorting mode to secondary"
puts "Running $test..."
vol_gc6_HVALT_EN_s1_test $prgmConfig $patterns $test ;#old vol_gc6_HVALT_EN_s1_test $jtagConfig $patterns $test
}
} else {
puts "Running $test..."
vol_gc6_HVALT_EN_s1_test $prgmConfig $patterns $test ;#old vol_gc6_HVALT_EN_s1_test $jtagConfig $patterns $test
}
}
proc vih_gc6_HVALT_EN_s0 {args} {
global DEBUG
set orig_args $args
set test "vih_gc6_HVALT_EN_s0"
set options {
{prgmConfig.arg.secret "" ""}
{testConfig.arg "" "Optional argument for test config object needed by test APIs" "NO_CUSTOMIZE"}
{pkg_obj.arg.secret "" ""}
{chip_name.arg.secret "" ""}
{sub_mode_dotting_type.arg "full" " -sub_mode_dotting_type
{bsdl.arg "" " -bsdl
{ballmap.arg "" " -ballmap
{ListArgs.arg "" " -option helper"}
}
::ATE::AteFlowUtils::setTestApiProperty -name_of_list options \
-categoryName "execution_ctrl" \
-propName "ieee_1149_compliance" \
-value 1149.1
set usages "testApi \"[namespace current]::$test allowed\""
array set params [::cmdline::getKnownOptions args $options ]
::ATE::AteFlowUtils::setTestApiProperty -name_of_list options -categoryName "execution_ctrl" -propName "global_init_behavior" -value skip_init
::ATE::AteFlowUtils::setTestApiProperty -name_of_list options -categoryName "execution_ctrl" -propName "test_features" -value "secSHA2"
set valid_submodes [ list primary secondary full ]
if { $params(ListArgs) != "" } {
upvar $params(ListArgs) fullopt
llappend options $fullopt
set fullopt $options
return
} else {
#parray params
## Parse arguments
if {$params(prgmConfig) != ""} {
set prgmConfig $params(prgmConfig) ;#old set jtagConfig $params(jtagConfig)
} else {
puts "Error : (::ATE::jtagtest::$test) Missing jtagConfig object"
}
if {$params(testConfig) != ""} {
set testConfig $params(testConfig)
set ate_config [config_find $testConfig "CURRENT_TEST/CURRENT_SUBTEST/TESTSCRIPT_DEFINED_ARGS/ATE_config"]
set relative_path_local2jtag [config_find $testConfig CURRENT_TEST/relative_path/test2jtag]
if {$ate_config == "" || $ate_config == "None"} {
set iocm_file "$relative_path_local2jtag/custom_IOCM_spec.tn"
} else {
set iocm_file "$relative_path_local2jtag/custom_IOCM_${ate_config}_spec.tn"
}
} else {
puts "Error : (::ATE::jtagtest::$test) Missing testConfig object"
}
if {$params(pkg_obj) != ""} {
set package_obj $params(pkg_obj)
} else {
puts "Error : (::ATE::jtagtest::$test) Missing package object"
}
if {$params(chip_name) != ""} {
set chip_name $params(chip_name)
} else {
puts stderr "Error : There is no CHIP NAME found. Please check your ATE ENV"
exit 1
}
set sub_mode_dotting_type $params(sub_mode_dotting_type)
if {[lsearch -exact $valid_submodes $sub_mode_dotting_type] == -1 } {
puts stderr "Error : (::ATE::jtagtest:$test) You must specify a valid sub_mode_dotting_type"
puts stderr " Use \"jtagtest.tn -help -test $test\" to see valid sub modes"
exit 1
}
if { $params(bsdl) != "" } {
set bsdl_file $params(bsdl)
if { [file exists $bsdl_file]} {
} else {
puts stderr "Error: $bsdl_file doesn't exist, please use -bsdl
}
} else {
puts stderr "Error: Please use -bsdl
exit 1
}
if { $params(ballmap) != "" } {
set ballmap_file $params(ballmap)
if { [file exists $ballmap_file]} {
} else {
puts stderr "Error: $ballmap_file doesn't exist, please use -bsdl
}
} else {
puts stderr "Error: Please use -ballmap
exit 1
}
}
puts "jtagtest subtest \"$test\" called ..."
# tie chip_reset 0 , so won't need unlock
# $prgmConfig set_enable_value Pex_pwr_goodn 1
# $prgmConfig set_pin_value Pex_pwr_goodn 0
# $prgmConfig waitRti 1
set die_obj [config_map_value [config_find $testConfig "CURRENT_TEST"] "die_obj"]
set resetList [::pkgtool::get_vlog_pins_with_test_function $die_obj "RESET#"]
set resetList [lreplace $resetList [lsearch $resetList "jtag_trst_"] [lsearch $resetList "jtag_trst_"]]
puts "Reset pins are : $resetList"
if {[llength $resetList] != 1} {
puts "ERROR, expect only one chip reset"
} else {
foreach reset_signal $resetList {
$prgmConfig set_enable_value $reset_signal 1
$prgmConfig set_pin_value $reset_signal 0
$prgmConfig waitRti 1
}
}
puts "blueg , should program non_bypass_wsc_pipeline to 0 "
$prgmConfig set_program_value ".*/TEST_MASTER_CTRL" .*non_bypass_wsc_pipeline.* -value 0
$prgmConfig program
$prgmConfig set_program_value {.*TOP_FS.*} {.*} -value 0 -replicate
$prgmConfig program
# turn-off the termination of OD pad
set jtagConfig [$prgmConfig get_jtag_config]; jtag_force $jtagConfig {tb.boundary_leakage_mode} 1 ;#old jtag_force $jtagConfig {tb.boundary_leakage_mode} 1
set pinShortMode 0
set extraArg [list]
set patterns [initialize_bsdl_pattern $prgmConfig $bsdl_file $ballmap_file $package_obj $iocm_file pinShortMode $chip_name $extraArg]
#set patterns [initialize_bsdl_pattern $prgmConfig $bsdl_file $ballmap_file $package_obj $pin_dot_file pinShortMode $chip_name $extraArg]
$prgmConfig waitRti 10
if { $test == "vih_gc6_HVALT_EN_s0" } {
$prgmConfig set_program_value {.*/GENPADS_CTRLS} {.*pad_control_disab} -value 1 -replicate
$prgmConfig program
#puts "Programming gpio_pad_input_rcv_en_jtag 1 ; temp_overt_latch_enable 1 ; i2cs_pad_input_rcv_en_jtag 22'h3fffff "
# blueg , those part cause vec_249 for gp100 also ...
puts "Programming sci2pad_HV_ALT_CTL_SEL 1"
#$prgmConfig set_program_value {.*INTFC.*PADCAL_MASK.*} {.*_mask.*} -value 0 -replicate
#$prgmConfig set_program_value {.*INTFC.*PADCAL_MASK.*} {.*_mask.*gpio_pad_input_rcv_en_jtag.*} -value 1 -replicate
#$prgmConfig set_program_value {.*INTFC.*PADCAL_MASK.*} {.*_mask.*temp_overt_latch_enable.*} -value 1 -replicate
#$prgmConfig set_program_value {.*INTFC.*PADCAL_MASK.*} {.*_mask.*i2cs_pad_input_rcv_en_jtag.*} -value 1 -replicate
$prgmConfig set_program_value {.*INTFC.*PADCAL_MASK.*} {.*_mask.*} -value 0 -replicate
$prgmConfig set_program_value {.*INTFC.*PADCAL_MASK.*} {.*_mask.*VAUXS_ALT_CTL_SEL.*} -value 1 -replicate
#$prgmConfig set_program_value {.*INTFC.*PADCAL_VALS.*} {.*_vals.*gpio_pad_input_rcv_en_jtag.*} -value 1 -replicate
#$prgmConfig set_program_value {.*INTFC.*PADCAL_VALS.*} {.*_vals.*temp_overt_latch_enable.*} -value 1 -replicate
#$prgmConfig set_program_value {.*INTFC.*PADCAL_VALS.*} {.*_vals.*i2cs_pad_input_rcv_en_jtag.*} -value 1 -replicate
$prgmConfig set_program_value {.*INTFC.*PADCAL_VALS.*} {.*_vals.*} -value 0 -replicate
$prgmConfig set_program_value {.*INTFC.*PADCAL_VALS.*} {.*_vals.*VAUXS_ALT_CTL_SEL.*} -value 1 -replicate
$prgmConfig program
$prgmConfig waitRti 10
}
if { $pinShortMode == 1} {
if { $sub_mode_dotting_type == "primary" } {
$patterns set_pin_shorting_mode primary
puts "INFO: set pin shorting mode to primary"
puts "Running $test..."
vih_gc6_HVALT_EN_s0_test $prgmConfig $patterns $test ;#old vih_gc6_HVALT_EN_s0_test $jtagConfig $patterns $test
} elseif {$sub_mode_dotting_type == "secondary" } {
$patterns set_pin_shorting_mode secondary
puts "INFO: set pin shorting mode to secondary"
puts "Running $test..."
vih_gc6_HVALT_EN_s0_test $prgmConfig $patterns $test ;#old vih_gc6_HVALT_EN_s0_test $jtagConfig $patterns $test
} else {
$patterns set_pin_shorting_mode primary
puts "INFO: set pin shorting mode to primary"
puts "Running $test..."
vih_gc6_HVALT_EN_s0_test $prgmConfig $patterns $test ;#old vih_gc6_HVALT_EN_s0_test $jtagConfig $patterns $test
$patterns set_pin_shorting_mode secondary
puts "INFO: set pin shorting mode to secondary"
puts "Running $test..."
vih_gc6_HVALT_EN_s0_test $prgmConfig $patterns $test ;#old vih_gc6_HVALT_EN_s0_test $jtagConfig $patterns $test
}
} else {
puts "Running $test..."
vih_gc6_HVALT_EN_s0_test $prgmConfig $patterns $test ;#old vih_gc6_HVALT_EN_s0_test $jtagConfig $patterns $test
}
}
proc vih_gc6_HVALT_EN_s0_test {prgmConfig patterns test} { ;#old proc vih_gc6_HVALT_EN_s0_test {jtagConfig patterns test} {}
$patterns set_compliance_enables ;# sets compliance enables defined in BSDL
# Set Bidirs to X
$patterns set_bidir_data X
$patterns set_bidir_enables 0
# Set_Inputs to X
$patterns set_input_data X
$patterns set_input_enables 1
# Turn off chip drivers
$patterns set_bsr_control 0
# X out the expected data for initial load of boundary scan chain
$patterns set_bsr_control_expected X
$patterns set_bsr_inputs_expected X
$patterns set_bsr_outputs_expected X
$patterns set_bsr_buffers_expected X
$patterns set_bsr_bidirs_expected X
# ScanIn BSR
#if { [info exists bs_dont_use_sample_preload] && $bs_dont_use_sample_preload } {
# bug in mcp67 powerup state machine keeps sample_preload from working
$patterns extest -load
#} else {
# $patterns sample_preload -load
#}
#
# VIH
#
# put chip into EXTEST first so the preloaded data changes TM to 1 and TEN to 1
if { ($test == "vih") || ($test == "vih_gc6_HVALT_EN_s0") } {
set extest [build_jtag_register_chain [$prgmConfig get_jtag_config] -all EXTEST]
} elseif { $test == "vih_pulse" } {
set extest [build_jtag_register_chain [$prgmConfig get_jtag_config] -all PULSE_EXTEST]
} elseif { $test == "vih_train" } {
set extest [build_jtag_register_chain [$prgmConfig get_jtag_config] -all TRAIN_EXTEST]
}
$extest shift_ir
# if { ($test == "vih") || ($test == "vih_gc6_HVALT_EN_s0")} {
# ;#old set extest [jtag_register $jtagConfig EXTEST]
# } elseif { $test == "vih_pulse" } {
# ;#old set extest [jtag_register $jtagConfig PULSE_EXTEST]
# } elseif { $test == "vih_train" } {
# ;#old set extest [jtag_register $jtagConfig TRAIN_EXTEST]
# }
;#old $extest shift_ir
# Set the bidirs to inputs, and assign 0s to all inputs and bidirs.
# Expect 1 for inputs and bidirs, 1 for controls.
#
puts "; Setting inputs to 1 for vih at cycle [get_current_cycle [$prgmConfig get_jtag_config]]"
$patterns set_bsr_control 0
$patterns set_bsr_inputs 1
$patterns set_bsr_outputs 0
$patterns set_bsr_buffers 0
$patterns set_bsr_bidirs 0
$patterns set_bidir_data 1 -bsdPinsOnly
$patterns set_bidir_enables 1
$patterns set_input_data 1
$patterns set_input_enables 1
#blueg , this has being change for gp104
#$patterns set_bsr_control_expected 1
$patterns set_bsr_control_expected 0
$patterns set_bsr_inputs_expected 1
$patterns set_bsr_outputs_expected X
$patterns set_bsr_buffers_expected X
$patterns set_bsr_bidirs_expected 1
$patterns extest -load
# Wait 5 in test logic reset state
#$prgmConfig move_to_state TLR 5
$prgmConfig move_to_state RTI
puts "Test end...."
}
proc vol_gc6_HVALT_EN_s1_test {prgmConfig patterns test} { ;#old proc vol_gc6_HVALT_EN_s1_test {jtagConfig patterns test} {}
#
# VOL test -- put all outputs in drive low mode.
# Last cycle is the point to measure.
#
# sets compliance enables defined in BSDL
$patterns set_compliance_enables
# Turn off chip drivers
$patterns set_bsr_control 0
# X out the expected data for initial load of boundary scan chain
$patterns set_bsr_control_expected X
$patterns set_bsr_inputs_expected X
$patterns set_bsr_outputs_expected X
$patterns set_bsr_buffers_expected X
$patterns set_bsr_bidirs_expected X
# X bidir data and turn off ATE drivers
$patterns set_bidir_data X
$patterns set_bidir_enables 0
$patterns set_output_data X
$patterns set_output_enables 0
$patterns set_input_enables 1
#$patterns set_input_data 0
$patterns set_buffer_data X
$patterns set_buffer_enables 0
$patterns extest -load
;#old set extest_reg [jtag_register $jtagConfig EXTEST]
;#old $extest_reg shift_ir
# Drive pins to high through ATE
puts "@ cycle [get_current_cycle [$prgmConfig get_jtag_config]]"
$patterns set_bidir_data 1
$patterns set_bidir_enables 1
# $patterns set_output_data 1
# $patterns set_output_enables 1
$patterns set_input_enables 1
#$patterns set_input_data 1
$patterns set_buffer_data X
$patterns set_buffer_enables 0
$prgmConfig waitRti 1 ;#old waitRti $jtagConfig 1
# X bidir data and turn off ATE drivers
$patterns set_bidir_data X
$patterns set_bidir_enables 0
$patterns set_output_data X
$patterns set_output_enables 0
$patterns set_input_enables 1
#$patterns set_input_data 0
$patterns set_buffer_data X
$patterns set_buffer_enables 0
# Set up the boundary scan chain to drive out
$patterns set_bsr_inputs 0
$patterns set_bsr_outputs 0
$patterns set_bsr_buffers 0
$patterns set_bsr_bidirs 0
$patterns set_bsr_control 1
# Shift in the BSR chain
$patterns extest -load
$prgmConfig waitRti 100 ;#old waitRti $jtagConfig 100
# Set expected data on all output/bidir pins to 1
#$patterns set_bidir_data 0 -bsdPinsOnly
#$patterns set_output_data 0 -bsdPinsOnly
#$patterns set_buffer_data 0 -bsdPinsOnly
set chip_name [$prgmConfig name]
if {[regexp {lr10} $chip_name ]} {
set gpio_length 21
} else {
set gpio_length 31
}
if { $test == "vol_gc6_HVALT_EN_s1"} {
for {set tempBit 0} {$tempBit < $gpio_length} {incr tempBit } {
puts "tempBit is : $tempBit"
puts "dbg:Gpio\[${tempBit}\]"
$prgmConfig set_enable_value "Gpio\[${tempBit}\]" 0;#old set_enable_value $jtagConfig "Gpio\[${tempBit}\]" 0
$prgmConfig set_pin_value "Gpio\[${tempBit}\]" 1;#old set_pin_value $jtagConfig "Gpio\[${tempBit}\]" 1
$prgmConfig waitRti 1 ;#old waitRti $jtagConfig 1
$prgmConfig set_pin_value "Gpio\[${tempBit}\]" X;#old set_pin_value $jtagConfig "Gpio\[${tempBit}\]" X
$prgmConfig waitRti 5 ;#old waitRti $jtagConfig 5
}
}
# strobe the results
#$patterns strobe_pins
}
proc vih_gc6_HV_CLAMP_s1_test {prgmConfig patterns test} { ;#old proc vih_gc6_HV_CLAMP_s1_test {jtagConfig patterns test} {}
$patterns set_compliance_enables ;# sets compliance enables defined in BSDL
# Set Bidirs to X
$patterns set_bidir_data X
$patterns set_bidir_enables 0
# Set_Inputs to X
$patterns set_input_data X
$patterns set_input_enables 1
# Turn off chip drivers
$patterns set_bsr_control 0
# X out the expected data for initial load of boundary scan chain
$patterns set_bsr_control_expected X
$patterns set_bsr_inputs_expected X
$patterns set_bsr_outputs_expected X
$patterns set_bsr_buffers_expected X
$patterns set_bsr_bidirs_expected X
# ScanIn BSR
#if { [info exists bs_dont_use_sample_preload] && $bs_dont_use_sample_preload } {
# bug in mcp67 powerup state machine keeps sample_preload from working
$patterns extest -load
#} else {
# $patterns sample_preload -load
#}
#
# VIH
#
# put chip into EXTEST first so the preloaded data changes TM to 1 and TEN to 1
if { ($test == "vih") || ($test == "vih_gc6_HV_CLAMP_s1") } {
set extest [build_jtag_register_chain [$prgmConfig get_jtag_config] -all EXTEST]
} elseif { $test == "vih_pulse" } {
set extest [build_jtag_register_chain [$prgmConfig get_jtag_config] -all PULSE_EXTEST]
} elseif { $test == "vih_train" } {
set extest [build_jtag_register_chain [$prgmConfig get_jtag_config] -all TRAIN_EXTEST]
}
$extest shift_ir
# if { ($test == "vih") || ($test == "vih_gc6_HV_CLAMP_s1")} {
# ;#old set extest [jtag_register $jtagConfig EXTEST]
# } elseif { $test == "vih_pulse" } {
# ;#old set extest [jtag_register $jtagConfig PULSE_EXTEST]
# } elseif { $test == "vih_train" } {
# ;#old set extest [jtag_register $jtagConfig TRAIN_EXTEST]
# }
;#old $extest shift_ir
# Set the bidirs to inputs, and assign 0s to all inputs and bidirs.
# Expect 1 for inputs and bidirs, 1 for controls.
#
puts "; Setting inputs to 1 for vih at cycle [get_current_cycle [$prgmConfig get_jtag_config]]"
$patterns set_bsr_control 0
$patterns set_bsr_inputs 1
$patterns set_bsr_outputs 0
$patterns set_bsr_buffers 0
$patterns set_bsr_bidirs 0
$patterns set_bidir_data 1 -bsdPinsOnly
$patterns set_bidir_enables 1
$patterns set_input_data 1
$patterns set_input_enables 1
#blueg , this has being change for gp104
#$patterns set_bsr_control_expected 1
$patterns set_bsr_control_expected 0
$patterns set_bsr_inputs_expected 1
$patterns set_bsr_outputs_expected X
$patterns set_bsr_buffers_expected X
$patterns set_bsr_bidirs_expected 1
if { ($test == "vih") || ($test == "vih_gc6_HV_CLAMP_s1")} {
$patterns extest -load
} elseif { $test == "vih_pulse" } {
$patterns extest -load -ac
} elseif { $test == "vih_train" } {
$patterns extest -load -ac -train
}
# Wait 5 in test logic reset state
#$prgmConfig move_to_state TLR 5
$prgmConfig move_to_state RTI
puts "Test end...."
}
proc vih_gc6_HV_CLAMP_s0_test {prgmConfig patterns test sub_modes } { ;#old proc vih_gc6_HV_CLAMP_s0_test {jtagConfig patterns test} {}
$patterns set_compliance_enables ;# sets compliance enables defined in BSDL
# Set Bidirs to X
$patterns set_bidir_data X
$patterns set_bidir_enables 0
# Set_Inputs to X
$patterns set_input_data X
$patterns set_input_enables 1
# Turn off chip drivers
$patterns set_bsr_control 0
# X out the expected data for initial load of boundary scan chain
$patterns set_bsr_control_expected X
$patterns set_bsr_inputs_expected X
$patterns set_bsr_outputs_expected X
$patterns set_bsr_buffers_expected X
$patterns set_bsr_bidirs_expected X
# ScanIn BSR
#if { [info exists bs_dont_use_sample_preload] && $bs_dont_use_sample_preload } {
# bug in mcp67 powerup state machine keeps sample_preload from working
$patterns extest -load
#} else {
# $patterns sample_preload -load
#}
#
# VIH
#
# put chip into EXTEST first so the preloaded data changes TM to 1 and TEN to 1
if { ($test == "vih") || ($test == "vih_gc6_HV_CLAMP_s0")} {
set extest [build_jtag_register_chain [$prgmConfig get_jtag_config] -all EXTEST]
} elseif { $test == "vih_pulse" } {
set extest [build_jtag_register_chain [$prgmConfig get_jtag_config] -all PULSE_EXTEST]
} elseif { $test == "vih_train" } {
set extest [build_jtag_register_chain [$prgmConfig get_jtag_config] -all TRAIN_EXTEST]
}
$extest shift_ir
# if { ($test == "vih") || ($test == "vih_gc6_HV_CLAMP_s0")} {
# ;#old set extest [jtag_register $jtagConfig EXTEST]
# } elseif { $test == "vih_pulse" } {
# ;#old set extest [jtag_register $jtagConfig PULSE_EXTEST]
# } elseif { $test == "vih_train" } {
# ;#old set extest [jtag_register $jtagConfig TRAIN_EXTEST]
# }
;#old $extest shift_ir
# Set the bidirs to inputs, and assign 0s to all inputs and bidirs.
# Expect 1 for inputs and bidirs, 1 for controls.
#
puts "; Setting inputs to 1 for vih at cycle [get_current_cycle [$prgmConfig get_jtag_config]]"
$patterns set_bsr_control 0
$patterns set_bsr_inputs 1
$patterns set_bsr_outputs 0
$patterns set_bsr_buffers 0
$patterns set_bsr_bidirs 0
$patterns set_bidir_data 1 -bsdPinsOnly
$patterns set_bidir_enables 1
$patterns set_input_data 1
$patterns set_input_enables 1
#blueg , expect ten shift out 0 ; compare with the set_value before last shift
#blueg , this has being change for gp104
#$patterns set_bsr_control_expected 1
$patterns set_bsr_control_expected 0
#blueg , expect inputs io_in/taa_cell 1
$patterns set_bsr_inputs_expected 1
$patterns set_bsr_bidirs_expected 1
$patterns set_bsr_outputs_expected X
$patterns set_bsr_buffers_expected X
if { $test == "vih_gc6_HV_CLAMP_s0"} {
puts "Because follow pad's TZI output can be clamped by HV_CORE_CLAMP, so set the expected value to be 0"
set chip_name [$prgmConfig name]
if {[regexp {ga10} $chip_name ]} {
set gpio_length 36
} elseif {[regexp {lr10} $chip_name ]} {
set gpio_length 21
} else {
set gpio_length 31
}
for {set tempBit 0} {$tempBit < $gpio_length} {incr tempBit } {
puts "tempBit is : $tempBit"
puts "dbg:Gpio\[${tempBit}\]"
$patterns set_bsr_expected "Gpio\[${tempBit}\]" 0
}
for {set tempBit 0} {$tempBit < $gpio_length} {incr tempBit } {
puts "tempBit is : $tempBit"
puts "dbg:testio_d\[${tempBit}\]"
$patterns set_bsr_expected "Gpio\[${tempBit}\]" 0
}
set chip_name [$prgmConfig name]
if {[regexp {lr10} $chip_name ]} {
puts "dbg: xtaloutbuff 0"
#$patterns set_bsr_expected "xtaloutbuff" 0
$patterns set_bsr_expected "fuse_en" 0
#In gp100, overt pad doesn't have it's TZI clamp to 0 based on HV_CORE_CLMP signal, confirmed by designers
#$patterns set_bsr_expected "overt" 0
puts "dbg: we don't have xtals_in"
#$patterns set_bsr_expected "xtals_in" 0
$patterns set_bsr_expected "rom_so" 0
$patterns set_bsr_expected "rom_si" 0
$patterns set_bsr_expected "rom_sclk" 0
$patterns set_bsr_expected "rom_cs_n" 0
} else {
puts "dbg: xtaloutbuff 0"
$patterns set_bsr_expected "xtaloutbuff" 0
$patterns set_bsr_expected "fuse_en" 0
#In gp100, overt pad doesn't have it's TZI clamp to 0 based on HV_CORE_CLMP signal, confirmed by designers
#$patterns set_bsr_expected "overt" 0
puts "dbg: we don't have xtals_in"
#$patterns set_bsr_expected "xtals_in" 0
$patterns set_bsr_expected "Rom_so" 0
$patterns set_bsr_expected "Rom_si" 0
$patterns set_bsr_expected "rom_sclk" 0
$patterns set_bsr_expected "strap\[0\]" 0
#Edited As there are no boundary scan cells related to strap1, 2, 3, 4 , removing them
$patterns set_bsr_expected "strap\[1\]" 0
$patterns set_bsr_expected "strap\[2\]" 0
$patterns set_bsr_expected "strap\[3\]" 0
$patterns set_bsr_expected "strap\[4\]" 0
$patterns set_bsr_expected "strap\[5\]" 0
puts "blueg, newly add strap6 ext_refclka ext_refclkb rom_cs"
$patterns set_bsr_expected "rom_cs_" 0
}
# $patterns set_bsr_expected "strap\[6\]" 0
#TBD$patterns set_bsr_expected "ext_refclk_fl" 0
##vanky,ext_refclk_sli do not exsite in tu106/tu116/tu117
#set chip_name [$prgmConfig name]
if {[regexp {102} $chip_name ]} {
puts "setting ext_refclk_sli ext_refclk_fl ifp\[A-F\]_aux to 0"
$patterns set_bsr_expected "ext_refclk_sli" 0
$patterns set_bsr_expected "ext_refclk_fl" 0
$patterns set_bsr_expected "ifpA_aux" 0
$patterns set_bsr_expected "ifpB_aux" 0
$patterns set_bsr_expected "ifpC_aux" 0
$patterns set_bsr_expected "ifpD_aux" 0
$patterns set_bsr_expected "ifpE_aux" 0
$patterns set_bsr_expected "ifpF_aux" 0
} elseif {[regexp {103} $chip_name ] || [regexp {104} $chip_name ]} {
puts "setting ext_refclk_fl ifp\[A-F\]_aux to 0"
$patterns set_bsr_expected "ext_refclk_fl" 0
$patterns set_bsr_expected "ifpA_aux" 0
$patterns set_bsr_expected "ifpB_aux" 0
$patterns set_bsr_expected "ifpC_aux" 0
$patterns set_bsr_expected "ifpD_aux" 0
$patterns set_bsr_expected "ifpE_aux" 0
$patterns set_bsr_expected "ifpF_aux" 0
} elseif {[regexp {106} $chip_name ]} {
puts "rupingx add setting ext_refclk_sli ext_refclk_fl ifp\[A-F\]_aux to 0"
$patterns set_bsr_expected "ext_refclk_fl" 0
$patterns set_bsr_expected "ifpA_aux" 0
$patterns set_bsr_expected "ifpB_aux" 0
$patterns set_bsr_expected "ifpC_aux" 0
$patterns set_bsr_expected "ifpD_aux" 0
$patterns set_bsr_expected "ifpE_aux" 0
$patterns set_bsr_expected "ifpF_aux" 0
} elseif {[regexp {107} $chip_name ]} {
puts "rupingx add setting ext_refclk_sli ext_refclk_fl ifp\[A-F\]_aux to 0"
$patterns set_bsr_expected "ext_refclk_fl" 0
$patterns set_bsr_expected "ifpA_aux" 0
$patterns set_bsr_expected "ifpB_aux" 0
$patterns set_bsr_expected "ifpC_aux" 0
$patterns set_bsr_expected "ifpD_aux" 0
$patterns set_bsr_expected "ifpE_aux" 0
} elseif {[regexp {116} $chip_name ]} {
} elseif {[regexp {117} $chip_name ]} {
} else {
#TB $patterns set_bsr_expected "ext_refclk_sli" 0
}
#$patterns set_bsr_expected "fl_refclk" 0
#Removing I2ca/b/c as their pads do not hav5 HV_CORE_CLMP signal control
#comment this due to I2c have HV_CORE_CLMP in ga100
# set I2cList [list b c s]
# foreach tempPort $I2cList {
# $patterns set_bsr_expected "I2c${tempPort}_scl" 0
# $patterns set_bsr_expected "I2c${tempPort}_sda" 0
# puts "dbg: I2c${tempPort}_scl 0"
# }
# For ga100, no if* pins
# $patterns set_bsr_expected "ifpA_aux" 0
# $patterns set_bsr_expected "ifpB_aux" 0
# $patterns set_bsr_expected "ifpC_aux" 0
# $patterns set_bsr_expected "ifpD_aux" 0
# $patterns set_bsr_expected "ifpE_aux" 0
if {[regexp {117} $chip_name ]} {
} else {
# $patterns set_bsr_expected "ifpF_aux" 0
}
if { [regexp {i2c} $sub_modes] } {
puts "only for i2c add value test"
if {[regexp {102} $chip_name ]} {
puts "setting ifp\[A-F\]_aux_ to 0 in i2c mode"
$patterns set_bsr_expected "ifpA_aux_" 0
$patterns set_bsr_expected "ifpB_aux_" 0
$patterns set_bsr_expected "ifpC_aux_" 0
$patterns set_bsr_expected "ifpD_aux_" 0
$patterns set_bsr_expected "ifpE_aux_" 0
$patterns set_bsr_expected "ifpF_aux_" 0
} elseif {[regexp {106} $chip_name ]} {
puts "setting ifp\[A-F\]_aux_ to 0 in i2c mode"
$patterns set_bsr_expected "ext_refclk_fl" 0
$patterns set_bsr_expected "ifpA_aux_" 0
$patterns set_bsr_expected "ifpB_aux_" 0
$patterns set_bsr_expected "ifpC_aux_" 0
$patterns set_bsr_expected "ifpD_aux_" 0
$patterns set_bsr_expected "ifpE_aux_" 0
$patterns set_bsr_expected "ifpF_aux_" 0
} elseif {[regexp {107} $chip_name ]} {
puts "setting ifp\[A-F\]_aux_ to 0 in i2c mode"
$patterns set_bsr_expected "ext_refclk_fl" 0
$patterns set_bsr_expected "ifpA_aux_" 0
$patterns set_bsr_expected "ifpB_aux_" 0
$patterns set_bsr_expected "ifpC_aux_" 0
$patterns set_bsr_expected "ifpD_aux_" 0
$patterns set_bsr_expected "ifpE_aux_" 0
} else {
# $patterns set_bsr_expected "ifpF_aux_" 0
}
}
if {[regexp {117} $chip_name ]} {
} else {
#@ $patterns set_bsr_expected "usb_scl" 0
#@ $patterns set_bsr_expected "usb_sda" 0
}
# pex_wake_n has no HV_CORE_CLAMP in ga100
# $patterns set_bsr_expected "pex_wake_n" 0
}
#set dbg_msg_enable 1
#dump_bsr_setting -prgmConfig $prgmConfig -patterns_obj $patterns -enable $dbg_msg_enable
$patterns extest -load
# Wait 5 in test logic reset state
#$prgmConfig move_to_state TLR 5
$prgmConfig move_to_state RTI
puts "Test end...."
}
proc vih_fb_clamp_test { prgmConfig patterns test skipped_fba_cmd_pin_list} { ;#old proc vih_fb_clamp_test { jtagConfig patterns test skipped_fba_cmd_pin_list} {}
$patterns set_compliance_enables ;# sets compliance enables defined in BSDL
if { $test == "vih_fb_clamp" } {
#blueg , this pin have being remove , also can not find any pad with POWER_CLAMP scan type
#$prgmConfig set_pin_value fb_clamp 1;#old set_pin_value $jtagConfig fb_clamp 1
# sci2fb_fb_clamp = (jtag_mask_pgclamp_dest_PD_NVVDD) ? jtag_val_pgclamp_dest_PD_NVVDD : fb_clamp;
# $prgmConfig set_program_value {.*/POWER_CTL.*} {.*split_rail_override.*} -value 1'b1
# $prgmConfig set_program_value {.*/POWER_CTL.*} {.*split_rail_value.*} -value 1'b0
# $prgmConfig program
# $prgmConfig set_program_value {.*RG_CTL_MASK} {.*jtag_mask_pgclamp_dest_PD_NVVDD} -value 1
# $prgmConfig set_program_value {.*RG_CTL_VAL} {.*jtag_val_pgclamp_dest_PD_NVVDD} -value 1
# $prgmConfig program
}
# Set Bidirs to X
$patterns set_bidir_data X
$patterns set_bidir_enables 0
# Set_Inputs to X
$patterns set_input_data X
$patterns set_input_enables 1
# Turn off chip drivers
$patterns set_bsr_control 0
# X out the expected data for initial load of boundary scan chain
$patterns set_bsr_control_expected X
$patterns set_bsr_inputs_expected X
$patterns set_bsr_outputs_expected X
$patterns set_bsr_buffers_expected X
$patterns set_bsr_bidirs_expected X
# ScanIn BSR
#if { [info exists bs_dont_use_sample_preload] && $bs_dont_use_sample_preload } {
# bug in mcp67 powerup state machine keeps sample_preload from working
set dbg_msg_enable 1
dump_bsr_setting -prgmConfig $prgmConfig -patterns_obj $patterns -enable $dbg_msg_enable
$patterns extest -load
#} else {
# $patterns sample_preload -load
#}
#
# VIH
#
# put chip into EXTEST first so the preloaded data changes TM to 1 and TEN to 1
if { ($test == "vih") || ($test == "vih_fb_clamp")} {
set extest [build_jtag_register_chain [$prgmConfig get_jtag_config] -all EXTEST]
} elseif { $test == "vih_pulse" } {
set extest [build_jtag_register_chain [$prgmConfig get_jtag_config] -all PULSE_EXTEST]
} elseif { $test == "vih_train" } {
set extest [build_jtag_register_chain [$prgmConfig get_jtag_config] -all TRAIN_EXTEST]
}
$extest shift_ir
#if { ($test == "vih") || ($test == "vih_fb_clamp")} {
# ;#old set extest [jtag_register $jtagConfig EXTEST]
#} elseif { $test == "vih_pulse" } {
# ;#old set extest [jtag_register $jtagConfig PULSE_EXTEST]
#} elseif { $test == "vih_train" } {
# ;#old set extest [jtag_register $jtagConfig TRAIN_EXTEST]
#}
;#old $extest shift_ir
# Set the bidirs to inputs, and assign 0s to all inputs and bidirs.
# Expect 1 for inputs and bidirs, 1 for controls.
#
puts "; Setting inputs to 1 for vih at cycle [get_current_cycle [$prgmConfig get_jtag_config]]"
$patterns set_bsr_control 0
$patterns set_bsr_inputs 1
$patterns set_bsr_outputs 0
$patterns set_bsr_buffers 0
$patterns set_bsr_bidirs 0
$patterns set_bidir_data 1 -bsdPinsOnly
$patterns set_bidir_enables 1
$patterns set_input_data 1
$patterns set_input_enables 1
#blueg , this has being change since gp104
#$patterns set_bsr_control_expected 1
$patterns set_bsr_control_expected 0
$patterns set_bsr_inputs_expected 1
$patterns set_bsr_outputs_expected X
$patterns set_bsr_buffers_expected X
$patterns set_bsr_bidirs_expected 1
set chip_name [$prgmConfig name]
if { $test == "vih_fb_clamp"} {
if {[regexp {102} $chip_name ]} {
#puts "dbg, 102"
set fb_portlist [list a b c d e f]
} elseif {[regexp {104} $chip_name ]} {
#puts "dbg, 104"
set fb_portlist [list a b c d]
} elseif {[regexp {106} $chip_name ]} {
#puts "dbg, 106"
set fb_portlist [list a b c d]
} elseif {[regexp {116} $chip_name ]} {
set fb_portlist [list a b c]
} elseif {[regexp {117} $chip_name ]} {
set fb_portlist [list a b]
} else {
#puts "dbg, default"
set fb_portlist [list a b c d]
}
#set fb_portlist [list A B C D ]
for {set tempBit 0} {$tempBit < 36} {incr tempBit } {
puts "tempBit is : $tempBit"
if {[lsearch -exact $skipped_fba_cmd_pin_list $tempBit] != -1} {
puts "skip bit: $tempBit"
continue
}
foreach tempType $fb_portlist {
puts "dbg:Fb${tempType}_cmd\[${tempBit}\]"
# $patterns set_bsr_expected "Fb${tempType}_cmd\[${tempBit}\]" 0
}
}
for {set tempBit 0} {$tempBit < 64} {incr tempBit } {
foreach tempType $fb_portlist {
puts "dbg:Fb${tempType}_data\[${tempBit}\]"
# $patterns set_bsr_expected "Fb${tempType}_data\[${tempBit}\]" 0
}
}
for {set tempBit 0} {$tempBit < 8} {incr tempBit } {
foreach tempType $fb_portlist {
# $patterns set_bsr_expected "Fb${tempType}_dqm\[${tempBit}\]" 0
# $patterns set_bsr_expected "Fb${tempType}_wdqs\[${tempBit}\]" X
#$patterns set_bsr_expected "Fb${tempType}_rdqs\[${tempBit}\]" 0
#$patterns set_bsr_expected "FB${tempType}_DQS_RN${tempBit}" 0
}
}
}
set dbg_msg_enable 1
dump_bsr_setting -prgmConfig $prgmConfig -patterns_obj $patterns -enable $dbg_msg_enable
$patterns extest -load
# Wait 5 in test logic reset state
#$prgmConfig move_to_state TLR 5
$prgmConfig move_to_state RTI 5
}
}
Friday, 6 December 2019
Display API
17:14
No comments
Lyte Byte Tech News
Site Archive
Recommended
-
High PR Dofollow Forum Posting Site list Signature.Forum sites of general interest to the community. Mostly people connect to the forum to ...
-
Article submission is the best way to boost your website traffic and plays a wonderful role in getting quality backlinks for websites. So,...
-
11 ways to How to make Money Online without any Investment there are many to earn money from online, you can get a list bunch of types w...
-
Kickass torrents alleged owner, Artem Vaulin, have been arrested in Poland as part of a lawsuit filed by the United States. Kat in many do...
-
When Google ignores your title Tag In some relatively rare cases, Google- use Open Directory is the title page. Similarly, if a page h...
-
How can I contact the owner of a website . Where a particular website is hosted. What other sites are hosted on the same server. Does the w...
-
Avast and AVG are very well known in the cyber security space, as well as consumers. Avast, which commands a fifth of the global antiviru...
-
Once the malware is capable of doing enough damage to your computer, especially if you use a computer for professional purposes.Therefore th...
-
Many people will always love to choose blogger.com as there platform, bloggers give a healthy start to their career. The fact is quite clear...
-
You really need an antivirus program for 2016. yes. Yes, you do. The short answer is that you should be because common sense is not that co...
0 comments :