Build Steps - 2021.1 English

H.264/H.265 Video Codec Unit v1.2 Solutions LogiCORE IP Product Guide (PG252)

Document ID
PG252
Release Date
2021-06-16
Version
2021.1 English

To enable PL-DDR:

  1. Extract the PetaLinux BSP.
  2. Update required notes in system-user.dtsi:
    1. The UC2 design requires two Frame Buffer IPs for DMA transfers. The video_m2m device node constructs the video mem2mem pipeline. The dtsi changes are as follows:
      &amba_pl {
      	video_m2m {
      	compatible = "xlnx,mem2mem";
      	dmas = <&v_frmbuf_rd_0 0>, <&v_frmbuf_wr_0 0>;
      	dma-names = "tx", "rx";
      	};
      };
    2. Update the device tree node to have a dedicated memory for the VCU.
      • <=19.2 dtsi changes:
        &vcu_ddr4_controller_0 
        {
        	compatible = "xlnx,ddr4-2.2";
        	reg = <0x00000048 0x00000000 0x0 0x80000000>;
        	ranges;
        	#address-cells = <2>;
        	#size-cells = <2>;
        	plmem_vcu: pool@0 
                 {
        	    reg = <0x48 0x00000000 0x0 0x70000000>;
        	    };
        };
        
      • >=20.1 dtsi changes
        / {
        	reserved-memory {
        		#address-cells = <0x2>;
        		#size-cells = <0x2>;
        		ranges;
        
        		plmem_vcu: vcu_dma_mem_region {
        		compatible = "shared-dma-pool";
        		no-map;
        		reg = <0x48 0x0 0x0 0x70000000>;
        		};
        	};
        };"
        
    3. The VCU device tree node changes to allocate memory from PL_DDR.
      • If decoder is connected to PL-DDR:
        • <=19.2 dtsi changes:
          &decoder {
          	xlnx,dedicated-mem = <&plmem_vcu>;
          };
        • >=20.1 dtsi changes:
          &decoder {
                  memory-region = <&plmem_vcu>;
          };
      • If encoder is connected to PL-DDR:
        • <=19.2 dtsi changes:
          &encoder {
          	xlnx,dedicated-mem = <&plmem_vcu>;
          };
        • >=20.1 dtsi changes:
          &encoder {
                  memory-region = <&plmem_vcu>;
          };
          
      Note: These changes are relevant to the ZCU106 and ZCU104 designs only. You should modify your changes based on the specific design that you are working with.

      This generates the device tree in the path: components/plnx_workspace/device-tree/device-tree

      vi project-spec/meta-user/recipes-bsp/device-tree/files/system-user.dtsi

      The contents of the file for >= 20.1 UC2 are:

      /include/ "system-conf.dtsi"
      / {
                    reserved-memory {
                                   #address-cells = <0x2>;
                                   #size-cells = <0x2>;
                                   ranges;
      
                                   plmem_vcu_dec: vcu_dma_mem_region {
                                                 compatible = "shared-dma-pool";
                                                 no-map;
                                                 reg = <0x48 0x0 0x0 0x70000000>;
                                   };
                    };
      };
      &amba_pl {
                    video_m2m {
                                   compatible = "xlnx,mem2mem";
                                   dmas = <&v_frmbuf_rd_0 0>, <&v_frmbuf_wr_0 0>;
                                   dma-names = "tx", "rx";
                    };
      };
      &vcu_ddr4_controller_0 {
                    compatible = "xlnx,ddr4-2.2";
                    reg = <0x00000048 0x00000000 0x0 0x80000000>;
                    ranges;
                    #address-cells = <2>;
                    #size-cells = <2>;
      };
      &decoder {
                    memory-region = <&plmem_vcu_dec>;
      };
      
  3. Build the images petalinux-build.
  4. Package Boot.bin using the following command.
    petalinux-package --boot --fsbl zynqmp_fsbl.elf --u-boot u-boot.elf --pmufw pmufw.elf --fpga system.bit