External Memory Interfaces Intel® Agilex™ 7 F-Series and I-Series FPGA IP User Guide

ID 683216
Date 4/03/2023

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents Claiming/Releasing the TG Config Interface

Before using the Traffic Generator (TG2) interface, you must claim the service to the TG Config interface. All the tabs in the traffic generator interface are disabled until you claim the service.

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.

Figure 230. Click CLAIM TG CONFIG INTERFACE Before Using the TG2 Interface

After you are finished using the TG2 interface, click RELEASE TG CONFIG INTERFACE to release the service instance and direct the System Console to make the resource available to other users.

Figure 231. Click RELEASE TG CONFIG INTERFACE to Release the Service for Other Users

Scripting Method

If you are writing 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:


Example 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
    while { $TG_TEST_COMPLETE < 1 } {
    set TG_TEST_COMPLETE [expr [ master_read_32 $claimed_path 0x1e0 1] & 0x1 ]

    #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