FAT32-IP for SATA Demo Instruction

Rev1.1  6-Jul-23

 

1     Environment Setup. 2

2     Demo setup. 4

3     Test Menu.. 8

3.1     Format Disk. 8

3.2     Write File. 9

3.3     Read File. 14

3.4     Change File Size. 17

4     Revision History. 19

 

 

 

This document describes the instruction to run FAT32-IP for SATA demo on FPGA development board by using AB09-FMCRAID board. The demo is designed to write and verify data with SATA-II or SATA-III device. User controls test operation through Serial console.

 

1       Environment Setup

 

To run the demo on FPGA development board, please prepare following environment.

1)    FPGA Development board: KC705/ZC706

2)    PC installing Xilinx programmer software (Vivado) and Serial console software such as HyperTerminal

3)    AB09-FMCRAID board provided by Design Gateway

4)    SATA-II or SATA-III device connecting to AB09 board

5)    Xilinx Power adapter for FPGA board and ATX power supply for SATA device

6)    micro USB cable for programming FPGA, connecting between FPGA board and PC

7)    mini USB cable for Serial console, connecting between FPGA board and PC

 

 

Figure 11 FAT32-IP for SATA demo environment setup on KC705

Figure 12 FAT32-IP for SATA demo environment setup on ZC706


 

2       Demo setup

 

1)    Power off system.

2)    Set up board option for ZC706 board only,

                       i.        Set SW11=”00000” to configure PS from JTAG, as shown in Figure 2‑1.

                      ii.        Set SW4=”01” to connect JTAG with USB-to-JTAG interface, as shown in Figure 2‑2.

Figure 21 SW11 setting to configure PS from JTAG on ZC706 board

 

Figure 22 SW4 setting to use USB-to-JTAG on ZC706 board

 

3)    Connect the SATA-II/III device to the board by the following steps.

                        i.        Connect AB09-FMCRAID board to FMC-HPC connector on Xilinx development board.

                      ii.        Connect SATA-II/III device to CN0 on FMCRAID board.

                     iii.        Connect ATX power to power connector on FMCRAID board.

The connection on AB09 is shown in Figure 2‑3.

 

Figure 23 AB09-FMCRAID connection


 

4)    Connect micro USB cable between FPGA board and PC for JTAG programming, and connect mini USB cable between FPGA board and PC for Serial console.

 

Figure 24 USB cable connection

 

5)    Power on FPGA board and power supply for SATA device.

6)    Open Serial console such as TeraTerm, HyperTerminal. Set Baud rate=115,200 Data=8 bit Non-Parity Stop=1.

7)    Download bit file or bat file to configure FPGA and firmware.

a)    For KC705 board, use Vivado tool to download configuration file which includes CPU firmware, as shown in Figure 2‑5.

 

Figure 25 Download configuration file by Vivado tool for KC705

b)    For ZC706 board, open Vivado TCL shell. Change current directory to download. Next, run FAT32SataTest_ZC706.bat as shown in Figure 2‑6.

 

Figure 26 Command script for download demo file to ZC706 by Vivado TCL Shell

8)    Check LED status on FPGA board. The description of LED is as follows.

GPIO LED

ON

OFF

0

Normal operation

System is in reset condition

1/R

System is busy

Idle status

2/C

IP Error is detected

Normal operation

3/L

Data verification fail

Normal operation

Table 1 LED Definition

 

Figure 27 4-bit LED Status for user output

 

9)    After programming completely, LED[0] and LED[1] are ON to show that FAT32-IP is in initialization process. LED[1] changes to OFF after FAT32-IP completes initialization process and system is ready to receive command from user. Finally, file size setting menu is displayed.

Figure 28 LED status after program configuration file and FAT32-IP initialization complete


 

10) In file size setting menu

a)    Input ‘y’ or ‘Y’ to set file size. Seven file sizes could be set in the submenu.

b)    If user input other values, default value will be used (32 MB).

After that, boot menu is displayed on the console, as shown in Figure 2‑9 and Figure 2‑10   

 

Figure 29 Main menu when confirm to set file size

 

Figure 210 Main menu when skip to set file size

 


 

3       Test Menu

 

3.1      Format Disk

 

Select ‘0’ to send Format disk command to FAT32-IP. When operation is completed, the system shows current operation file size and maximum file, as shown in Figure 3‑1.

Figure 31 Result from Format Disk menu

 

It is recommended to run this menu when one of following conditions is found.

1)  The disk is formatted by other system which is not FAT32-IP.

2)  The disk is not formatted by FAT32-IP.

3)  User needs to change file size value in the test.

4)  User needs to delete file in the disk.

 


 

3.2      Write File

 

Select ‘1’ to send Write file command to FAT32-IP. After that, users are asked to set created time of file. Users can input ‘y’ or ‘Y’ to change created time or input others to use default created time.

Note: Default created time after system boot up is 22 Sep 2017, 15:31:18. When user sets new created time in Write file menu, the value is used to be created time of current Write file operation. The default created time is updated by the latest created time.

 

Figure 32 Result from Write File menu when changing created time

 

Figure 3‑2 shows the example when running Write File menu with setting created time of file. There are six values to set, i.e.

a)  Date – Input created date of file as decimal unit. Valid range is 1 – 31.

b)  Month – Input created month of file as decimal unit. Valid range is 1 – 12.

c)  Year – Input created year of file as decimal unit. Valid range is 1980 – 2107.

d)  Hour – Input created hour of file as decimal unit. Valid range is 0 – 23.

e)  Minute – Input created minute of file as decimal unit. Valid range is 0 – 59.

f)   Second – Input created x2 second of file as decimal unit. Valid range is 0 – 29. The created second is equal to input value x 2.

If the input is invalid, the parameter will not change and default value will be used. Only parameter that valid is changed. Finally the new created time is displayed on the console.

 


 

After setting created time process is done, three parameters are required to write file, i.e.

1)  Start file No – Input file name of the first file as a number. The input is decimal unit when input only digit number. User can add “0x” to be prefix when input is hexadecimal unit.

2)  NUM of file – Input total number of file to transfer. The first file name is FILE<Start file No>.BIN and the last file name is FILE<Start file No + NUM of file - 1>.BIN. The input is decimal unit when input only digit number. User can add “0x” to be prefix when input is hexadecimal unit.

If “Start file No” and “NUM of file” are valid, total data size (calculated from File size x NUM of file) will be displayed on the console.

3)  Test patternSelect pattern of test data in written file. Five patterns can be set, i.e. 32-bit increment, 32-bit decrement, all 0, all 1, and 32-bit LFSR counter.

 

If all inputs are valid, the operation will be started. During writing file, current transfer size is displayed on the console to show that system still be alive every second. Finally, test performance, total size, and total time usage are displayed on the console as test result.

 

Figure 3‑3 shows the example to Write File without setting created date. In this example, default created time is updated by the value in previous Write File test. It is recommended to input “Start file No” value by the next value which continues from previous test. Previous test in Figure 3‑2 writes FILE0000.BIN – FILE0164.BIN, so “Start file No” should be 0x165 (0x164 + 1).

 

Figure 33 Result from Write File menu when changing created time


 

After completing Write File command, user can plug the disk to PC which supports FAT32 File format. On PC, the new disk “DG_FAT32” is detected. Inside the disk, FILE0000.BIN – FILE<Last file No>.BIN are stored. Also, File size and modified date must be matched to the value set in Write File test. Four numbers in File name is file number in hexadecimal unit.

 

Note: When connecting disk to PC, please do not write or modify a file in the disk. If file in disk has some modification, disk must be formatted by FAT32-IP.

 

Figure 34 Example test files written by Write File command


 

Figure 35 Test data in sector#0 - #1 of FILE0000.BIN by increment/LFSR pattern

 

Figure 3‑5 shows the example of the data in FILE0000.BIN when writing data by increment (left window) and LFSR pattern (right window). 64-bit header is inserted every 512-byte test data. The header is unique value in one disk. The first 32-bit header is calculated by (file name x file size) + offset in the file. The remaining 32-bit data is 0. The offset value is started from 0 and increased by 1 every 512-byte data. The remaining data of one sector is test data which the pattern is defined from user.


 

Figure 3‑6Figure 3‑8 show error messages when user input is invalid. “Invalid input” message is displayed on the console, and then returns to main menu to receive new command.

 

Figure 36 Invalid Start file no. input

 

Figure 37 Invalid Num of file input

 

Figure 38 Invalid Test pattern input


 

3.3      Read File

 

Select ‘2’ to send Read file command to FAT32-IP. Similar to Write File menu, three parameters are required to read file, i.e.

1)  Start file No – Input a number of the first read file. The input is decimal unit when input only digit number. User can add “0x” to be prefix when input is hexadecimal unit.

2)  NUM of file – Input total number of file to transfer. The first file name is FILE<Start file No>.BIN and the last file name is FILE<Start file No + NUM of file - 1>.BIN. The input is decimal unit when input only digit number. User can add “0x” to be prefix when input is hexadecimal unit.

If “Start file No” and “NUM of file” are valid, total data size (calculated from File size x NUM of file) will be displayed on the console.

3)  Select pattern – Select test pattern to verify data in the file. Test pattern must be matched with the test pattern using in Write File menu. Five patterns can be set, i.e. 32-bit increment, 32-bit decrement, all 0, all 1, and 32-bit LFSR counter.

 

Figure 39 Result and input from Read File menu with successful verification

 

Similar to Write File menu, if all inputs are valid, the operation will be started. During reading file, current transfer size is displayed on the console to show that system still be alive every second. Finally, test performance, total size, and total time usage are displayed on the console as test result. “Invalid input” will be displayed if some inputs are out-of-range.

 

Figure 3‑10 and Figure 3‑11 show the error message when data verification is failed. “Verify fail” message is displayed with the first file name which has error, error address of a file, expected data, and read data. The operation is cancelled when user presses any keys. If Read file is completed, output performance from Read file process will be displayed.


 

Figure 310 Data verification is failed but wait until read complete


 

Figure 311 Data verification is failed and press any keys to cancel operation


 

3.4      Change File Size

 

Select ‘3’ to change file size. After selecting menu, current file size and warning message are displayed on the console. Then, user input ‘y’ or ‘Y’ to confirm to change file size or input others to cancel the operation.

 

Figure 312 Result from Change FileSize command

 

After confirming to change file size, the selecting file size menu is displayed. There are seven file sizes to select, i.e. 32 MB, 64 MB, 128 MB, 256 MB, 512 MB, 1 GB, and 2 GB. After setting new file size, updated file size and maximum number of file are displayed on the console.

 

After that, a request to format disk message is asked. User inputs ‘y’ or ‘Y’ to accept format disk operation or inputs other keys to refuse.

 

Note: Changing file size may damage file system. Therefore, user should format disk after complete file size changing menu to delete all files in the device.

 

The example to refuse changing file size by input others (not ‘y’) is shown in Figure 3‑13.

 


 

Figure 313 Cancel Change FileSize command


 

4       Revision History

 

Revision

Date

Description

1.0

4-Oct-17

Initial version release

1.1

5-Oct-18

Update firmware version and description