Skip to content

jiafulow/zedboard-guide

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

zedboard-guide

Overview

  • ZedBoard specs (Rev D):

    • Xilinx Zynq-7000 AP SoC XC7Z020-CLG484-1
    • Programmable logic:
      • Derived from Xilinx Artix-7 FPGA
      • Includes configurable logic blocks (CLBs), port and width configurable block RAM (BRAM), DSP slices with a 25 x 18 multiplier, 48-bit accumulator and pre-adder (DSP48E1), a user configurable analog to digital convertor (XADC), clock management tiles (CMT), etc
    • Dual-core ARM Cortex A9
      • ARMv7-A architecture, r3p0 revision
      • 667 MHz max clock frequency (speed grade -1)
      • L1 cache: 32 KB instruction, 32 KB data per processor
      • L2 cache: 512 KB
      • 256KB on chip memory (OCM)
    • Memory:
      • 512 MB DDR3 SD RAM (32-bit address)
      • 256 Mb QSPI flash memory
      • Static memory controller
      • 4 GB SD card
    • Onboard USB-JTAG Programming
    • 10/100/1000 Ethernet
    • USB OTG 2.0 and USB-UART
    • PS & PL I/O expansion (FMC, Pmod™, XADC)
      • GPIO with four 32-bit banks, of which up to 54 bits can be used with the PS I/O and up to 64 bits connected to the PL
      • Up to 54 flexible multiplexed I/O (MIO) for peripheral pin assignments
    • Multiple displays (1080p HDMI, 8-bit VGA, 128 x 32 OLED)
    • I2S Audio CODEC
    • See http://www.digilentinc.com/zedboard
  • ZedBoard images
    (from http://zedboard.org/product/zedboard)

Front Back
Front Back
Functional Overlay Block Diagram
Functional Overlay Block Diagram
Zynq-7000 AP SoC overview

Installation

  • Install Xilinx applications:
# Vivado
tar -zxvf Xilinx_Vivado_SDK_Lin_2015.2_0626_1.tar.gz
cd Xilinx_Vivado_SDK_Lin_2015.2_0626_1
sudo ./xsetup

# PetaLinux
sudo ./petalinux-v2015.2.1-final-installer.run /opt/PetaLinux
  • Install necessary packages from official Ubuntu repository:
sudo apt-get install gawk bison flex tftpd ncurses-dev zlib1g-dev libssl-dev
# The following are 32-bit libraries
sudo apt-get install lib32z1 lib32ncurses5 lib32bz2-1.0 lib32stdc++6
  • Install cable drivers:
cd /opt/Xilinx/Vivado/2015.2/data/xicom/cable_drivers/lin64/install_script/install_drivers
sudo ./install_drivers 
  • Change /bin/sh to bash
sudo dpkg-reconfigure dash
# Select <No>
  • Install serial terminal console:
sudo apt-get install gtkterm
sudo addgroup `whoami` dialout 
sudo gtkterm
# Go to Configuration -> Port, select the following:
#   Port     : /dev/ttyACM0
#   Baud Rate: 115200
  • Setup TFTP server

    • Create a text file /etc/xinetd.d/tftp with the following content:
    service tftp
    {
    protocol        = udp
    port            = 69
    socket_type     = dgram
    wait            = yes
    user            = nobody
    server          = /usr/sbin/in.tftpd
    server_args     = /tftpboot
    disable         = no
    }
    
    • Create a directory /tftpboot
    sudo mkdir /tftpboot
    sudo chmod -R 777 /tftpboot
    sudo chown -R nobody /tftpboot
    
    • Restart the xinetd service
    sudo service xinetd restart
    
  • Setup DHCP server

    • Set a network connection profile with
    ip address: 192.168.1.1
    netmask   : 255.255.255.0
    gateway   : 192.168.1.100
    
    • Install DHCP server
    sudo apt-get install isc-dhcp-server
    
    # Edit /etc/dhcp/dhcpd.conf
    subnet 192.168.1.0 netmask 255.255.255.0 {
     range 192.168.1.150 192.168.1.200;
     option routers 192.168.1.254;
     option domain-name-servers 192.168.1.1, 192.168.1.2;
     option domain-name "mydomain.example";
    }
    
    # Edit /etc/default/isc-dhcp-server
    INTERFACES="eth0"
    
    • Restart
    sudo service isc-dhcp-server restart
    
  • Setup NFS server

    • Install NFS server
    sudo apt-get install nfs-kernel-server
    
    # Edit /etc/exports
    <directory> 192.168.1.*(rw,sync,no_subtree_check)
    
    • Restart
    sudo service nfs-kernel-server restart
    
    • Note that if you have firewall running, you have to keep the port 2049 open (or disable the firewall).

Startup

  • Get a license from http://www.xilinx.com/getlicense
    • Use the voucher to get a node-locked license (which will be emailed to you)
    • Alternatively, one can get the WebPACK license for free
    • In Vivado, select Help -> Manage License..., load the license Xilinx.lic
  • Setup the environments:
source /opt/Xilinx/Vivado/2015.2/settings64.sh
source /opt/Xilinx/SDK/2015.2/settings64.sh
source /opt/PetaLinux/petalinux-v2015.2.1-final/settings.sh

Useful info

ZYNQ7 Processing System IP
Zynq-7000 memory map
Acronym Definition
ACP Accelerator Coherency Port
AP SoC All Programmable System on a Chip
APB Advanced Peripheral Bus
APU Application Processor Unit
ASIC Application-Specific Integrated Circuit
AXI Advanced eXtensible Interface
BSP Board Support Package
CLB Configurable Logic Block
DMA Direct Memory Access
DRM Direct Rendering Manager
DSP Digital Signal Processor
DTB Device Tree Binary
DTS Device Tree Source
EMIO Extended MIO
FIFO First In, First Out
FMC FPGA Mezzanine Card
FPGA Field-Programmable Gate Array
FSBL First-Stage Boot Loader
GDB GNU Project Debugger
GIC Generic Interrupt Controller
GNU GNU's Not Unix
GPIO General-Purpose I/O
HDL Hardware Description Language
HLS High-Level Synthesis
I2C Inter-Integrated Circuit
IDE Integrated Development Environment
IOP Input/Output Peripherals
IP Intellectual Property
IRQ Interrupt ReQuest
JTAG Joint Test Action Group
LUT Look-Up Tables
LVDS Low Voltage Differential Signal
MIO Multiplexed I/O
MMU Memory Management Unit
OCM On-Chip Memory
OS Operating System
PL Programmable Logic (a.k.a. fabric)
PLL Phase-Locked Loop
PS Processing System (a.k.a. processor)
QSPI Quad Serial Peripheral Interface
RTL Register Transfer Level
SCU Snoop Control Unit
SDK Software Development Kit
SIMD Single Instruction Multiple Data
SoC System on a Chip
TLA Three-Letter Acronym
TLB Translation Lookaside Buffer
TTC Triple-Timer Counter
UART Universal Asynchronous Receiver/Transmitter
UIO Userspace I/O

Tutorials

  1. ZedBoard Getting Started Guide
    http://zedboard.org/sites/default/files/documentations/GS-AES-Z7EV-7Z020-G-V7.pdf

  2. Avnet Zynq SpeedWay Workshops
    http://zedboard.org/support/trainings-and-videos

  3. Zynq Design From Scratch blog by Sven Andersson
    http://svenand.blogdrive.com/

  4. Vivado Design Suite Tutorial: Embedded Processor Hardware Design (UG940)
    http://www.xilinx.com/support/documentation/sw_manuals/xilinx2015_2/ug940-vivado-tutorial-embedded-design.pdf

    • Remember to download the tutorial design files
  5. Xilinx University Program Workshops
    http://www.xilinx.com/support/university/workshops.html

  6. Zynq-7000 All Programmable SoC: Embedded Design Tutorial (UG1165)
    http://www.xilinx.com/support/documentation/sw_manuals/xilinx2015_2/ug1165-zynq-embedded-design-tutorial.pdf

    • Remember to download the tutorial design files
  7. Zynq Base Targeted Reference Design (TRD) 2015.2
    http://www.xilinx.com/support/documentation/boards_and_kits/zc702_zvik/2015_2/ug925-zynq-zc702-base-trd.pdf
    http://www.wiki.xilinx.com/Zynq+Base+TRD+2015.2

    • ⚠️ For ZC702 Evaluation Board, not ZedBoard!
    • Remember to download the tutorial design files
  8. Reading materials

    1. The Zynq Book
      http://www.zynqbook.com/
    2. Xilinx UltraFast Embedded Design Methodology Guide (UG1046)
      http://www.xilinx.com/support/documentation/sw_manuals/ug1046-ultrafast-design-methodology-guide.pdf

Known Issues (PetaLinux)

Miscellaneous (PetaLinux)

  • Enable TCF agent

    petalinux-config -c rootfs`
    # Select Filesystem Packages -> base -> tcf-agent
    
  • Enable SSH server

    petalinux-config -c rootfs`
    # Select Filesystem Packages -> console/network -> dropbear
    # Select Filesystem Packages -> console/network -> dropbear-openssh-sftp-server
    
  • Mount via NFS

    mkdir /mnt/nfs
    mount -o port=2049,nolock,proto=tcp -t nfs 192.168.1.1:<directory> /mnt/nfs
    cd /mnt/nfs/<project>
    # Can now execute "myapp" in build/linux/rootfs/apps/myapp/myapp
    
  • Change MAC address

    petalinux-config
    # Select Subsystem AUTO Hardware Settings -> Ethernet Settings -> (00:0a:35:00:1e:53) Ethernet MAC address 
    
  • Use static IP address

    petalinux-config
    # Deselect Subsystem AUTO Hardware Settings -> Ethernet Settings -> Obtain IP address automatically
    # After that, three new configurations (Static IP address, netmask, gateway) appear. Select and update them
    
  • Run applications at startup

    • See AR# 55998
    • Create an application, and create a startup script in the application area
    petalinux-create -t apps -n mystartup --enable
    echo 'echo "Hello World"' > components/apps/mystartup/mystartup.sh
    
    • Modify the Makefile, remove any reference to APP_OBJS and *.o, update the install section to copy mystartup to /etc/init.d/ and create a symbolic link to /etc/rc5.d/
    # Modify components/apps/mystartup/Makefile "install" section
    
    install: $(APP)
    	$(TARGETINST) -d -p 0755 mystartup /etc/init.d/mystartup
    	$(TARGETINST) -s /etc/init.d/mystartup /etc/rc5.d/S99mystartup
    
    • Remember to indent with a tab character, otherwise the Makefile won't work
  • Auto login

    • Add a new file build/linux/rootfs/targetroot/bin/autologin with the following content:
    #!/bin/sh
    exec /bin/login -f root
    
    • Make autologin executable
    chmod 755 build/linux/rootfs/targetroot/bin/autologin
    
    • Modify build/linux/rootfs/targetroot/etc/inittab, change the very last line to
    PS0:2345:respawn:/sbin/getty -l /bin/autologin -n -L 115200 ttyPS0 vt100
    
    • Repackage the image
    petalinux-package --image
    
  • Use an external Linux kernel

    cd <directory>
    mkdir linux-kernel
    git clone git@github.com:Xilinx/linux-xlnx.git
    git checkout -b from-xilinx-v2015.3 xilinx-v2015.3
    petalinux-config --searchpath --append <directory>
    petalinux-config
    # Select linux Components Selection -> kernel -> linux-xlnx
    
  • Update device tree generator

    cd /opt/PetaLinux/petalinux-v2015.2.1-final/components/edk_user_repository/device-tree-generator
    git remote add gh-origin git@github.com:Xilinx/device-tree-xlnx.git
    git fetch gh-origin
    git checkout -b from-xilinx-v2015.3 gh-origin/xilinx-v2015.3
    petalinux-config --get-hw-description=<Vivado_Export_to_SDK_Directory>
    

About

No description or website provided.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published