set_tcl_shell_options -make_errors_in_tool_commands_return_an_error_string on
set_transcript_style input_only
system rm -fr chip.cdp
set_context pattern -silicon_insight
read_icl {../data/icl/*.icl}
set_current_design chip
run_testbench_simulations -simdut_server -simulator_options {+nowarnTSCALE}
read_config_data si.setup
read_config_data demo.pat_spec
set_config_value
/PatternsSpecification(chip,gate,manufacturing)/manufacturing_patterns_format svf
# set_config_value
/PatternsSpecification(chip,gate,manufacturing)/CharacterizationDebugOptions/
IclNetwork/diagnosis_result diagnosed_suspects
assert_command { create_icl_flush_pattern test_flush } -expect error
start_silicon_insight
# set_icl_diagnosis_options -verbosity 1
process_patterns_spec
report_icl_network -node_type all -detailed > graph.txt
# disallow backfilling the Sib/ScanMux configuration data. So, if a Sib/ScanMux
# is configured to a value, the PDL commands for it will be generated immediately.
set_debug_control +ijtag/disablePatchableBits
# set_debug_control +ijtag/satIjtagOptimiser
report_icl_network -generate_setup_patset setup -detailed
report_icl_network -write_setup_pattern incremental_setup
add_cdp_test all_scan_elements_setup -pattern incremental_setup.svf
execute_cdp_test all_scan_elements_setup -collect_data_type_list variable
report_icl_network -node_name block1_I1.sib1
report_icl_network -node_type sib
report_icl_network -current_scan_path
add_simdut_fault -signal /SIMDUT_TB/DUT_inst/block1_I1/tdr1_I1/so -fault 0
analyze_icl_suspect -top_down_diagnosis stop_on_first_fail
analyze_icl_suspect -top_down_diagnosis prune_branch_on_fail
analyze_icl_suspect -top_down_diagnosis minimum_traversal
# comment it out as for now there is a bug.
# analyze_icl_suspect -top_down_diagnosis full_traversal
# set_access_code -code [ create_access_code TSI_IjtagNetworkDiagnosis ]
# It'll not diagnose since no diagnostic collateral data has not been generated for
the test yet.
execute_cdp_test ICLNetwork -force_diagnose_on_failure -collect_data_type_list
{ variable diagnosis }
# Turn on diagnose_on_failure and process_patterns_spec and it'll now diagnose
set_config_value
/PatternsSpecification(chip,gate,manufacturing)/Patterns(ICLNetwork)/
CharacterizationDebugOptions/diagnose_on_failure on
process_patterns_spec
report_icl_network -failing_scan_path_names ICLNetwork
execute_cdp_test ICLNetwork -collect_data_type_list diagnosis
report_icl_network -failing_scan_path_names ICLNetwork
report_silicon_insight_result -icl_diagnosis suspect
report_silicon_insight_result -icl_diagnosis good
report_silicon_insight_result -icl_diagnosis bad
report_silicon_insight_result -icl_diagnosis untested
assert_command { report_silicon_insight_result -icl_diagnosis bogus } -expect error
set res [get_icl_network -nodes_of_status suspect]
puts "result = '$res'"
set res [get_icl_network -nodes_of_status good]
puts "result = '$res'"
set res [get_icl_network -nodes_of_status bad]
puts "result = '$res'"
set res [get_icl_network -nodes_of_status untested]
puts "result = '$res'"
assert_command { get_icl_network -nodes_of_status bogus } -expect error
report_icl_network -tested_scan_paths ICLNetwork
report_icl_network -tested_scan_paths ICLNetwork -detailed
report_icl_network -failing_scan_path_names ICLNetwork
set res [get_icl_network block1_I1.sib1 -node_type]
puts "result = '$res'"
set res [get_icl_network block1_I1.sib1 -inputs]
puts "result = '$res'"
set res [get_icl_network block1_I1.sib1 -outputs]
puts "result = '$res'"
set res [get_icl_network block1_I1.sib1 -current_input_index]
puts "result = '$res'"
set res [get_icl_network tap_I1.DRMux -selector]
puts "result = '$res'"
set res [get_icl_scan_mux tap_I1.DRMux -selector]
puts "result = '$res'"
set res [get_icl_network -nodes_of_type ScanMux]
puts "result = '$res'"
set res [get_icl_network -nodes_of_type ScanReg]
puts "result = '$res'"
set res [get_icl_network -nodes_of_type All]
puts "result = '$res'"
set res [get_icl_network -current_scan_path_length]
puts "result = '$res'"
set res [get_icl_network -current_scan_path_nodes]
puts "result = '$res'"
set_icl_scan_mux tap_I1.DRMux -selected_input 1
assert_icl_sib sib_I3
report_icl_network -current_scan_path
assert_command { report_icl_network } -expect error
assert_command { report_icl_network -node_name non_existing_node_name } -expect
error
assert_command { report_icl_network -node_type non_existing_node_type } -expect
error
assert_command { assert_icl_sib sib_I4 -host_index 1 } -expect error
assert_command { assert_icl_sib sib_I4 -host_index -1 } -expect error
assert_command { get_icl_network -nodes_of_type not_existing_type } -expect error
assert_command { create_icl_setup_pattern test_setup -pattern_type bogus } -expect
error
assert_command { create_icl_flush_pattern test_flush -pattern_type bogus } -expect
error
set_icl_network -reset_current_scan_path
set_icl_network -reset_diagnosis_result
report_icl_network -current_scan_path
# Test some debug commands.
set name "block1_I1.tdr1.R[7:0]"
set gate_id [get_icl_network $name -gate_id]
puts "gate Id for '$name' = $gate_id"
set gate_name [get_icl_network -gate_name $gate_id]
puts "gate name for gate id $gate_id is '$gate_name'"
set gate_type [get_icl_network -gate_type $gate_id]
puts "gate type for gate id $gate_id is '$gate_type'"
set host_tags [get_icl_sib_host_interface_tags block1_I1.sib1]
puts "host tags for sib 'block1_I1.sib1' = '$host_tags'"
stop_silicon_insight
exit -f