Vivado IPI里使用命令分配地址

有些时候,Vivado IPI自动分配地址失败,可以使用命令分配地址。错误信息如下:

CRITICAL WARNING: [BD 41-1376] Forcibly mapping into conflicting address 0x0000000000 [ 2G ] in address space . This must be resolved before passing validation
is being mapped into at <0xA0000000 [ 2G ]>
ERROR: [BD 41-1075] Cannot create address segment for
in at 0xA0000000 [ 2G ].
The proposed address exceeds the base address limitations <0xA0000000 [ 256M ], 0x400000000 [ 4G ], 0x1000000000 [ 224G ]> of the interface(s) through which this peripheral is accessed by this address space
ERROR: [BD 5-48] Error: running assign_bd_address.
ERROR: [Common 17-39] 'assign_bd_address' failed due to earlier errors.

第一步,使用命令get_bd_addr_spaces得到地址空间

get_bd_addr_spaces
/vcu_0/Code /vcu_0/DecData0 /vcu_0/DecData1 /vcu_0/EncData0 /vcu_0/EncData1 /tpg_input/v_frmbuf_wr_0/Data_m_axi_mm_video /mpsoc_ss/zynq_ultra_ps_e_0/Data /mipi_csi2_rx/v_frmbuf_wr_0/Data_m_axi_mm_video /hdmi_output/v_frmbuf_rd_0/Data_m_axi_mm_video /hdmi_output/v_mix_0/Data_m_axi_mm_video1 /hdmi_output/v_mix_0/Data_m_axi_mm_video2 /hdmi_output/v_mix_0/Data_m_axi_mm_video3 /hdmi_output/v_mix_0/Data_m_axi_mm_video4 /hdmi_output/v_mix_0/Data_m_axi_mm_video5 /hdmi_output/v_mix_0/Data_m_axi_mm_video6 /hdmi_output/v_mix_0/Data_m_axi_mm_video7 /hdmi_input/v_frmbuf_wr_0/Data_m_axi_mm_video /hdmi_input/v_frmbuf_wr_1/Data_m_axi_mm_video /hdmi_input/v_frmbuf_wr_2/Data_m_axi_mm_video /sensor_iic_0/S_AXI /vcu_0/S_AXI_LITE /vid_phy_controller/vid_phy_axi4lite /mig_0/C0_DDR4_MEMORY_MAP /tpg_input/v_frmbuf_wr_0/s_axi_CTRL /tpg_input/v_tc_1/ctrl /tpg_input/v_tpg_1/s_axi_CTRL /mpsoc_ss/hdmi_ctrl_iic/S_AXI /mpsoc_ss/zynq_ultra_ps_e_0/SAXIGP0 /mpsoc_ss/zynq_ultra_ps_e_0/SAXIGP2 /mpsoc_ss/zynq_ultra_ps_e_0/SAXIGP3 /mpsoc_ss/zynq_ultra_ps_e_0/SAXIGP4 /mpsoc_ss/zynq_ultra_ps_e_0/SAXIGP5 /mipi_csi2_rx/mipi_csi2_rx_subsystem_0/csirxss_s_axi /mipi_csi2_rx/v_demosaic_0/s_axi_CTRL /mipi_csi2_rx/v_frmbuf_wr_0/s_axi_CTRL /mipi_csi2_rx/v_gamma_lut_0/s_axi_CTRL /mipi_csi2_rx/v_proc_ss_csc/s_axi_ctrl /mipi_csi2_rx/v_proc_ss_scaler/s_axi_ctrl /hdmi_output/v_frmbuf_rd_0/s_axi_CTRL /hdmi_output/v_hdmi_tx_ss_0/S_AXI_CPU_IN /hdmi_output/v_mix_0/s_axi_CTRL /hdmi_input/v_frmbuf_wr_0/s_axi_CTRL /h

根据设计可以知道,/vcu_0/DecData0,/mpsoc_ss/zynq_ultra_ps_e_0/Data是AXI master设备。

第二步,分配地址。

分配地址的命令是create_bd_addr_seg, 基本格式是
create_bd_addr_seg -range -offset [-quiet] [-verbose]
[
] []
其中range是地址大小,offset是地址,[
]是对应的AXI master设备,[]是对应的AXI slave设备.

为VCU,对PL中的DDR控制器mig_0分配地址的命令如下。由于VCU有四个AXI master设备,所以有四个命令。

create_bd_addr_seg -range 0x80000000 -offset 0x1000000000 [get_bd_addr_spaces /vcu_0/DecData0] [get_bd_addr_segs /mig_0/C0_DDR4_MEMORY_MAP/C0_DDR4_ADDRESS_BLOCK ] SEG1

create_bd_addr_seg -range 0x80000000 -offset 0x1000000000 [get_bd_addr_spaces /vcu_0/DecData1] [get_bd_addr_segs /mig_0/C0_DDR4_MEMORY_MAP/C0_DDR4_ADDRESS_BLOCK ] SEG1

create_bd_addr_seg -range 0x80000000 -offset 0x1000000000 [get_bd_addr_spaces /vcu_0/EncData0] [get_bd_addr_segs /mig_0/C0_DDR4_MEMORY_MAP/C0_DDR4_ADDRESS_BLOCK ] SEG1

create_bd_addr_seg -range 0x80000000 -offset 0x1000000000 [get_bd_addr_spaces /vcu_0/EncData1] [get_bd_addr_segs /mig_0/C0_DDR4_MEMORY_MAP/C0_DDR4_ADDRESS_BLOCK ] SEG1