################################################################ # This is a generated script based on design: system # # Though there are limitations about the generated script, # the main purpose of this utility is to make learning # IP Integrator Tcl commands easier. ################################################################ ################################################################ # Check if script is running in correct Vivado version. ################################################################ set scripts_vivado_version 2014.2 set current_vivado_version [version -short] if { [string first $scripts_vivado_version $current_vivado_version] == -1 } { puts "" puts "ERROR: This script was generated using Vivado <$scripts_vivado_version> and is being run in <$current_vivado_version> of Vivado. Please run the script in Vivado <$scripts_vivado_version> then open the design in Vivado <$current_vivado_version>. Upgrade the design by running \"Tools => Report => Report IP Status...\", then run write_bd_tcl to create an updated script." return 1 } ################################################################ # START ################################################################ # To test this script, run the following commands from Vivado Tcl console: # source system_script.tcl # If you do not already have a project created, # you can create a project using the following command: # create_project project_1 myproj -part xc7z020clg484-1 # set_property BOARD_PART xilinx.com:zc702:part0:1.0 [current_project] # CHANGE DESIGN NAME HERE set design_name system # If you do not already have an existing IP Integrator design open, # you can create a design using the following command: # create_bd_design $design_name # CHECKING IF PROJECT EXISTS if { [get_projects -quiet] eq "" } { puts "ERROR: Please open or create a project!" return 1 } # Creating design if needed set errMsg "" set nRet 0 set cur_design [current_bd_design -quiet] set list_cells [get_bd_cells -quiet] if { ${design_name} ne "" && ${cur_design} eq ${design_name} } { # Checks if design is empty or not if { $list_cells ne "" } { set errMsg "ERROR: Design <$design_name> already exists in your project, please set the variable to another value." set nRet 1 } else { puts "INFO: Constructing design in IPI design <$design_name>..." } } elseif { ${cur_design} ne "" && ${cur_design} ne ${design_name} } { if { $list_cells eq "" } { puts "INFO: You have an empty design <${cur_design}>. Will go ahead and create design..." } else { set errMsg "ERROR: Design <${cur_design}> is not empty! Please do not source this script on non-empty designs." set nRet 1 } } else { if { [get_files -quiet ${design_name}.bd] eq "" } { puts "INFO: Currently there is no design <$design_name> in project, so creating one..." create_bd_design $design_name puts "INFO: Making design <$design_name> as current_bd_design." current_bd_design $design_name } else { set errMsg "ERROR: Design <$design_name> already exists in your project, please set the variable to another value." set nRet 3 } } puts "INFO: Currently the variable is equal to \"$design_name\"." if { $nRet != 0 } { puts $errMsg return $nRet } ################################################################## # DESIGN PROCs ################################################################## # Procedure to create entire design; Provide argument to make # procedure reusable. If parentCell is "", will use root. proc create_root_design { parentCell } { if { $parentCell eq "" } { set parentCell [get_bd_cells /] } # Get object for parentCell set parentObj [get_bd_cells $parentCell] if { $parentObj == "" } { puts "ERROR: Unable to find parent cell <$parentCell>!" return } # Make sure parentObj is hier blk set parentType [get_property TYPE $parentObj] if { $parentType ne "hier" } { puts "ERROR: Parent <$parentObj> has TYPE = <$parentType>. Expected to be ." return } # Save current instance; Restore later set oldCurInst [current_bd_instance .] # Set parent object as current current_bd_instance $parentObj # Create interface ports set DDR [ create_bd_intf_port -mode Master -vlnv xilinx.com:interface:ddrx_rtl:1.0 DDR ] set FIXED_IO [ create_bd_intf_port -mode Master -vlnv xilinx.com:display_processing_system7:fixedio_rtl:1.0 FIXED_IO ] # Create ports set FCLK_CLK0 [ create_bd_port -dir O -type clk FCLK_CLK0 ] set wr_fifo_clk [ create_bd_port -dir I wr_fifo_clk ] set wr_fifo_data [ create_bd_port -dir I -from 31 -to 0 wr_fifo_data ] set wr_fifo_empty [ create_bd_port -dir O wr_fifo_empty ] set wr_fifo_full [ create_bd_port -dir O wr_fifo_full ] set wr_fifo_wr_en [ create_bd_port -dir I wr_fifo_wr_en ] set wr_npi_ready [ create_bd_port -dir O wr_npi_ready ] # Create instance: axi_mem_intercon, and set properties set axi_mem_intercon [ create_bd_cell -type ip -vlnv xilinx.com:ip:axi_interconnect:2.1 axi_mem_intercon ] set_property -dict [ list CONFIG.NUM_MI {1} ] $axi_mem_intercon # Create instance: processing_system7_0, and set properties set processing_system7_0 [ create_bd_cell -type ip -vlnv xilinx.com:ip:processing_system7:5.4 processing_system7_0 ] set_property -dict [ list CONFIG.PCW_USE_S_AXI_HP0 {1} CONFIG.preset {ZC702*} ] $processing_system7_0 # Create instance: processing_system7_0_axi_periph, and set properties set processing_system7_0_axi_periph [ create_bd_cell -type ip -vlnv xilinx.com:ip:axi_interconnect:2.1 processing_system7_0_axi_periph ] set_property -dict [ list CONFIG.NUM_MI {1} ] $processing_system7_0_axi_periph # Create instance: rst_processing_system7_0_50M, and set properties set rst_processing_system7_0_50M [ create_bd_cell -type ip -vlnv xilinx.com:ip:proc_sys_reset:5.0 rst_processing_system7_0_50M ] # Create instance: vivado_npi_wr64_0, and set properties set vivado_npi_wr64_0 [ create_bd_cell -type ip -vlnv xilinx.com:user:vivado_npi_wr64:1.0 vivado_npi_wr64_0 ] # Create interface connections connect_bd_intf_net -intf_net axi_mem_intercon_M00_AXI [get_bd_intf_pins axi_mem_intercon/M00_AXI] [get_bd_intf_pins processing_system7_0/S_AXI_HP0] connect_bd_intf_net -intf_net processing_system7_0_DDR [get_bd_intf_ports DDR] [get_bd_intf_pins processing_system7_0/DDR] connect_bd_intf_net -intf_net processing_system7_0_FIXED_IO [get_bd_intf_ports FIXED_IO] [get_bd_intf_pins processing_system7_0/FIXED_IO] connect_bd_intf_net -intf_net processing_system7_0_M_AXI_GP0 [get_bd_intf_pins processing_system7_0/M_AXI_GP0] [get_bd_intf_pins processing_system7_0_axi_periph/S00_AXI] connect_bd_intf_net -intf_net processing_system7_0_axi_periph_M00_AXI [get_bd_intf_pins processing_system7_0_axi_periph/M00_AXI] [get_bd_intf_pins vivado_npi_wr64_0/S00_AXI] connect_bd_intf_net -intf_net vivado_npi_wr64_0_M00_AXI [get_bd_intf_pins axi_mem_intercon/S00_AXI] [get_bd_intf_pins vivado_npi_wr64_0/M00_AXI] # Create port connections connect_bd_net -net processing_system7_0_FCLK_CLK0 [get_bd_ports FCLK_CLK0] [get_bd_pins axi_mem_intercon/ACLK] [get_bd_pins axi_mem_intercon/M00_ACLK] [get_bd_pins axi_mem_intercon/S00_ACLK] [get_bd_pins processing_system7_0/FCLK_CLK0] [get_bd_pins processing_system7_0/M_AXI_GP0_ACLK] [get_bd_pins processing_system7_0/S_AXI_HP0_ACLK] [get_bd_pins processing_system7_0_axi_periph/ACLK] [get_bd_pins processing_system7_0_axi_periph/M00_ACLK] [get_bd_pins processing_system7_0_axi_periph/S00_ACLK] [get_bd_pins rst_processing_system7_0_50M/slowest_sync_clk] [get_bd_pins vivado_npi_wr64_0/m00_axi_aclk] [get_bd_pins vivado_npi_wr64_0/s00_axi_aclk] connect_bd_net -net processing_system7_0_FCLK_RESET0_N [get_bd_pins processing_system7_0/FCLK_RESET0_N] [get_bd_pins rst_processing_system7_0_50M/ext_reset_in] connect_bd_net -net rst_processing_system7_0_50M_interconnect_aresetn [get_bd_pins axi_mem_intercon/ARESETN] [get_bd_pins processing_system7_0_axi_periph/ARESETN] [get_bd_pins rst_processing_system7_0_50M/interconnect_aresetn] connect_bd_net -net rst_processing_system7_0_50M_peripheral_aresetn [get_bd_pins axi_mem_intercon/M00_ARESETN] [get_bd_pins axi_mem_intercon/S00_ARESETN] [get_bd_pins processing_system7_0_axi_periph/M00_ARESETN] [get_bd_pins processing_system7_0_axi_periph/S00_ARESETN] [get_bd_pins rst_processing_system7_0_50M/peripheral_aresetn] [get_bd_pins vivado_npi_wr64_0/m00_axi_aresetn] [get_bd_pins vivado_npi_wr64_0/s00_axi_aresetn] connect_bd_net -net vivado_npi_wr64_0_wr_fifo_empty [get_bd_ports wr_fifo_empty] [get_bd_pins vivado_npi_wr64_0/wr_fifo_empty] connect_bd_net -net vivado_npi_wr64_0_wr_fifo_full [get_bd_ports wr_fifo_full] [get_bd_pins vivado_npi_wr64_0/wr_fifo_full] connect_bd_net -net vivado_npi_wr64_0_wr_npi_ready [get_bd_ports wr_npi_ready] [get_bd_pins vivado_npi_wr64_0/wr_npi_ready] connect_bd_net -net wr_fifo_clk_1 [get_bd_ports wr_fifo_clk] [get_bd_pins vivado_npi_wr64_0/wr_fifo_clk] connect_bd_net -net wr_fifo_data_1 [get_bd_ports wr_fifo_data] [get_bd_pins vivado_npi_wr64_0/wr_fifo_data] connect_bd_net -net wr_fifo_wr_en_1 [get_bd_ports wr_fifo_wr_en] [get_bd_pins vivado_npi_wr64_0/wr_fifo_wr_en] # Create address segments create_bd_addr_seg -range 0x10000 -offset 0x43C00000 [get_bd_addr_spaces processing_system7_0/Data] [get_bd_addr_segs vivado_npi_wr64_0/S00_AXI/S00_AXI_reg] SEG_vivado_npi_wr64_0_S00_AXI_reg create_bd_addr_seg -range 0x40000000 -offset 0x0 [get_bd_addr_spaces vivado_npi_wr64_0/M00_AXI] [get_bd_addr_segs processing_system7_0/S_AXI_HP0/HP0_DDR_LOWOCM] SEG_processing_system7_0_HP0_DDR_LOWOCM # Restore current instance current_bd_instance $oldCurInst save_bd_design } # End of create_root_design() ################################################################## # MAIN FLOW ################################################################## create_root_design ""