UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Adventurer
Adventurer
2,710 Views
Registered: ‎12-26-2016

Create IP Cores with TCL script and file reference

Jump to solution

Hi there,

I would like to create some own IP cores for my master thesis. My work will later be used by a research assistant who is short in time for learning the vivado suite. Therefore I would like to make things easy for him.

 

In my project I decided to use own IP cores. To reproduce my actions I copy every tcl console output (which is a command) into a seperate tcl script:

if {[catch {current_project} result ]} {

} else {
puts "$result is open and will be closed!"
close_project
}

# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # 
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # 
# Create the IP Core Wrapper for the whole managed cores

create_project -force managed_ip_project VHDL/IPCores/managed_ip_project -part xc7z010clg400-1
set_property target_language VHDL [current_project]
set_property simulator_language VHDL [current_project]
set_property target_simulator XSim [current_project]

# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # 
# 							create the TDM8 RX IP Core
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # 

create_peripheral xilinx.com user TDM8_rx_AXIS 0.2 -dir VHDL/IPCores/managed_ip_project/../ip_repo
add_peripheral_interface M_AXIS -interface_mode master -axi_type stream [ipx::find_open_core xilinx.com:user:TDM8_rx_AXIS:0.2]
generate_peripheral [ipx::find_open_core xilinx.com:user:TDM8_rx_AXIS:0.2]
write_peripheral [ipx::find_open_core xilinx.com:user:TDM8_rx_AXIS:0.2]
set_property  ip_repo_paths  VHDL/IPCores/managed_ip_project/../ip_repo/TDM8_rx_AXIS_0.2 [current_project]
update_ip_catalog -rebuild

ipx::edit_ip_in_project -upgrade true -name edit_TDM8_rx_AXIS_v0_2 -directory VHDL/IPCores/managed_ip_project/../ip_repo VHDL/IPCores/ip_repo/TDM8_rx_AXIS_0.2/component.xml

set_property vendor ThomasMaintz [ipx::current_core]
set_property library TMAThesis [ipx::current_core]
set_property description {Converts the TDM8 Slave Receiver into the AXI Stream as a Master} [ipx::current_core]
add_files -norecurse -copy_to VHDL/IPCores/ip_repo/TDM8_rx_AXIS_0.2/src { VHDL/Code/PCM/pcm_package.vhd  VHDL/Code/TDM8/tdm8_package.vhd  VHDL/Code/TDM8/tdm8_trx.vhd} -force

set_property value_validation_list {32 24} [ipx::get_user_parameters C_M_AXIS_TDATA_WIDTH -of_objects [ipx::current_core]]
set_property widget {textEdit} [ipgui::get_guiparamspec -name "C_M_AXIS_START_COUNT" -component [ipx::current_core] ]
set_property value_validation_range_minimum 1 [ipx::get_user_parameters C_M_AXIS_START_COUNT -of_objects [ipx::current_core]]
set_property value_validation_range_maximum 64 [ipx::get_user_parameters C_M_AXIS_START_COUNT -of_objects [ipx::current_core]]

# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # 
#               NOW COPY AND PASTE THE IP CORE VHDL FILES
#               FROM THE TDM8 DIRECTORY INTO THE CREATED
#               VHDL FILES!
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # 

update_compile_order -fileset sources_1
ipx::merge_project_changes files [ipx::current_core]

set_property previous_version_for_upgrade xilinx.com:user:TDM8_rx_AXIS:0.2 [ipx::current_core]
set_property core_revision 1 [ipx::current_core]
ipx::create_xgui_files [ipx::current_core]
ipx::update_checksums [ipx::current_core]
ipx::save_core [ipx::current_core]
close_project -delete
update_ip_catalog -rebuild -repo_path VHDL/IPCores/ip_repo/TDM8_rx_AXIS_0.2

Now I have 2 problems:

1.) All source files from the add_files command are copied into the IP core directory. I want them referenced so I have one single file to edit. How can I do that?

2.) If I create another IP core the old one vanishes from the IP catalog. Maybe I do something horribly wrong in the TCL script. Does anyone sees my mistake?

 

If you need more files / information just let me know ;)

 

-

Thomas

0 Kudos
1 Solution

Accepted Solutions
Observer yurifiore
Observer
4,126 Views
Registered: ‎07-21-2016

Re: Create IP Cores with TCL script and file reference

Jump to solution

Hi Thomas,

 

1) To add a file without copying it into your project, instead of specifying "-copy_to", try to use a simple:

 

-add_files -norecurse <path_of_the_file>

 

2) I suppose the error relies in one of the following: 

 

update_ip_catalog -rebuild

 

update_ip_catalog -rebuild -repo_path VHDL/IPCores/ip_repo/TDM8_rx_AXIS_0.2

 

What I suggest is to try executing the tcl commands line by line in the GUI and performing the update of the IP catalog manually through the GUI itself, then take a look at the tcl consolle 

 

Cheers,

 

Yuri

 

---------------------------------------------------------------

Please accept as reply and give kudos if you found these info useful 

 

View solution in original post

2 Replies
Observer yurifiore
Observer
4,127 Views
Registered: ‎07-21-2016

Re: Create IP Cores with TCL script and file reference

Jump to solution

Hi Thomas,

 

1) To add a file without copying it into your project, instead of specifying "-copy_to", try to use a simple:

 

-add_files -norecurse <path_of_the_file>

 

2) I suppose the error relies in one of the following: 

 

update_ip_catalog -rebuild

 

update_ip_catalog -rebuild -repo_path VHDL/IPCores/ip_repo/TDM8_rx_AXIS_0.2

 

What I suggest is to try executing the tcl commands line by line in the GUI and performing the update of the IP catalog manually through the GUI itself, then take a look at the tcl consolle 

 

Cheers,

 

Yuri

 

---------------------------------------------------------------

Please accept as reply and give kudos if you found these info useful 

 

View solution in original post

Adventurer
Adventurer
2,679 Views
Registered: ‎12-26-2016

Re: Create IP Cores with TCL script and file reference

Jump to solution
Thanks! Worked for me
0 Kudos