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

Zynq UltraScale+MPSoC Graphics- GPU application debugging using ARM Mali Graphics Debugger tool

$
0
0
...
DDR controller,UART,SD/eMMC interface, USB 3.0,DisplayPort
Boards/Tools
ZCU102 Rev-B/Rev-C/Rev-D,Rev-1.0
Xilinx Tools Version
SDK 2016.32016.4
Other Details
ARM® DS-5 Mali graphics debugger tool
...
Executing the tech tip with prebuilt images.
Installing ARM Mali graphics debugger tool on windows-64 bit machine.
...
different silicon version.versions.
Debugging an example graphics application.
Requirements:
...
This section helps how to execute this this tech tip using the prebuilt images supplied along with this tech tip.If you want to build all the images from the source then, skip this section.
Download the Graphics_application_debugging.zip and extract it to a local directory.It will get extracted as below directories
Rev_1_0_Desing_Files - TheseIt has images are
...

Rev_D_Desing_Files - TheseIt has images are
According to the board, copy Prebuilt_SD_Images on to a SD card (4GB or above ).
Now copy the Mali Interceptor libraries and the Mali debugger daemons on to the SD card from the Mali installation directory of windows host machine.

Zynq UltraScale+MPSoC Graphics- GPU Profiling using ARM Streamline performance analyzer

$
0
0
...
Below are the main topics which are covered in this tech tip :
Executing the tech tip with prebuilt images.
...
different silicon version.versions.
Compiling & building gator module and gator daemon.
Installing ARM Streamline performance analyzer tool on windows machine.
...
First of all install the performance analyzer tool by following the section "Installing ARM Streamline performance analyzer tool on windows machine " below.
Download the ARM_Streamline_performance_analyzer.zip file using link provided at the top of this tech tip and extract to your local directory.It will be extracted as below directories
Rev_1_0_Desing_Files - TheseIt has images are
...

Rev_D_Desing_Files - TheseIt has images are
According to the board, copy Prebuilt_SD_Images on to a SD card (4GB or above ).
Do the board setup by following the "ZCU102 board setup" section below in this page.
...
Change the directory to created Petalinux project and Apply the BSP settings as per the hardware definition
Replace the system.hdf located at Xilinx-ZCU102-2016.4/project-spec/hw-description with the system.hdf file provided in release files and run the following command
...
board revisions.
$ petalinux-config --oldconfig
Open the Petalinux kernel configuration wizard -
$petalinux-config -c kernel
Navigate to and enable the kernel tracing options and save the config file and exit.
Kernel hacking > Tracers > Kernel function Tracer

Open the Petalinux rootfs configuration wizard -
$petalinux-config -c rootfs

Zynq UltraScale+MPSoC Graphics- GPU Profiling using ARM Streamline performance analyzer

$
0
0

zcu102_rev1_sd_boot_mode.png

zynqmp_cdc_console_2016_4.png

windows_cdc_2016_4_result1.png

windows_cdc_2016_4_result2.png

linux_cdc_2016_4_result1.png


linux_cdc_2016_4_result1.png

linux_cdc_2016_4_result1_new.png

linux_cdc_2016_4_result2.png

linux_cdc_2016_4_result3.png

Zynq UltraScale+ MPSoC USB 3.0 CDC Device Class Design

$
0
0
...
1.1
Rutuja Chavan
Updated1. Updated to 2016.4 tool version
2. Designed for ZCU102 Rev1.0 and RevB/C/D Boards

Summary
The Zynq® UltraScale+™ MPSoC USB 3.0 controller consists of two independent dual-role device (DRD) controllers. Both can be individually configured to work as host or device at any given time.The USB 3.0 DRD controller provides an eXtensible host controller interface (xHCI) to the system software through the advanced eXtensible interface (AXI) slave interface. An internal DMA engine is present in the controller and it utilizes the AXI master interface to transfer data. There are four primary types of communication defined by the USB protocol, based on which any required application can be built without changing the firmware or underlying hardware for different applications. These transfer types are Control Transfer, Bulk Transfer, Isochronous transfer and Interrupt transfer. Zynq® UltraScale+™ MPSoC USB3.0 controller supports all four types of transfers.This Tech Tip explains how to enable all the configuration options, step by step procedure to use the Zynq® UltraScale+™ MPSoC USB 3.0 controller in device mode and make use of bulk transfer type for a serial communication device abstraction using the USB 3.0. The CDC (ACM) class in the USB Component is used for data communication. You can typically use it in applications like serial COM or UART communicationThis design covers:
...
The gadget serial driver is a Linux USB gadget driver, a USB device side driver. It runs on a Linux system that has USB device side hardware; for example, a PDA, an embedded Linux system, or a PC with a USB development card. The gadget serial driver talks over USB to either a CDC ACM driver or a generic USB serial driver running on a host PC. On the device-side Linux system, the gadget serial driver looks like a serial device. On the host-side system, the gadget serial device looks like a CDC ACM compliant class device or a simple vendor specific device with bulk in and bulk out endpoints, and it is treated similarly to other serial devices.The host side driver can potentially be any ACM compliant driver or any driver that can talk to a device with a simple bulk in/out interface. With the gadget serial driver and the host side ACM or generic serial driver running, you should be able to communicate between the host and the gadget side systems as if they were connected by a serial cable.Configuring and building the Linux Operating System for Zynq Ultrascale + MPSoC
Follow the PetaLinux SDK installation user guide in this document. Execute the steps till the PetaLinux Working Environment Setup section for installing PetaLinux SDK to your Linux machine.
...
boards, download ZCU102 BSP from xilinx
After installing PetaLinux SDK create a project in the PetaLinux installed directory by executing $ petalinux-create –t project –n <project_name> -s <path-to-bsp> command
Above command will create a project with the user provided name under the PetaLinux installed directory. Change the directory to project directory which is created above. $ cd <project_name>
Configure the Linux source to support communication device class driver by executing PetaLinux command $ petalinux-config -c kernel
Go to Device Drivers -->
...
Support -->
USB Gadget Support -->
USB Peripheral Controller -->enable NetChip 228x / PLX USB338x as shown in figure below and make sure that Xilinx USB driver is enabled.
{usb_peripheral_controller_config.jpg} Figure 2: Linux kernel configuration enable USB peripheral controller
Also
enable required
{usb_kernel_config.jpg} Figure 3: Linux kernel configuration withUSB 3.0 device mode CDC ACM support
Go to File Systems -->
...
{filesystem_configuratioj.png} Figure 4: Linux kernel configuration for Userspace-driven configuration filesystem
Ensure that parameters shown in the below figure are selected in the kernel source tree and save & exit the configuration file.
...
at "<project_name>/project-spec/meta-user/recipes-dt/device-tree/files/"
&dwc3_0 {
dr_mode = "peripheral";
...
g_serial.ko from following path “<project_name>/build/tmp/work/plnx_aarch64-xilinx-linux/petalinux-user-image/1.0-r0/rootfs/lib/modules/4.6.0-xilinx/kernel/drivers/usb/gadget/legacy"
Image.ub from “<project_name>/images/linux”
...
card images for Linux under the
...
extracted directory. User canFor Rev1.0 board copy BOOT_rev1.0.bin into SD card and for Rev B/C/D boards, copy BOOT_revBCD.bin file into SD card and use these imagesother prebuilt modules. Refer to appendix A for quick test.more information about design file.
ZCU102 Board Setup:
Connect the power supply to the ZCU102 board. Do not switch the power on.
Connect the Micro USB cable into the ZCU102 Board Micro USB port J83, and the other end into an open USB port on the host Machine as shown in figure below.
{zcu102_board_setup_device_mode.png} Figure 6: ZCU102 board setup for Communication device class
...
in figure below7(ZCU102 Rev B/C/D) and figure 8(ZCU102 Rev1.0), which allows
...
for ZCU102 Rev B/C/D Board {zcu102_rev1_sd_boot_mode.png} Figure 8: SD boot mode switch settings for ZCU102 Rev1.0 board
To operate board in device mode, OFF J7 jumper as shown in board figure 6 (ZCU102 board setup in device mode).
Testing Linux Zynq® UltraScale+™ MPSoC USB 3.0 communication device class functionality on Windows host PC:
...
insmod g_serial.ko
Now the Zynq® UltraScale+™ MPSoC USB 3.0 gadget serial device is ready.
{kernel_modules_image.jpg}{zynqmp_cdc_console_2016_4.png} Figure 8: ZynqMP9: Zynqmp linux console
...
successful installation
Now connect USB 3.0 cable between board and host machine. Conenct type A male side end to host machine USB3.0 port and Micro B male side end of cable to USB3.0 connector (J96) on ZCU102 board as shown in figure 6 ZCU102 board setup.
Host PC tries to enumerate the Zynq® UltraScale+™ MPSoC USB 3.0 as a communication class device and try to install the appropriate windows driver from network.
...
In the windows host machine, click on the start button and Search for Device Manager and click on it to select.
This will open Device manager wizard window. Check for other devices. Right click on Gadget Serial v2.4 and click to Update Driver Software as shown in figure below. Make sure that host machine is connected over network.
{gadget_driver_installation.jpg} Figure 9: Device manager wizard
After installing the driver software successfully the Zynq® UltraScale+™ MPSoC USB 3.0 device is detected as a virtual communication port (PI USB to Serial Port) at the host PC side and on the other side i.e. target side. USB serial gadget driver is registered as /dev/ttyGS0.
{pl_usb_com_driver.jpg} Figure 10: Gadget driver after successful installation>
...
$ echo Hello >/dev/ttyGS0
After that you should see the Hello on the virtual communication port (ex: COM58) as shown below figure.
{usb_windows_1st_op.jpg}{windows_cdc_2016_4_result1.png} Figure 11:12: Serial terminal
...
host machine
In

n
the similar
...
figure below
{usb_windows_2nd_op.jpg.png}

{windows_cdc_2016_4_result2.png}
Figure 12:
Testing Linux Zynq® UltraScale+™ MPSoC USB 3.0 communication device class functionality on Linux host PC:
The CDC ACM only driver that comes with the Linux kernel is supported on Linux host PC.
...
The serial communication port get registered as 'ttyACM0' meaning it will show up as '/dev/ttyACM0'.
In order to send data from the target device we need to use the USB serial gadget driver device file '/dev/ttyGS0'. We can echo command to send data from the device to the Linux host computer.
{usb_linux_target_side.png}{linux_cdc_2016_4_result1_new.png} Figure 14:
...
3.0 ttyGS0
Use

se
the following
{usb_linux_2nd_host_op.png} Figure 15: Reading data on ttyACM0
In the similar way if we want to send data from the host computer to the device we should first send the data from host by running following command
{usb_linux_3rd_host_side_ip.png}{linux_cdc_2016_4_result2.png} Figure 16:
Read it on the device using "$cat /dev/ttyGS0" command.
{usb_linux_target_4th_side.png}{linux_cdc_2016_4_result3.png} Figure 17:
...
target at ttyGS0AppendixttyGS0
Appendix
A: If
Zynqmp_CDC_Design_files.zip
Design_files

Zynq UltraScale+ MPSoC - 64-bit DDR access with ECC

$
0
0
Important! Tag the page
Important! All External Links should open in a new tab/window; all Internal Links to Xilinx wiki pages, should open in the same tab/window.
<Insert introduction text here>
Section 1
Sub-Heading 1
Sub-Heading 2
Insert Code: Use Widget-> Insert Code
Insert your code here.
Setting up Petalinux:
Download the petalinux-v2016.4-final-installer.run file and the xilinx-zcu102-zu9-es2-rev1.0-v2016.4-final1.bsp from Xilinx site.
Ensure your system has required dependencies for running Petalinux. For more information on Petalinux installation and it dependencies refer to 2016.4 UG114 Petalinux User guide.
__https://www.xilinx.com/support/documentation/sw_manuals/xilinx2016_4/ug1144-petalinux-tools-reference-guide.pdf__
On your Linux Machine install the Petalinux software:
Open a terminal on your linux machine and run the following commands.
$ ./petalinux-v2016.4-final-installer.run /opt/
$ source /opt/petalinux-v2016.4-final/settings.sh
Copy the ecc-designfiles.zip file on to your linux machine and run the following commands
$ unzip ecc-designfiles.zip
$ export MYWORKSPACE=<path to ecc-designfiles directory>
$ cd $MYWORKSPACE
Check if you are in ecc-designfiles directory by typing “pwd” in the Linux terminal.
Type ls and you should see the following directories.
sdk_export
hw
ready_to_test
Create a Petalinux project and source the Zynq MPSoC ECC Hardware description file for the ZCU102 board present in the sdk_export directory.
$ petalinux-create -t project -s xilinx-zcu102-zu9-es2-rev1.0-v2016.4-final1.bsp
$ petalinux-config --get-hw-description $MYWORKSPACE/sdk_export/ –p xilinx-zcu102-zu9-es2-rev1.0-v2016.4-final1
Build the images for the ZCU102 board.
$ cd xilinx-zcu102-zu9-es2-rev1.0-v2016.4-final1
$ petalinux-build
$ cd images/linux
Create the boot binary for the ZCU102 board
$ petalinux-package --boot --fsbl zynqmp_fsbl.elf --fpga design_1_wrapper.bit --u-boot u-boot.elf
Copy the boot.bin and image.ub present in the images/linux directory to an SD card
Insert the SDCard to the ZCU102 board and boot the ZCU102 board configured in SDBoot Mode
Depending on the ECC configuration of DDR when the we source the hardware to Petalinux BSP, the Petalinux top level configuration automatically sets the linux configuration to enable EDAC driver to test tests ECC errors on the Zynq MPSoC.
Injecting ECC Errors for ZynqMP DDRC Controller
When the ECC is enabled the following sysfs entries are created that enables the user to inject ecc errors.
-> /sys/devices/system/edac/mc/mc0/inject_data_poison (to enable CE/UE)
This entry is created to enabled correctable(CE or single error correction and detection)error or uncorrectable (UE or double error detection)
-> /sys/devices/system/edac/mc/mc0/inject_data_error (to specify address)
This entry is created to specify the DDR address to monitor for the ECC errors.
Enabling the CE/UE errors
-> echo "CE" > /sys/devices/system/edac/mc/mc0/inject_data_poison
the above command enables Correctable error injection
-> echo "UE" > /sys/devices/system/edac/mc/mc0/inject_data_poison
the above command enables UnCorrectable error injection
Select the address to inject ECC Errors
-> echo 0x7EE0EEE0 > /sys/devices/system/edac/mc/mc0/inject_data_error
The above command configures Data poison registers to inject errors at the address specified. As per ZynqMP DDR Controller specification, whenever a write operation detected on the address specified, it injects errors to that location and it will report the errors back, when a read operation is performed.
So write some data to the address specified using devmem command, based CE/UE enable, the DDR controller injects errors corrupts the data at that address specified.
-> devmem 0x7EE0EEE0 32 0x1234
with the above command, the controller and then try reading the data from that address using devmem command
-> devmem 0x7EE0EEE0
Whenever the read occurs the error condition is triggered and the EDAC driver will print the below message.
EDAC MC0: 1 UE DDR ECC error type :UE Row 12544 Bank 0 Col 0 BankGroup Number 2 Block Number 64 on mc#0csrow#0channel#0 (csrow:0 channel:0 page:0x0 offset:0x0 grain:1)
Unhandled fault: synchronous external abort (0x92000210) at 0x0000007f8d666200
Bus error
Building the Hardware:
Tools Required to Run Hardware:
Vivado 2016.4
cd hw/
source zynqmp-ecc-design.tcl
Related Links
Title 1 & Link 1
Title 1 & Link 1

bsp_download.JPG


Rev1_sw6.JPG

RevD_sw6.JPG

board_setup.JPG

Zynq UltraScale+MPSoC Graphics- GPU application debugging using ARM Mali Graphics Debugger tool

$
0
0
...
Insert SD card into the SD card slot J100.
Set the SW6 switches as shown. This configures the boot settings to boot from SD:
{RevD_sw6.JPG} Fig:zcu102 Rev-B/Rev-C/Rev-D boards sw6 setups {Rev1_sw6.JPG} Fig: zcu102 Rev-1.0 board sw6 setup
Connect 12V Power to the ZCU102 6-Pin Molex connector.
Connect the monitor using DisplayPort cable to U50.
The following figure shows the ZCU102 board with connections
{board_setup.JPG}
Debugging an example graphics application:
This section walks through the steps how to execute and debug a graphics application using ARM Mali graphics debugger.

Zynq UltraScale+MPSoC Graphics- GPU application debugging using ARM Mali Graphics Debugger tool

$
0
0
...
Insert SD card into the SD card slot J100.
Set the SW6 switches as shown. This configures the boot settings to boot from SD:
...
sw6 setups {Rev1_sw6.JPG}> {Rev1_sw6.JPG} Fig: zcu102
Connect 12V Power to the ZCU102 6-Pin Molex connector.
Connect the monitor using DisplayPort cable to U50.
Viewing all 11776 articles
Browse latest View live


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