Commit cd565b88 authored by Moss, Jason's avatar Moss, Jason
Browse files

Initial check-in for VCU Only UZ7EV EVCC Design Release

parent b91db3a3
# Ignore temporary files
*~
# Ignore all files by default
*
# Allow the following bsp files
!.gitignore
# Allow subfolders
!*/
# allow the following working bsp files
!uz7ev_evcc_petalinux_bsp/**
# Ignore all files
*
# Include the gitignore
!.gitignore
# Allow the pre-build bsp file, quickstart and checksum
!uz7ev_evcc_petalinux_v2020_1.bsp
!uz7ev_evcc_vcu-bsp-quickstart.md
!SHA256SUMS
\ No newline at end of file
e09fab8025649b54bdcb46a857157014cbc0dc68fd836d1563bff845aaf13faa uz7ev_evcc_petalinux_v2020_1.bsp
# BSP Quickstart Instructions (UZ7EV EVCC)
## Clone the repo
- [Repository rdf0428-uz7ev-vcu-trd-2020-1 Link](https://xterra2.avnet.com/xilinx/zedboard/ultrazed-ev/vcu-trd-ports/rdf0428-uz7ev-vcu-trd-2020-1)
```bash
:~$ git clone https://xterra2.avnet.com/xilinx/zedboard/ultrazed-ev/vcu-trd-ports/rdf0428-uz7ev-vcu-trd-2020-1.git
```
## (Optional) Generate the Vivado Design
- Complete by generating the bitstream and exporting the hardware platform
```bash
:~/rdf0428-uz7ev-vcu-trd-2020-1/pl$ vivado -source designs/uz7ev_evcc_vcu/project.tcl
****** Vivado v2020.1 (64-bit)
**** SW Build 2902540 on Wed May 27 19:54:35 MDT 2020
**** IP Build 2902112 on Wed May 27 22:43:36 MDT 2020
** Copyright 1986-2020 Xilinx, Inc. All Rights Reserved.
start_gui
```
## Build the Petalinux BSP
### Validate the BSP checksum
```bash
:~$ pushd rdf0428-vcu-trd-2020-1/apu/uz7ev_evcc_petalinux_bsp
:~/rdf0428-vcu-trd-2020-1/apu/uz7ev_evcc_petalinux_bsp$ sha256sum -c SHA256SUMS
uz7ev_evcc_petalinux_v2020_1.bsp: OK
:~/rdf0428-vcu-trd-2020-1/apu/uz7ev_evcc_petalinux_bsp$ popd
```
### Create a new Petalinux Project using the pre-built BSP
```bash
:~$ petalinux-create -t project -s rdf0428-uz7ev-vcu-trd-2020-1/apu/uz7ev_evcc_petalinux_bsp/uz7ev_evcc_petalinux_v2020_1.bsp
INFO: Create project:
INFO: Projects:
INFO: * uz7ev_evcc_petalinux_bsp
INFO: has been successfully installed to /home/xilinx/
INFO: New project successfully created in /home/xilinx/
```
### Select a device tree configuration
- Create a link named ```system-user.dtsi``` to the device tree with the same name as the Vivado design module
```bash
:~/uz7ev_evcc_petalinux_bsp$ cd ../apu/uz7ev_evcc_vcu/project-spec/meta-user/recipes-bsp/device-tree/files
:~/uz7ev_evcc_petalinux_bsp/project-spec/meta-user/recipes-bsp/device-tree/files$ ln -s system-user.dtsi uz7ev_evcc_vcu.dtsi
:~/uz7ev_evcc_petalinux_bsp/project-spec/meta-user/recipes-bsp/device-tree/files$ tree
.
├── apm.dtsi
├── common.dtsi
├── pl-custom.dtsi
├── system-user.dtsi -> uz7ev_evcc_vcu.dtsi
├── uz7ev_evcc-common.dtsi
├── uz7ev_evcc.dtsi
├── uz7ev_evcc_vcu.dtsi
└── xlnk.dtsi
0 directories, 8 files
:~/uz7ev_evcc_petalinux_bsp/project-spec/meta-user/recipes-bsp/device-tree/files$ popd
```
### Configure the petalinux project with the hardware design
- Configure the petalinux project with the Vivado hardware design
- Use either the pre-built or generated design
#### Pre-built Vivado Design
```bash
:~/uz7ev_evcc_petalinux_bsp$ petalinux-config --get-hw-description=~/rdf0428-uz7ev-vcu-trd-2020-1/pl/prebuild/uz7ev_evcc_vcu/ --silentconfig
INFO: sourcing build tools
INFO: Getting hardware description...
INFO: Rename uz7ev_evcc_vcu_wrapper.xsa to system.xsa
[INFO] generating Kconfig for project
[INFO] silentconfig project
[INFO] sourcing build environment
[INFO] generating kconfig for Rootfs
[INFO] silentconfig rootfs
[INFO] generating plnxtool conf
[INFO] generating user layers
[INFO] generating workspace directory
```
#### User Generated Vivado Design
```bash
:~/uz7ev_evcc_petalinux_bsp$ petalinux-config --get-hw-description=~/rdf0428-uz7ev-vcu-trd-2020-1/pl/build/uz7ev_evcc_vcu/ --silentconfig
INFO: sourcing build tools
INFO: Getting hardware description...
INFO: Rename uz7ev_evcc_vcu_wrapper.xsa to system.xsa
[INFO] generating Kconfig for project
[INFO] silentconfig project
[INFO] extracting yocto SDK to components/yocto
[INFO] sourcing build environment
[INFO] generating kconfig for Rootfs
[INFO] silentconfig rootfs
[INFO] generating plnxtool conf
[INFO] generating user layers
[INFO] generating workspace directory
```
### Execute the build
```bash
:~/uz7ev_evcc_petalinux_bsp$ petalinux-build
INFO: sourcing build tools
[INFO] building project
[INFO] sourcing build environment
[INFO] generating user layers
[INFO] generating workspace directory
INFO: bitbake petalinux-image-minimal
Parsing recipes: 100% |#################################################################################################################################| Time: 0:01:28
Parsing of 2972 .bb files complete (0 cached, 2972 parsed). 4241 targets, 167 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies
NOTE: Fetching uninative binary shim from file:///srv/trds/ports/v2020.1/petalinux-builds/test/uz7ev_evcc_petalinux_bsp/components/yocto/downloads/uninative/9498d8bba047499999a7310ac2576d0796461184965351a56f6d32c888a1f216/x86_64-nativesdk-libc.tar.xz;sha256sum=9498d8bba047499999a7310ac2576d0796461184965351a56f6d32c888a1f216
Initialising tasks: 100% |##############################################################################################################################| Time: 0:00:09
Checking sstate mirror object availability: 100% |######################################################################################################| Time: 0:00:19
Sstate summary: Wanted 1982 Found 1551 Missed 431 Current 0 (78% match, 0% complete)
NOTE: Executing Tasks
NOTE: Setscene tasks completed
NOTE: Tasks Summary: Attempted 6514 tasks of which 4732 didn't need to be rerun and all succeeded.
INFO: Successfully copied built images to tftp dir: /tftpboot
[INFO] successfully built project
```
### Package Boot Images
```bash
:~/uz7ev_evcc_petalinux_bsp$ petalinux-package --boot --format BIN --fsbl images/linux/zynqmp_fsbl.elf --u-boot images/linux/u-boot.elf --pmufw images/linux/pmufw.elf --fpga images/linux/system.bit --force
INFO: sourcing build tools
INFO: File in BOOT BIN: "/srv/trds/ports/v2020.1/petalinux-builds/test/uz7ev_evcc_petalinux_bsp/images/linux/zynqmp_fsbl.elf"
INFO: File in BOOT BIN: "/srv/trds/ports/v2020.1/petalinux-builds/test/uz7ev_evcc_petalinux_bsp/images/linux/pmufw.elf"
INFO: File in BOOT BIN: "/srv/trds/ports/v2020.1/petalinux-builds/test/uz7ev_evcc_petalinux_bsp/images/linux/system.bit"
INFO: File in BOOT BIN: "/srv/trds/ports/v2020.1/petalinux-builds/test/uz7ev_evcc_petalinux_bsp/images/linux/bl31.elf"
INFO: File in BOOT BIN: "/srv/trds/ports/v2020.1/petalinux-builds/test/uz7ev_evcc_petalinux_bsp/images/linux/system.dtb"
INFO: File in BOOT BIN: "/srv/trds/ports/v2020.1/petalinux-builds/test/uz7ev_evcc_petalinux_bsp/images/linux/u-boot.elf"
INFO: Generating zynqmp binary package BOOT.BIN...
****** Xilinx Bootgen v2020.1
**** Build date : May 26 2020-14:07:15
** Copyright 1986-2020 Xilinx, Inc. All Rights Reserved.
[INFO] : Bootimage generated successfully
INFO: Binary is ready.
```
## Create a bootable microSD Card
- Substitute ```/dev/sdX``` with your recognized device under linux (i.e. ```/dev/sdg```)
### Create the primary partition
```bash
:~/uz7ev_evcc_petalinux_bsp$ sudo fdisk /dev/sdX
```
- n, p, 1, enter, enter, t, 1, b, w
### Format the primary partition as VFAT
```bash
:~/uz7ev_evcc_petalinux_bsp$ sudo mkfs.vfat /dev/sdX1
```
### Mount the new card temporarily to copy boot files
```bash
:~/uz7ev_evcc_petalinux_bsp$ sudo mkdir -p ~/mnt/sdcard
:~/uz7ev_evcc_petalinux_bsp$ sudo mount /dev/sdX1 ~/mnt/sdcard
```
### Copy boot images to the card
```bash
:~/uz7ev_evcc_petalinux_bsp$ pushd images/linux
:~/uz7ev_evcc_petalinux_bsp/images/linux$ sudo cp BOOT.BIN image.ub boot.scr ~/mnt/sdcard
:~/uz7ev_evcc_petalinux_bsp/images/linux$ sudo sync;sudo umount ~/mnt/sdcard
```
## Boot the UZ7EV EVCC
```bash
Xilinx Zynq MP First Stage Boot Loader
Release 2020.1 Sep 5 2020 - 16:33:52
NOTICE: ATF running on XCZU7EV/silicon v4/RTL5.1 at 0xfffea000
NOTICE: BL31: v2.2(release):xilinx_rebase_v2.2_2020.1
NOTICE: BL31: Built : 16:20:58, Sep 5 2020
U-Boot 2020.01 (Sep 05 2020 - 16:25:41 +0000)
Board: Xilinx ZynqMP
DRAM: 4 GiB
PMUFW: v1.1
EL Level: EL2
Chip ID: zu7ev
NAND: 0 MiB
MMC: mmc@ff160000: 0, mmc@ff170000: 1
In: serial@ff000000
Out: serial@ff000000
Err: serial@ff000000
Bootmode: LVL_SHFT_SD_MODE1
Reset reason: EXTERNAL
Net:
ZYNQ GEM: ff0e0000, mdio bus ff0e0000, phyaddr 0, interface rgmii-id
Warning: ethernet@ff0e0000 using MAC address from DT
eth0: ethernet@ff0e0000
Hit any key to stop autoboot: 0
switch to partitions #0, OK
mmc1 is current device
Scanning mmc 1:1...
Found U-Boot script /boot.scr
2023 bytes read in 21 ms (93.8 KiB/s)
## Executing script at 20000000
91240764 bytes read in 6124 ms (14.2 MiB/s)
## Loading kernel from FIT Image at 10000000 ...
...
## Loading ramdisk from FIT Image at 10000000 ...
...
## Loading fdt from FIT Image at 10000000 ...
...
Booting using the fdt blob at 0x107e6f08
Uncompressing Kernel Image
Loading Ramdisk to 740ee000, end 78fffc94 ... OK
Loading Device Tree to 000000007ddb8000, end 000000007ddc5756 ... OK
Starting kernel ...
[ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
...
PetaLinux 2020.1 uz7ev_evcc_vcu-v2020-1 /dev/ttyPS0
uz7ev_evcc_vcu-v2020-1 login:
```
### Login as root
- Username/Password: root/root
```bash
uz7ev_evcc_vcu-v2020-1 login: root
Password:
root@uz7ev_evcc_vcu-v2020-1:~#
```
## Generate a test pattern on the DisplayPort
### FHD (1920x1080)
```bash
root@uz7ev_evcc_vcu-v2020-1:~# gst-launch-1.0 -v videotestsrc pattern=0 ! \
video/x-raw,width=1920,height=1080,framerate=15/1 ! \
queue ! \
kmssink bus-id="fd4a0000.zynqmp-display" fullscreen-overlay=true
```
## Download a Big Buck Bunny test video
- Make sure you have Ethernet connected to the EVCC
- Download an original test video
- Big Buck Bunny Standard Repository (bbb3d.renderfarmig.net/download.html)
- 1080p 60fps
### Create a video folder on the filesystem
```bash
root@uz7ev_evcc_vcu-v2020-1:~# mkdir -p /media/card/videos
root@uz7ev_evcc_vcu-v2020-1:~# cd /media/card/videos
```
### Original Big Buck Bunny Video Clips
#### FHD (1920x1080) - 60fps
```bash
root@uz7ev_evcc_vcu-v2020-1:/media/card/videos#: wget http://distribution.bbb3d.renderfarming.net/video/mp4/bbb_sunflower_1080p_60fps_normal.mp4
Connecting to distribution.bbb3d.renderfarming.net (5.186.52.52:80)
saving to 'bbb_sunflower_1080p_60fps_normal.mp4'
bbb_sunflower_1080p_ 100% |******************************************************************************************************************************| 339M 0:00:00 ETA
'bbb_sunflower_1080p_60fps_normal.mp4' saved
```
## Video Decode
- Use GStreamer + 'omx264dec' to decode video to a DisplayPort Display
- Review the gstreamer pipeline elements
```
[VIDEO FILE INPUT] ->
|--> [FILESRC] -> [QTDEMUX.video_0] -> [H264PARSE] -> [OMXH264DEC] -> [QUEUE] -> [KMSSINK(DISPLAY PORT)]
```
### FHD (1920x1080) - 60fps
```bash
root@uz7ev_evcc_vcu-v2020-1:~# gst-launch-1.0 -v filesrc location=/media/card/videos/bbb_sunflower_1080p_60fps_normal.mp4 ! \
qtdemux name=videodemux videodemux.video_0 ! \
h264parse ! \
omxh264dec latency-mode=0 ! video/x-raw,format=NV12,width=1920,height=1080,framerate=60/1 ! \
queue ! \
kmssink bus-id=fd4a0000.zynqmp-display fullscreen-overlay=true
```
\ No newline at end of file
# Ignore temporary files from Vivado
*.log
*.jou
*.str
# ignore all build artifacts
*
!.gitignore
\ No newline at end of file
# Ignore all files
*
# Include the gitignore
!.gitignore
# Allow subfolders
!*/
# Allow the following files and folders
!uz7ev_evcc/**
################################################################################
# UZ7EV EVCC Base Design Constraints
################################################################################
################################################################################
# UZ7EV EVCC Base Design Constraints
################################################################################
#####
## Input Clock Pins
#####
set_property PACKAGE_PIN AC8 [get_ports {sysclk_uz7ev_clk_p}]
set_property IOSTANDARD LVDS [get_ports {sysclk_uz7ev_clk_p}]
################################################################################
\ No newline at end of file
# Ignore all files
*
# Include the gitignore
!.gitignore
# Allow subfolders
!*/
# Allow the following files and folders
!uz7ev_evcc/**
!uz7ev_evcc_vcu/**
This diff is collapsed.
# global variables
set ::platform "uz7ev_evcc"
set ::silicon "i"
# local variables
set design_nm "${::platform}"
set project_dir "build/$design_nm"
set ip_dir "srcs/ip/${::platform}"
set constrs_dir "constrs/${::platform}"
set scripts_dir "designs/$design_nm"
# set variable names
set part "xczu7ev-fbvb900-1-${::silicon}"
puts "INFO: Target part selected: '$part'"
# set up project
create_project $design_nm $project_dir -part $part -force
set board_lat [ get_board_parts -latest_file_version {*ultrazed_7ev_cc*} ]
set_property board_part $board_lat [current_project]
# set up IP repo
set_property ip_repo_paths $ip_dir [current_fileset]
update_ip_catalog -rebuild
# set up bd design
create_bd_design bd
source $scripts_dir/bd.tcl
assign_bd_address
# Generate a design wrappert
make_wrapper -files [get_files ./$project_dir/$design_nm.srcs/sources_1/bd/bd/bd.bd] -top
# The TRD uses a pre-built design wrapper file instead of a generated wrapper
# Uncomment the following 2 lines to use a pre-built design wrapper
add_files -norecurse ./srcs/${::platform}/hdl/${design_nm}_wrapper.v
set_property top ${design_nm}_wrapper [current_fileset]
# Use the generated design wrapper
# Uncomment the following 2 lines to use the generated design wrapper
#add_files -norecurse ./$project_dir/$design_nm.srcs/sources_1/bd/bd/hdl/bd_wrapper.v
#set_property top bd_wrapper [current_fileset]
add_files -fileset constrs_1 -norecurse $constrs_dir/${design_nm}.xdc
update_compile_order -fileset sources_1
set_property strategy Performance_Explore [get_runs impl_1]
validate_bd_design
set_msg_config -suppress -id {Common 17-55}
set_msg_config -suppress -id {Vivado 12-259}
set_msg_config -suppress -id {Vivado 12-4739}
regenerate_bd_layout
import_files
save_bd_design
This diff is collapsed.
# global variables
set ::platform "uz7ev_evcc"
set ::silicon "i"
# local variables
set design_nm "${::platform}_vcu"
set project_dir "build/$design_nm"
set ip_dir "srcs/ip/${::platform}"
set constrs_dir "constrs/${::platform}"
set scripts_dir "designs/$design_nm"
# set variable names
set part "xczu7ev-fbvb900-1-${::silicon}"
puts "INFO: Target part selected: '$part'"
# set up project
create_project $design_nm $project_dir -part $part -force
set board_lat [ get_board_parts -latest_file_version {*ultrazed_7ev_cc*} ]
set_property board_part $board_lat [current_project]
# set up IP repo
set_property ip_repo_paths $ip_dir [current_fileset]
update_ip_catalog -rebuild
# set up bd design
create_bd_design bd
source $scripts_dir/bd.tcl
assign_bd_address
# Generate a design wrappert
make_wrapper -files [get_files ./$project_dir/$design_nm.srcs/sources_1/bd/bd/bd.bd] -top
# The TRD uses a pre-built design wrapper file instead of a generated wrapper
# Uncomment the following 2 lines to use a pre-built design wrapper
add_files -norecurse ./srcs/${::platform}/hdl/${design_nm}_wrapper.v
set_property top ${design_nm}_wrapper [current_fileset]
# Use the generated design wrapper
# Uncomment the following 2 lines to use the generated design wrapper
#add_files -norecurse ./$project_dir/$design_nm.srcs/sources_1/bd/bd/hdl/bd_wrapper.v
#set_property top bd_wrapper [current_fileset]
add_files -fileset constrs_1 -norecurse $constrs_dir/${design_nm}.xdc
update_compile_order -fileset sources_1
set_property strategy Performance_Explore [get_runs impl_1]
validate_bd_design
set_msg_config -suppress -id {Common 17-55}
set_msg_config -suppress -id {Vivado 12-259}
set_msg_config -suppress -id {Vivado 12-4739}
regenerate_bd_layout
import_files
save_bd_design
# Ignore all files
*
# Include the gitignore
!.gitignore
# Allow subfolders
!*/
# Allow the following files and folders
!uz7ev_evcc/**
!uz7ev_evcc_vcu/**
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment