Visible to Intel only — GUID: bss1661880801626
Ixiasoft
Visible to Intel only — GUID: bss1661880801626
Ixiasoft
13.9.8.2. Claiming and Releasing the TG Config Interface
Graphical User Interface (GUI) Method
To claim the TG Config service, click CLAIM TG CONFIG INTERFACE. The tabs are enabled after you claim the service successfully.
After you are finished using the TG2 interface, click RELEASE TG CONFIG INTERFACE to release the service instance and make the resource available to other users.
Scripting Method
If you write your own script to access the traffic generator, you must claim the TG Config service. Refer to the example below for claiming and releasing the service.
The following is the service path for the TG2 traffic generator:
*/alt_sld_fab_0_alt_sld_fab_0_host_link_jtag.h2t/alt_sld_fab_0_alt_sld_fab_0_stfabric.h2t_0/alt_sld_fab_0_alt_sld_fab_0_memfabric_transacto.avalon_master/master_1_0.slaveExample code to claim and release the TG2 service:
#Example Code to claim/release the TG2 service
#Check for available service paths.
set service_paths [get_service_paths slave]
#Set the TG2 service path. Assume index 2 is the TG2 service path in this example
#User needs to check the service_paths list to identify the index for the TG2 in your system
set tg_service_path [lindex $service_paths 2]
#Open the slave service.
set claimed_path [claim_service slave $tg_service_path mylib]
#User code to write/read to TG2
#Read the TG Version
puts "TG Version : [master_read_32 $claimed_path 0x0 1]"
#Clear the TG_STATUS before Retest with Default Traffic
puts "\nClear TG_STATUS"
master_write_32 $claimed_path 0x20 0xf
#Read the Read_Count-Low
puts "Read Count - Low : [master_read_32 $claimed_path 0x1d8 1]"
#Read the Read_Count-High
puts "Read Count - High : [master_read_32 $claimed_path 0x1dc 1]"
#Restart Default Traffic
puts "\nWrite to TG_RESTART_DEFAULT_TRAFFIC"
master_write_32 $claimed_path 0x1e8 1
set TG_TEST_COMPLETE 0
while { $TG_TEST_COMPLETE < 1 } {
set TG_TEST_COMPLETE [expr [ master_read_32 $claimed_path 0x1e0 1] & 0x1 ]
puts "\nTG_TEST_COMPLETE : $TG_TEST_COMPLETE"
}
#Read the Read_Count-Low
puts "Read Count - Low : [master_read_32 $claimed_path 0x1d8 1]"
#Read the Read_Count-High
puts "Read Count - High : [master_read_32 $claimed_path 0x1dc 1]"
#Read the TG_PASS
puts "Pass : [expr [master_read_32 $claimed_path 0x1c0 1] & 0x1 ]"
#Read the TG_FAIL
puts "Fail : [expr [master_read_32 $claimed_path 0x1c4 1] & 0x1 ]"
#End of write/read to TG2
#Close the slave service.
close_service slave $claimed_path