December 18, 2024

Vivado and Tcl - custom IP

We have learned that in the vivado GUI, inside the tools menu is a gadget to generate a custom IP block. What Tcl commands are available to do the same? We use the "create and package IP" tool, and tell it to create an AXI4 peripheral with 8 registers:
create_peripheral user.org user baloney 1.0 -dir /u1/home/tom/vivado/ip_repo
add_peripheral_interface S00_AXI -interface_mode slave -axi_type lite [ipx::find_open_core user.org:user:baloney:1.0]
set_property VALUE 8 [ipx::get_bus_parameters WIZ_NUM_REG -of_objects [ipx::get_bus_interfaces S00_AXI -of_objects [ipx::find_open_core user.org:user:baloney:1.0]]]
generate_peripheral -driver -bfm_example_design -debug_hw_example_design [ipx::find_open_core user.org:user:baloney:1.0]
write_peripheral [ipx::find_open_core user.org:user:baloney:1.0]
set_property  ip_repo_paths  {/u1/home/tom/vivado/ip_repo/baloney_1_0 /u1/home/tom/vivado/ip_repo} [current_project]
update_ip_catalog -rebuild
There you have it! It is just a matter of looking up these commands and finding out what options they offer.

Where are the files?

They go to /home/tom/vivado/ip_repo/baloney_1_0. The all important verilog is found in the "hdl" directory. Just where these go when they are added to a project is another matter.
Feedback? Questions? Drop me a line!

Tom's Computer Info / tom@mmto.org