ZedBoardã®IPãã¶ã¤ã³ã«å¯¾ãã¦ãBlockRAMã®ã¢ã¸ã¥ã¼ã«ãæ¿å ¥ããã
BlockRAMã®è¨è¨
AXI4ã®ã¤ã³ã¿ãã§ã¼ã¹ãæã£ãBlockRAMãã¶ã¤ã³ãè¨è¨ãããAXI4ã®ã¤ã³ã¿ãã§ã¼ã¹ã¯ä»ã®ãã¶ã¤ã³ããåã£ã¦ããã
blockram_test_v1_0 - blockram_test_v1_0_S00_AXI
blockram_test_v1_0ã¯AXI4ã®ã¤ã³ã¿ãã§ã¼ã¹ãæãããã
module blockram_test_v1_0 # ( // Users to add parameters here // User parameters ends // Do not modify the parameters beyond this line // Parameters of Axi Slave Bus Interface S00_AXI parameter integer C_s_axi_ID_WIDTH = 1, parameter integer C_s_axi_DATA_WIDTH = 32, parameter integer C_s_axi_ADDR_WIDTH = 6, parameter integer C_s_axi_AWUSER_WIDTH = 0, parameter integer C_s_axi_ARUSER_WIDTH = 0, parameter integer C_s_axi_WUSER_WIDTH = 0, parameter integer C_s_axi_RUSER_WIDTH = 0, parameter integer C_s_axi_BUSER_WIDTH = 0 ) ( // Users to add ports here // User ports ends // Do not modify the ports beyond this line // Ports of Axi Slave Bus Interface S00_AXI input wire s_axi_aclk, input wire s_axi_aresetn, input wire [C_s_axi_ID_WIDTH-1 : 0] s_axi_awid, input wire [C_s_axi_ADDR_WIDTH-1 : 0] s_axi_awaddr, input wire [7 : 0] s_axi_awlen, input wire [2 : 0] s_axi_awsize, input wire [1 : 0] s_axi_awburst, input wire s_axi_awlock, input wire [3 : 0] s_axi_awcache, input wire [2 : 0] s_axi_awprot, ...
ãããã¾ã è¯ãåãã£ã¦ããªãã®ã ããã¤ã³ã¿ãã§ã¼ã¹ã®ååãs_axi_xxx
ã¨ãã¦ããã¨Blockãã¶ã¤ã³ãã¤ã³ãã°ã¬ã¼ãããã¨ãã«C_s_axi_ID_WIDTH
ã¨åæ§ã®ãã©ã¼ãããã«åãããªãã¨ã¤ã³ãã°ã¬ã¼ãã«å¤±æããï¼
ã¾ããIPããã«ãããããã®ã¹ã¯ãªãããç¨æããã
# ip source ../scripts/adi_env.tcl source $ad_hdl_dir/library/scripts/adi_ip.tcl adi_ip_create blockram_test_v1_0 adi_ip_files blockram_test_v1_0 [list \ "hdl/blockram_test_v1_0_S00_AXI.v" \ "hdl/blockram_test_v1_0.v" \ ] # adi_ip_properties blockram_test_v1_0 # adi_ip_properties_lite blockram_test_v1_0 ipx::package_project -root_dir . \ -vendor analog.com \ -library user \ -taxonomy /Analog_Devices set_property vendor_display_name {Analog Devices} [ipx::current_core] set_property company_url {www.analog.com} [ipx::current_core] set_property supported_families {\ virtex7 Production \ qvirtex7 Production \ kintex7 Production \ kintex7l Production \ qkintex7 Production \ qkintex7l Production \ artix7 Production \ artix7l Production \ aartix7 Production \ qartix7 Production \ zynq Production \ qzynq Production \ azynq Production \ virtexu Production \ kintexuplus Production \ zynquplus Production \ kintexu Production \ virtex7 Beta \ qvirtex7 Beta \ kintex7 Beta \ kintex7l Beta \ qkintex7 Beta \ qkintex7l Beta \ artix7 Beta \ artix7l Beta \ aartix7 Beta \ qartix7 Beta \ zynq Beta \ qzynq Beta \ azynq Beta \ virtexu Beta \ virtexuplus Beta \ kintexuplus Beta \ zynquplus Beta \ kintexu Beta}\ [ipx::current_core] ipx::remove_all_bus_interface [ipx::current_core] set memory_maps [ipx::get_memory_maps * -of_objects [ipx::current_core]] foreach map $memory_maps { ipx::remove_memory_map [lindex $map 2] [ipx::current_core ] } # end of adi_ip_properties_lite ipx::infer_bus_interface {\ s_axi_awid \ s_axi_awaddr \ s_axi_awlen \ s_axi_awsize \ s_axi_awburst \ s_axi_awlock \ s_axi_awcache \ s_axi_awprot \ s_axi_awqos \ s_axi_awregion \ s_axi_awuser \ s_axi_awvalid \ s_axi_awready \ s_axi_wdata \ s_axi_wstrb \ s_axi_wlast \ s_axi_wuser \ s_axi_wvalid \ s_axi_wready \ s_axi_bid \ s_axi_bresp \ s_axi_buser \ s_axi_bvalid \ s_axi_bready \ s_axi_arid \ s_axi_araddr \ s_axi_arlen \ s_axi_arsize \ s_axi_arburst \ s_axi_arlock \ s_axi_arcache \ s_axi_arprot \ s_axi_arqos \ s_axi_arregion \ s_axi_aruser \ s_axi_arvalid \ s_axi_arready \ s_axi_rid \ s_axi_rdata \ s_axi_rresp \ s_axi_rlast \ s_axi_ruser \ s_axi_rvalid \ s_axi_rready} \ xilinx.com:interface:aximm_rtl:1.0 [ipx::current_core] ipx::infer_bus_interface s_axi_aclk xilinx.com:signal:clock_rtl:1.0 [ipx::current_core] ipx::infer_bus_interface s_axi_aresetn xilinx.com:signal:reset_rtl:1.0 [ipx::current_core] ipx::add_memory_map {s_axi} [ipx::current_core] set_property slave_memory_map_ref {s_axi} [ipx::get_bus_interfaces s_axi -of_objects [ipx::current_core]] # ipx::add_address_block {axi_lite} [ipx::get_memory_maps s_axi -of_objects [ipx::current_core]] # set_property range {65536} [ipx::get_address_blocks axi_lite \ # -of_objects [ipx::get_memory_maps s_axi -of_objects [ipx::current_core]]] ipx::add_address_block {axi} [ipx::get_memory_maps s_axi -of_objects [ipx::current_core]] set_property range {65536} [ipx::get_address_blocks axi \ -of_objects [ipx::get_memory_maps s_axi -of_objects [ipx::current_core]]] ipx::add_bus_parameter ASSOCIATED_BUSIF [ipx::get_bus_interfaces s_axi_aclk \ -of_objects [ipx::current_core]] set_property value s_axi [ipx::get_bus_parameters ASSOCIATED_BUSIF \ -of_objects [ipx::get_bus_interfaces s_axi_aclk \ -of_objects [ipx::current_core]]] # end of adi_ip_properties adi_ip_constraints blockram_test_v1_0 [list \ "blockram_test_constr.xdc" \ "$ad_hdl_dir/library/common/ad_axi_ip_constr.xdc" ] ipx::save_core [ipx::current_core]
IPã®ã¤ã³ãã°ã¬ã¼ã
ä½æããIPãã¤ã³ãã°ã¬ã¼ãããããã®ã¹ã¯ãªãããç¨æããã
# Add IPs update_compile_order -fileset sources_1 open_bd_design {./adv7511_zed.srcs/sources_1/bd/system/system.bd} update_ip_catalog -rebuild startgroup create_bd_cell -type ip -vlnv analog.com:user:blockram_test_v1_0:1.0 blockram_test_0 endgroup apply_bd_automation -rule xilinx.com:bd_rule:axi4 \ -config {Master "/sys_ps7/M_AXI_GP0" intc_ip "Auto" Clk_xbar "Auto" Clk_master "Auto" Clk_slave "Auto" } \ [get_bd_intf_pins blockram_test_0/S_AXI] regenerate_bd_layout reset_run synth_1 reset_run system_xbar_0_synth_1 launch_runs impl_1 -to_step write_bitstream -jobs 2 wait_on_run impl_1 save_bd_design
ããããéè¦ãªã®ã¯
- create_bd_cell : ãµããããã¯ãã¤ã³ã¹ã¿ã³ã¹ããã
- apply_bd_automation : ã«ã¼ãã£ã³ã°ãå®è¡ãã
ã§ãããããã§èªåã®å¥½ããªIPãã¤ã³ãã°ã¬ã¼ããã訳ã ã
rm -rf *.cache *.data *.xpr *.log *.jou xgui *.runs *.srcs *.sdk *.hw *.sim .Xil *.ip_user_files vivado -mode batch -source system_project.tcl >> adv7511_zed_vivado.log 2>&1