Quantcast
Channel: Xilinx Wiki : Xilinx Wiki - all changes
Viewing all 11776 articles
Browse latest View live

FPGA Manager ZCU102

$
0
0
...
petalinux-create -t project -s Xilinx-ZCU102-v2016.4-final.bsp
cd Xilinx-ZCU102-2016.4
petalinux-config -c kernelkernelpetalinux-build
cd <petalinux project>
Device Drivers ---> FPGA Configuration Support ---> <*> Xilinx Zynqmp FPGA
NOTE: If you run into an error with libtinfo.so, edit 'build/linux/kernel/download/linux-xlnx/scripts/kconfig/Makefile'
and add -ltinfo at the end of the line with HOSTLOADLIBES_mconf
petalinux-build
cd images/linux
petalinux-package --boot --fsbl zynqmp_fsbl.elf --uboot

FPGA Manager ZCU102

$
0
0
...
petalinux-create -t project -s Xilinx-ZCU102-v2016.4-final.bsp
cd Xilinx-ZCU102-2016.4
petalinux-config -c kernelpetalinux-buildkernel
cd <petalinux project>
Device Drivers ---> FPGA Configuration Support ---> <*> Xilinx Zynqmp FPGA
NOTE: If you run into an error with libtinfo.so, edit 'build/linux/kernel/download/linux-xlnx/scripts/kconfig/Makefile'
and add -ltinfo at the end of the line with HOSTLOADLIBES_mconf
petalinux-build
cd images/linux
petalinux-package --boot --fsbl zynqmp_fsbl.elf --uboot

FPGA Manager ZCU102

$
0
0
...
cd <petalinux project>
Device Drivers ---> FPGA Configuration Support ---> <*> Xilinx Zynqmp FPGA
...
edit 'build/linux/kernel/download/linux-xlnx/scripts/kconfig/Makefile'
and
and add -ltinfo
petalinux-build
cd images/linux

fpga_manager.PNG

FPGA Manager ZCU102

$
0
0
...
in both linuxLinux and standalone
Linux:
IBSP package was used the BSP to built
...
petalinux project. Users,However users, can also
...
the project. See
See
the link
...
linux image
The BSP

BSP
can be
Follow the commands below to build the image:
source /proj/gsd/petalinux/2016.4/settings.csh
...
design_1_wrapper.bit
}
Use the command below (from XSCT) to createCreate the bin file:file of the bistream (from XSCT):
bootgen -image boot_a53_bin_pl_all.bif -arch zynqmp -process_bitstream bin
To test the image, copyCopy the following
design_1_wrapper.bit.bin
BOOT.BIN
uimage.ub
Note: The INIT done pin on the ZCU102 will be red.
Boot Linux, mount the SD card, copy the PL bin to the lib/firmware, and process:
mount /dev/mmcblk0p1 /media/
cp /media/design_1_wrapper.bit.bin /lib/firmware/
echo design_1_wrapper.bit.bin > /sys/class/fpga_manager/fpga0/firmware
{linux_boot.png}{fpga_manager.PNG}
Note: You should see theCheck how INIT_DONE led gogoes from red to green on the ZCU102.ZCU102 when bitstream is loaded
Standalone:
Launch SDK 2016.4

FPGA Manager ZCU102

$
0
0
...
BSP can be downloaded from the Xilinx website here.
Follow the commands below to build the image:
source /proj/gsd/petalinux/2016.4/settings.csh
petalinux-create -t project -s Xilinx-ZCU102-v2016.4-final.bsp
cd Xilinx-ZCU102-2016.4
...
cd <petalinux project>
Device Drivers ---> FPGA Configuration Support ---> <*> Xilinx Zynqmp FPGA
NOTE: If you run into an error with libtinfo.so, edit 'build/linux/kernel/download/linux-xlnx/scripts/kconfig/Makefile' and add -ltinfo at the end of the line with HOSTLOADLIBES_mconf
petalinux-build
cd images/linux
...
design_1_wrapper.bit.bin
BOOT.BIN
uimage.ubimage.ub
Boot Linux, mount the SD card, copy the PL bin to the lib/firmware, and process:
mount /dev/mmcblk0p1 /media/

app_project.PNG

app_empty.PNG


app_project.PNG

app_empty.PNG

FPGA Manager ZCU102

$
0
0
...
echo design_1_wrapper.bit.bin > /sys/class/fpga_manager/fpga0/firmware
{fpga_manager.PNG}
Note: Check how INIT_DONE led goes from red to green on the ZCU102 when bitstream is loaded
Standalone:
...
SDK 2016.4
File -> New -> Application Project:
Hardware Platform: ZynqMP_ZCU102_hw_platform(pre-defined)
Processor: psu_cortexa53_0
{new_app.png}
Next,
and select Empty Application and Finish.
Right
create a new empty application.
{app_project.PNG} {app_empty.PNG}
Right
click on the fpga_mananger_bsp, andBSP to select Board Support Package Settings.
Enable
Settings, and enable the xilfpga driver, and OK to continue.driver.
{bsp_opts.png}
User will need to provide additional info, like the offset, and the size.
Here, I have set
Configure the offset to 0x100000, and the size of the configuration file (i.e. 0x100000 offset).
Note: Size refers
to 26510780.
Note: the size is
the bin
...
size in bytes:
{file_size.png}
bytes
{file_size_mss.png}
Right click onCreate the src folder in the newly created app, and select New -> Source File:
{file_src.png}
Create the File,
File called xfpga_load_bitstream_example.c
...
contents from here:the example file:
<SDK Install>\data\embeddedsw\lib\sw_services\xilfpga_v1_0\examples\xfpga_load_bitstream_example.cInstall>\data\embeddedsw\lib\sw_services\xilfpga_v1_1\examples\xfpga_load_bitstream_example.c
To test the baremetal driver, user can use the XSDB, or they can create a boot image similar to the one used to test the linux driver.
To use the XSDB, user can use the TCL script below:

fpga_fsbl.PNG

FPGA Manager ZCU102

$
0
0
...
echo design_1_wrapper.bit.bin > /sys/class/fpga_manager/fpga0/firmware
{fpga_manager.PNG}
Note: Check INIT_B led is turned green once the FPGA is loaded with the new firmware
Standalone:
Launch SDK 2016.4 and create a new empty application.
...
Create the File called xfpga_load_bitstream_example.c and copy the contents from the example file:
<SDK Install>\data\embeddedsw\lib\sw_services\xilfpga_v1_1\examples\xfpga_load_bitstream_example.c
...
test the linuxLinux driver.
To use the XSDB, user can use the TCL script below:
connect
targets -set -filter {name =~ "PSU"}
# disable isolation for PL
mask_write 0XFFD80118 0x00800000 0x00800000
mask_write 0XFFD80120 0x00800000 0x00800000
# write bootloop and release A53-0 reset
mwr 0xffff0000 0x14000000
mwr 0xFD1A0104 0x380E
source psu_init.tcl
source ZynqMP_ZCU102_hw_platform/psu_init.tcl
psu_init
psu_post_config
psu_ps_pl_isolation_removal
psu_ps_pl_reset_config

dow -data design_1_wrapper.bit.bin 0x100000
# write bootloop and release A53-0 reset
mwr 0xffff0000 0x14000000
mwr 0xFD1A0104 0x380E

targets -set -filter {name =~ "Cortex-A53 #0"}
dow fpga_manager.elffpga_manager/Debug/fpga_manager.elf
con
User can alsoNote: configuration binary file created on the Linux use case is used to load the FPGA
Note: file paths may vary, modify according to your file locations
To
use the SD card. Thecard option:
Create a fsbl application
Create a
BIF is shown below:file including the fsbl, the test application and the binary file (see example bellow)
bootgen -arch zynqmp -image bootgen.bif -o i BOOT.BIN -w on

//arch = zynqmp; split = false; format = BIN
the_ROM_image:all:
{
[fsbl_config]a53_x64
[bootloader] fsbl.elffsbl/Debug/fsbl.elf
[destination_cpu = a53-0] fpga_manager.elffpga_manager/Debug/fpga_manager.elf
[load = 0x100000, destination_cpu = a53-0] design_1_wrapper.bit.bin
}
Use{fpga_fsbl.PNG}
Note: Check INIT_B led is turned green once
the command below onFPGA is loaded with the XSCT to create the BOOT.BIN:
bootgen -arch zynqmp -image bootgen.bif -o i BOOT.BIN -w on
You will see the INIT_DONE LED light, and the following on the serial port:
{success.png}
new firmware

fpga_tcl.PNG

FPGA Manager ZCU102

$
0
0
...
Note: configuration binary file created on the Linux use case is used to load the FPGA
Note: file paths may vary, modify according to your file locations
{fpga_tcl.PNG}
To use the SD card option:
Create a fsbl application

fpga_uboot.PNG

FPGA Manager ZCU102

$
0
0
...
echo design_1_wrapper.bit.bin > /sys/class/fpga_manager/fpga0/firmware
{fpga_manager.PNG}
Note: Check INIT_B led is turned green once the FPGA is loaded with the new firmware
U-Boot:
This scenario uses the same boot files created in the Linux use case, but the FPGA will be loaded in U-Boot, loading the binary file in the memory and using fpga framework.
fatload mmc 0 0x4000000 design_1_wrapper.bit.bin
fpga load 0 0x4000000 <bin size in bytes>
{fpga_uboot.PNG}

Note: Check INIT_B led is turned green once the FPGA is loaded with the new firmware
Standalone:

Zynq UltraScale+ MPSoC Power Management - Linux Kernel

$
0
0
...
-r--r--r-- 1 root root 4096 Jun 10 21:55 current_driver
-r--r--r-- 1 root root 4096 Jun 10 21:55 current_governor_ro
Debugfs
The debugfs interface is intended for testing and debugging the integration between the Linux kernel and the Zynq UltraScale+ MPSoC power management framework. This interface must be used with a lot of care. In fact, accessing this interface during normal PM operation will very likely cause unexpected problems. Please refer to UG1199 for the usage of PM API.
Kernel configurations required:
CONFIG_ZYNQMP_PM_API_DEBUGFS
Access to the debugfs interface is provided through the following node in the sysfs:
/sys/kernel/debug/zynqmp_pm/power
For example,
$ echo request_node 22 1 100 1 > /sys/kernel/debug/zynqmp_pm/power
See UG1199 for the input parameters to the APIs.
Get API Version
Get the API version.
$ echo get_api_version > /sys/kernel/debug/zynqmp_pm/power
Request Suspend
Request another PU to suspend itself.
$ echo request_suspend <node> <ack> <latency> <state> > /sys/kernel/debug/zynqmp_pm/power
Self Suspend
Notify PMU that this PU is about to suspend itself.
$ echo self_suspend <node> <latency> <state> <address> > /sys/kernel/debug/zynqmp_pm/power
Force Power Down
Force another PU to power down.
$ echo force_powerdown <node> <ack> > /sys/kernel/debug/zynqmp_pm/power
Abort Suspend
Notify PMU that the attempt to suspend has been aborted.
$ echo abort_suspend <reason> > /sys/kernel/debug/zynqmp_pm/power
Request Wake-up
Request another PU to wake up from suspend state.
$ echo request_wakeup <node> <set_address> <address> <ack> > /sys/kernel/debug/zynqmp_pm/power
Set Wake-up Source
Set up a node as the wake-up source.
$ echo set_wakeup_source <target> <wkup_node> <enable> > /sys/kernel/debug/zynqmp_pm/power
System Shutdown
Shut down the PU's own sub-system.
$ echo system_shutdown <restart> > /sys/kernel/debug/zynqmp_pm/power
Request Node
Request to use a node.
$ echo request_node <node> <capabilities> <qos> <ack> > /sys/kernel/debug/zynqmp_pm/power
Release Node
Free a node that is no longer being used.
$ echo release_node <node> > /sys/kernel/debug/zynqmp_pm/power
Set Requirement
Set the power requirement on the node.
$ echo set_requirement <node> <capabilities> <qos> <ack> > /sys/kernel/debug/zynqmp_pm/power
Set Max Latency
Set the maximum wake-up latency requirement for a node.
$ echo set_max_latency <node> <latency> > /sys/kernel/debug/zynqmp_pm/power
Set Configuration
TBD
Get Node Status
Get status information of a node. (Any PU can check the status of any node, regardless of the node assignment.)
$ echo get_node_status <node> <nodestatus> > /sys/kernel/debug/zynqmp_pm/power
Get Operating Characteristic
Get operating characteristic information of a node.
$ echo get_operating_characteristic <node> <type> <result> > /sys/kernel/debug/zynqmp_pm/power
Register Notifier
TBD
Reset Assert
Assert/de-assert on specific reset lines.
$ echo reset_assert <reset> <action> > /sys/kernel/debug/zynqmp_pm/power
Reset Get Status
TBD
MMIO Read
TBD
MMIO Write
TBD

Related Links
Zynq UltraScale+ MPSoC Power Management

Zynq UltraScale+ MPSoC Ubuntu part 2 - Building and Running the Ubuntu Desktop From Sources

$
0
0
...
USB 3.0 connector or USB 2.0 micro cable to standard USB female adapter, USB Hub to connect USB mouse and USB keyboard or connect USB keyboard with mouse integrated etc.
Files Provided
Ubuntu_Source_Release1.zipUbuntu_Desktop_Source_Release.zip
Archived file
contain the following files/folders:
All the dependent files for building Ubuntu Desktop
Ubuntu Desktop rootfs in cpio format
ZCU102_Ubuntu_2_2.zipZCU102_Ubuntu_Desktop.zip
Archived file
contain the following files/folders:
...
This section describes how to build the Linux images for zcu102 target platform using latest release Petalinux SDK of version 2016.3.
4.1.1. Download the Petalinux petalinux-v2016.3-final-installer.run and ZCU102 BSP from the below path
http://www.xilinx.com/support/download/index.html/content/xilinx/en/downloadNav/embedded-design-tools/2016-3.html
{plnx_installar_download.GIF} Petalinux SDK Installer and BSP
4.1.1.1.Install the Petalinux by running the above downloaded installer

FPGA Manager ZCU102

$
0
0
...
BSP can be downloaded from the Xilinx website here.
Follow the commands below to build the image:
...
project -s Xilinx-ZCU102-v2016.4-final.bspxilinx-ZCU102-v2016.4-final.bsp
cd Xilinx-ZCU102-2016.4xilinx-ZCU102-2016.4
petalinux-config -c kernel
cd <petalinux project>
Viewing all 11776 articles
Browse latest View live


Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>