<: ;#Component and file information :>
<: set ComponentName [getComponentNameString] :>
<: set family [getStringValue "C_FAMILY"] :>
<: setOutputDirectory "./" :>
<: setFileName "top_set" :>
<: setFileExtension ".tcl" :>
<: set wd [ file dirname [ get_property xml_file_name [ current_ipbom ] ] ] :>
create_ip -name axi_traffic_gen -vendor xilinx.com -library ip -module_name axi_traffic_gen_0

set coe1 [lindex [get_property name [get_files *atg_addr.coe]] 0 ]
set coe2 [lindex [get_property name [get_files *atg_mask.coe]] 0 ]
set coe3 [lindex [get_property name [get_files *atg_ctrl.coe]] 0 ]
set coe4 [lindex [get_property name [get_files *atg_data.coe]] 0 ]

set_property -dict [list CONFIG.C_ATG_MODE {AXI4-Lite} CONFIG.C_ATG_SYSTEM_INIT_ADDR_MIF $coe1 CONFIG.C_ATG_SYSTEM_INIT_MASK_MIF $coe2 CONFIG.C_ATG_SYSTEM_INIT_CTRL_MIF $coe3 CONFIG.C_ATG_SYSTEM_INIT_DATA_MIF $coe4 CONFIG.C_ATG_SYSINIT_MODES {System_Test} CONFIG.C_ATG_SYSTEM_TEST_MAX_CLKS {2147483647} CONFIG.C_ATG_SYSTEM_CMD_MAX_RETRY {2147483647} CONFIG.C_ATG_MIF_DATA_DEPTH {256}] [get_ips axi_traffic_gen_0]
generate_target all [get_ips axi_traffic_gen_0]
<: if {([string first "versal" $family] == -1) && ([string first "everest" $family] == -1)} { :>
create_ip -name clk_wiz  -vendor xilinx.com -library ip -module_name clk_wiz_0
set_property -dict [list CONFIG.PRIM_SOURCE {Differential_clock_capable_pin} CONFIG.PRIM_IN_FREQ {200.000} CONFIG.CLKOUT1_REQUESTED_OUT_FREQ {50.000}] [get_ips clk_wiz_0]
generate_target all [get_ips clk_wiz_0]
<: } else { :>
create_ip -name clk_wizard -vendor xilinx.com -library ip -module_name clk_wiz_0
set_property -dict [list CONFIG.USE_RESET {true} CONFIG.USE_LOCKED {true} CONFIG.PRIM_IN_FREQ {200.000} CONFIG.PRIM_SOURCE {Differential_clock_capable_pin} CONFIG.CLKOUT_USED {true,false,false,false,false,false,false} CONFIG.CLKOUT_PORT {clk_out1,clk_out2,clk_out3,clk_out4,clk_out5,clk_out6,clk_out7} CONFIG.CLKOUT_REQUESTED_OUT_FREQUENCY {50.000,50.000,60.000,100.000,100.000,100.000,100.000}] [get_ips clk_wiz_0]
generate_target all [get_ips clk_wiz_0]
<: } :>
set_property top <=: $ComponentName :>_exdes [current_fileset]
update_compile_order -fileset sources_1
set_property top <=: $ComponentName :>_exdes_tb [get_filesets sim_1]
set_property top_lib {} [get_filesets sim_1]
set_property top_file {} [get_filesets sim_1]
update_compile_order -fileset sim_1
