Rev1.3 5-Jul-23
3.1 ZC706 and Zynq Mini-ITX board
5.1 Performance test by diskTestApp
Use following command to run test application in raw data format.
>> ./benchmark/diskTestApp r
Five input parameters are required,
>> ./benchmark/diskTestApp f /media/hdd
Five input parameters are required.
This document describes the instruction to run SATA AHCI-IP and SATA-IP on Zynq platform for SATA-II/III device access by ARM CPU which runs PetaLinux OS (PetaLinux 2013.10 is used for ZC706 and Zynq mini-ITX while PetaLinux 2022.1 is used for ZCU106). In the demo, FPGA is boot and configured by using SD Card.
To run the SATA AHCI-IP demo on FPGA development board, please prepare the following hardware.
1) Supported FPGA development board: ZC706, Zynq Mini-ITX 7Z100, and ZCU106
2) SATA connector:
a) ZC706/ZCU106: AB09-FMCRAID board
b) Zynq Mini-ITX: SATA cable
3) SATA device
a) ZC706/Zynq Mini-ITX: SATA-II or SATA-III device
b) ZCU106: SATA-III device
4) Xilinx Power adapter for Xilinx board except Zynq Mini-ITX board.
5) ATX power supply for Zynq Mini-ITX board and SATA device.
6) USB cable for Serial console
a) ZC706: mini USB cable
b) ZCU106/Zynq Mini-ITX: micro USB cable
7) SD card with boot loader (BOOT.BIN) and LINUX image (image.ub), downloaded from http://www.dgway.com/SATA-IP_X_E.html
Figure 1‑1 SATA AHCI-IP Demo Environment Setup on ZC706
Figure 1‑2 SATA AHCI-IP Demo Environment Setup on Zynq Mini-ITX 7Z100
Figure 1‑3 SATA AHCI-IP Demo Environment Setup on ZCU106
1) Copy PetaLinux boot images to SD card. SD Card must be formatted by FAT32. It consists of two or three files, i.e., BOOT.BIN, boot.scr (required for ZCU106 only), and image.ub.
Figure 2‑1 SD Card image for SATA AHCI-IP demo
2) Check board power is OFF and insert SD card to the socket on the FPGA board.
3) Set Boot mode to select configuration option = SD mode, as shown in Figure 2‑2.
a. For ZC706 and Zynq Mini-ITX board: SW11/SW7 = OFF OFF ON ON OFF
b. For ZCU106: SW6 = ON OFF OFF OFF
Figure 2‑2 Boot mode setting
4) Connect the SATA device to the board by the following steps.
a) For ZC706 and ZCU106,
i) Connect AB09-FMCRAID board to FMC-HPC/HPC0 connector on ZC706 (J37)/ZCU106 (J5).
ii) Connect SATA device to CN0 on FMCRAID board.
iii) Connect power to power connector on FMCRAID board.
Figure 2‑3 AB09-FMCRAID connection
b) For Zynq Mini ITX board
i) Connect the SATA device to the SATA connector (J12) on the board using SATA cable.
ii) Connect SATA Power cable to the device.
Figure 2‑4 SATA-II/III device connection for Zynq Mini ITX
5) For ZC706 and Zynq Mini-ITX board, set DIPSW bit 1-2 to select SATA speed mode.
Figure 2‑5 DIPSW to select SATA speed mode
DIPSW[2] |
DIPSW[1] |
Description |
1 |
1 |
Fixed-speed at SATA3 (6.0 Gbps) |
1 |
0 |
Fixed-speed at SATA2 (3.0 Gbps) |
0 |
X |
Auto-speed negotiation mode |
Table 2‑1 Description of DIPSW for SATA speed
6) Connect mini/micro USB cable from FPGA board to PC for Serial console.
7) Power on FPGA development board and power supply for SATA device. After that, FPGA starts the operation and print the message on the Serial console.
8) Open Serial monitoring software such as HyperTerminal. Terminal settings: Baud Rate=115,200, Data=8 bit Non-Parity, Stop=1. If Serial console is opened too late, the user may not see any boot messages.
9) After finishing the initialization process, check LED0 and LED1 on FPGA board. They must be ON, as shown in Figure 2‑6. The LED description is described as follows.
Figure 2‑6 LED status after finishing system initialization by SATA-3 speed
LED |
ON |
OFF |
0 |
OK |
150 MHz of SATA clock on FMCRAID board cannot lock. Please check 150 MHz clock source on FMCRAID board. |
1 |
OK |
SATA-IP cannot detect SATA device. Please check SATA device and the connection. |
2 |
SATA-III |
SATA-II |
3 |
SATA AHCI-IP in processing |
SATA AHCI-IP in idle |
Table 2‑2 LED Status of AHCI reference design
10) On PC serial console, please wait PetaLinux boot-up until login required, as shown in Figure 2‑7.
Figure 2‑7 Linux Bootup
1) User login on the demo.
Login : root
Password : root
After login, system is ready to receive user command.
Figure 3‑1 Linux Login on ZC706
2) To run SATA AHCI-IP demo, two modules are required to insert, i.e, libahci.ko (common AHCI SATA low-level routines) and dg_ahciDemo.ko (AHCI SATA platform driver). Both are stored in /home/root/driver directory. To insert module, use following command.
>> insmod /home/root/driver/libahci.ko skip_cpu_sync=1
>> insmod /home/root/driver/dg_ahciDemo.ko
3) After insert modules, disk information is displayed, as shown in Figure 3‑2. After that, SATA device is ready to use.
Figure 3‑2 Insert module to Linux kernel on ZC706
1) User login on the demo.
Login : petalinux
Password : petalinux
After login, system is ready to receive user command.
Figure 3‑3 Linux Login on ZCU106
2) To run SATA AHCI-IP demo, AHCI SATA platform driver (dgahci) must be added by using following command.
>> sudo modprobe dgahci
After adding the module, the disk information is displayed, as shown in Figure 3‑4. After that, SATA device is ready to use.
Figure 3‑4 Add module to Linux kernel on ZCU106
To create new disk partition, run following step, as shown in Figure 4‑1.
>> fdisk /dev/sda
Call the tool to manage disk partition.
>> n
Create new partition.
Select the option following the recommended value in the tool.
>> w
Write table to the disk.
After that, one partition named sda1 is created in the disk.
Figure 4‑1 fdisk command
Note: User can type m to show all fdisk options.
To format the disk, user needs to select file system type such as FAT, EXT4. This example shows only the command to format to EXT4 by using following command.
>> mkfs.ext4 /dev/sda1
Figure 4‑2 Format disk
Before running any application to access the disk by file system such as Bonnie++, disk must be mounted firstly by following command.
>> mount /dev/sda1 /media/hdd
Figure 4‑3 Mount disk
This topic shows the example to run the test for checking the performance. Two test applications are used, i.e., diskTestApp and Bonnie++. diskTestApp is the test application developed by Design Gateway to check write/read performance in both raw data format and file system.
Figure 5‑1 diskTestApp usage
As shown in Figure 5‑1, diskTestApp can run in two data formats, i.e., raw data or file system.
Warning: If running raw data test, file system in that disk partition will be lost.
a) For ZC706 and Zynq Mini-ITX board:
b) For ZCU106:
1) Disk selection to select the disk to test performance.
2) Operation type: 0-Read disk test, 1-Write disk test.
3) Test pattern:
0: Write by dummy data or read without verification
1: Write or verify by 32-bit increment pattern
2: Write or verify by 32-bit decrement pattern
4) Disk offset: Disk start address in sector unit to write/read data. 0x prefix is added as a prefix for hex unit input while default value without prefix is decimal unit.
5) Operation length: Transfer length in sector unit to write/read data. 0x prefix is added as a prefix for hex unit input while default value without prefix is decimal unit.
Figure 5‑2 Write performance in raw data mode by dummy data
Figure 5‑3 Write performance in raw data mode by 32-bit increment data
Figure 5‑4 Read performance in raw data mode without data verification
Figure 5‑5 Read performance in raw data mode and verify by 32-bit increment data
a) For ZC706 and Zynq Mini-ITX board:
b) For ZCU106:
1) File name input: File name to run the test
2) Operation type: 0-Read file test, 1-Write file test
3) Test pattern:
0: Write by dummy data or read without verification
1: Write or verify by 32-bit increment pattern
2: Write or verify by 32-bit decrement pattern
4) File number: Total number of files to run write/read file test
5) File size: Size of each file in sector unit to run write/read file test
Similar to raw data mode, when write test by dummy pattern or read test without data verification, the performance is better than using increment/decrement pattern, as shown in Figure 5‑6 - Figure 5‑9.
Figure 5‑6 Write file performance by dummy data
Figure 5‑7 Write file performance by 32-bit increment data
Figure 5‑8 Read file performance without data verification
Figure 5‑9 Read file performance and verify by 32-bit increment data
This topic shows how to test disk performance by using Bonnie++ software. The brief option of Bonnie++ software is belows.
More details about Bonnie++ user manual can be found from http://linux.die.net/man/8/bonnie++.
The example command to run Bonnie++ is shown as follows.
a) For ZC706 and Zynq Mini-ITX board:
>> ./benchmark/bonnie++ -d /media/hdd/ -s 2g -n 0 -m test -f -u root
b) For ZCU106:
>> sudo bonnie++ -d /media/hdd/ -s 8g -n 0 -m test -f -u root
Figure 5‑10 Test performance from Bonnie++ benchmark
Revision |
Date |
Description |
1.3 |
9-Nov-22 |
Support ZCU106 |
1.2 |
9-Nov-16 |
Zynq Mini-ITX 7Z100 |
1.1 |
16-Jul-15 |
Add new test application |
1.0 |
10-Nov-14 |
Initial version release |