FAT32-IP for SATA Demo Instruction

Rev1.0  6-Jul-23

 

1     Environment Requirement 2

2     Demo setup. 4

3     Test Menu.. 9

3.1     Format Disk. 9

3.2     Write File. 10

3.3     Read File. 15

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 with AB09-FMCRAID/AB12-HSMCRAID adapter board. The demo is designed to write and verify data with SATA-III device. User can control test operation through NiosII command shell.

 

1       Environment Requirement

 

To demo FAT32-IP for SATA demo on Intel board, please prepare the following hardware/software.

1)    IntelFPGA board: Intel ArriaV GX Starter board/Intel Arria10 SoC Development board

2)    PC with QuartusII programmer and NiosII command shell software

3)    AB09-FMCRAID for Arria10 SoC board or AB12-HSMCRAID for ArriaV GX Starter board

4)    SATA-III device

5)    Intel Power adapter and ATX power supply for SSD

6)    A cable for programming FPGA and NiosII command shell connecting between FPGA board and PC,

-       USB Type-B cable in case of ArriaV GX Starter board

-       micro USB cable in case of Arria10 SoC Development board

 

Figure 1‑1 FAT32-IP for SATA demo environment setup on ArriaV GX starter board


 

 

Figure 1‑2 FAT32-IP for SATA demo environment setup on Arria10 SoC development board

 


 

2       Demo setup

 

1)    Power off system.

2)    Setup board option.

a)    For ArriaV GX Starter board only, set bit1 of SW4 to OFF position.

 

Figure 2‑1 Set SW to select clock input for ArriaV GX Starter board

 

3)    Setup RAID adapter board.

i.              Connect AB09-FMCRAID/AB12-HSMCRAID to FMC#A/HSMC connector on IntelFPGA board.

ii.            Connect SATA-III device to CN0 on AB09/AB12.

iii.           Connect power to power connector on AB09/AB12

 

Figure 2‑2 AB12 connection to FPGA board


 

4)    Connect USB Type B or micro USB cable from FPGA board to PC for JTAG programming and JTAG UART.

 

Figure 2‑3 USB cable for JTAG connection

 

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

6)    For ArriaV GX Starter board only, open “Clock Control” application, select 1st tab (U4), set CLK0 frequency = 150 MHz, and click “Set New Frequency” button to program 150 MHz clock.

 

Figure 2‑4 Set clock frequency for ArriaV GX board


 

7)    Use QuartusII Programmer to program “FAT32SataTest.sof” file, as shown in Figure 2‑5.

 

Figure 2‑5 Programmed by QuartusII Programmer


 

8)    Open NiosII Command Shell and run nios2-terminal command. Boot message is displayed. User can set file size by press ‘y’ or ‘Y’. If user refuses to set file size, it will be set to default (32 MB). After that, main menu is displayed on the command shell, as shown in Figure 2‑6 and Figure 2‑7.

 

Figure 2‑6 Main menu when confirm to set file size

 

Figure 2‑7 Main menu when skip to set file size


 

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

 

Table 1 LED Definition

GPIO LED

ON

OFF

0

Normal operation

System is in reset condition

1

System is busy

Idle status

2

Error detect

Normal operation

3

Data verification fail

Normal operation

 

Figure 2‑8 4-bit LED Status for user output

 

After programming complete, LED[0] and LED[1] are ON during FAT32 initialization process. Then, LED[1] is OFF to show that FAT32 –IP for SATA completes initialization process and now system is ready to receive command from user.

 

                                                                                                            

Figure 2‑9 LED status after program configuration file and FAT32-IP initialization complete

 


 

3       Test Menu

 

3.1      Format Disk

 

Select ‘0’ to send Format disk command to the SATA device. After the operation is completed, the system shows current operation file size and maximum number of file, as shown in Figure 3‑1.

Figure 3‑1 Result from Format Disk menu

 


 

3.2      Write File

 

Select ‘1’ to send Write command to the SATA device. After that, users are asked to set created time of file. Users can input ‘y’ or ‘Y’ to confirm to change created time or input others to refuse. If user choose to refuse, the created time will be set to default (default created time is 22 Sep 2017, 15:31:18).

 

The details of created time are shown as in Figure 3‑2. Next, users can input created time of file. If input is invalid, invalid message will be displayed. Only parameter that is input with invalid value is not changed. Then, the new created time is displayed.

 

After setting created time process is done, user inputs by the following steps.

1)  Start file No – Input a number of the first written file. The input can be decimal unit or add prefix “0x” for hexadecimal unit.

2)  NUM of file – Input total transfer size in file unit. The input can be decimal unit or add prefix “0x” for hexadecimal unit.

3)  Select pattern – Select pattern of test data for writing to device. Five types can be selected, e.g. 32-bit increment, 32-bit decrement, all 0, all 1, and 32-bit LFSR counter.

 

Figure 3‑2 Result from Write File menu when changing created time is confirmed


 

Figure 3‑3 Result from Write File menu when changing created time is refused

 

 

As shown in Figure 3‑2 and Figure 3‑3, if all inputs are valid, the operation will be started. Total data size is displayed first. Then, current transfer size is displayed out to the command shell every second during writing operation to show that system still operates. When operation is done, test performance (data written size, time usage, and transfer speed) is displayed on the command shell.


 

 

Figure 3‑4 Example test files that written by Write File command

 

Test data is written to the SATA device as a file with constant file size. The File is named FILExxxx.BIN, when xxxx is a file number in hexadecimal unit, as shown in Figure 3‑4.


 

Figure 3‑5 Example Test data in sector#0 - #1 by increment/LFSR pattern

 

Data in the test file inserts 64-bit header every 512-byte. The header is unique value in one SATA device. The first 32-bit header is calculated by (file name x file size) + sector offset in the file. The remaining 32-bit data is 0. After that, the test pattern is filled following user selection such as 32-bit increment pattern (left window of Figure 3‑5) and 32-bit LFSR pattern (right window of Figure 3‑5).


 

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

 

Figure 3‑6 Invalid start file number input

 

Figure 3‑7 Invalid file length input

 

Figure 3‑8 Invalid pattern input


 

3.3      Read File

 

Select ‘2’ to read file to the SATA device. Three inputs are required for this menu.

1)  Start file No – Input a number of the first read file. The input can be decimal unit or add prefix “0x” for hexadecimal unit.

2)  NUM of file – Input total transfer size in file unit. The input can be decimal unit or add prefix “0x” for hexadecimal unit.

Select pattern – Select pattern to verify data from device. Test pattern must be matched with written data. Five types can be selected, e.g. 32-bit increment, 32-bit decrement, all 0, all 1, and 32-bit LFSR counter

 

Figure 3‑9 Result and input from Read File menu with successful verification

 

Similar to write test, if all inputs are valid, the operation will be started. Total data size is displayed first. Then, current transfer size is displayed out to the console every second during reading operation to show that system still operates. Final stage, test performance is displayed when the transfer is done. “Invalid input” will be displayed if any inputs are invalid.

 

Figure 3‑10 and Figure 3‑11 show the error message when data verification is failed. “Verify fail” message is displayed with name of the first file that error occurs, error address, expected data, and read data. User can press some keys to cancel the operation or wait until all read process complete.

 

 

Figure 3‑10 Data verification is failed and user does not cancel operation

 

Figure 3‑11 Data verification is failed and user cancels 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 can input ‘y’ or ‘Y’ to confirm to change file size or input others to cancel the operation.

 

After confirming to change file size, the selecting file size menu is displayed. User can select the new file size here. When changing file size is completed, the system updates current operating file size and maximum file number.

 

When file size is changed, a request to format disk message is asked. Then, user can input ‘y’ or ‘Y’ to accept format disk operation or input others to refuse.

 

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

 

Figure 3‑12 Result from Change FileSize command

 

 

 

Figure 3‑13 Cancel Change FileSize command


 

4       Revision History

 

Revision

Date

Description

1.0

4-Oct-17

Initial version release