exFAT IP for NVMe Demo Instruction

Rev2.1  9-Aug-23

1    Overview. 2

2    Test Menu. 3

2.1    Format Disk. 3

2.2    Write File. 6

2.3    Read File. 13

2.4    Shutdown Command. 15

3    Revision History. 16

 

 

1       Overview

This document describes the instruction to run exFAT-IP for NVMe demo on FPGA development board for accessing one NVMe SSD. The demo is designed to run Format disk, Write file, Read file or Shutdown command. User controls test operation via FPGA console.

 

FPGA board setup for exFAT-IP demo is the same as in NVMe-IP demo. So, the user can setup the FPGA by following “dg_nvmeip_fpgasetup” document.

https://dgway.com/products/IP/NVMe-IP/dg_nvmeip_fpgasetup_xilinx_en.pdf

 

After finishing the FPGA configuration, the initialization message is displayed. The user can choose to format the disk or not.

 

 

Figure 11 exFAT-IP initialization message

 

 

For the new disk which has never been formatted by exFAT-IP, user must enter ‘y’ to format the disk. Otherwise, user enters other keys to skip format process. After that, the system information in the disk are displayed, i.e. current file size, maximum file in the disk, maximum file per directory, and total file in the disk. Finally, the IP is ready to receive command from the user.

 

 

2       Test Menu

 

2.1      Format Disk

 

Select ‘0’ to send Format disk command to exFAT-IP.  The step to run Format command is as follows.

 

 

Figure 21 Format Disk menu when updating the created time

 

 

1)  Enter ‘y’ to confirm Format operation or other keys to cancel the operation. When Format is run, the default value of created date and time is displayed. This value is applied to be created date and time of empty directories, created by Format command.

 

2)  Enter ‘y’ to change created date and time or other keys to use the default value. There are six parameters to set created date and time for empty directories, i.e.

a)    Year           – Year of created date. Valid range is 1980 – 2107.

b)    Month        – Month of created date. Valid range is 1 – 12.

c)    Date           – Date of created date. Valid range is 1 – 31.

d)    Hour          – Hour of created time. Valid range is 0 – 23.

e)    Minute        – Minute of created time. Valid range is 0 – 59.

f)      Second      – x2 Second of created time. Valid range is 0 – 29.

 

The input is received as decimal unit. User adds “0x” to be a prefix for hexadecimal input. If the input is invalid, the parameter does not change (the same value is used). Only the input in the valid range is applied to update the parameter.

 

As shown in Figure 2‑1, year parameter is invalid, so the value does not change (2018 is applied). Month, date, hour, minute, and second are valid, so these parameters are updated to the new default value. After that, “Date and Time changed” and the new created time and date are displayed on the console.

 

 

Figure 22 Format Disk menu when using the default created time

 

 

Figure 2‑2 shows the example when running Format command without updating created time.

 

3)  Select file size of the disk which is listed on the console. After receiving file size from user, the IP starts Format operation.

 

“Format Disk complete” and the updated system information are displayed after finishing Format command.

 

Figure 2‑1 and Figure 2‑2 show the different file size but the same disk capacity. As a result, maximum file in the disk is reduced when file size is increased.

 

When file size is invalid, the operation is cancelled, as shown in Figure 2‑3.

 

Note: Default created time after system boot up is 24 Sep 2018, 17:35:00. When user sets the new created time in Format menu or Write file menu, the new value is updated to the new default value

 

 

Figure 23 Result from Format Disk menu when select invalid file size

 

 

When the disk formatted by exFAT-IP is connected to PC, DG_exFAT drive is detected with 512 empty directories (DIR000<1st directory> - DIR1FF<512th directory>). Modified date of the empty directories is equal to the created date, set in the test.

 

Note: When connecting disk to PC, please do not create, write, or modify data in the disk. If the disk has some modification, the disk must be re-formatted by exFAT-IP.

 

 

Figure 24 512 Empty directories after finishing Format Disk command

 

 

2.2      Write File

 

Select ‘1’ to send Write file command to exFAT-IP. The step to run Write file command is as follows.

 

 

Figure 25 Result from Write File menu with setting time created

 

 

1)    Similar to Format command, enter ‘y’ to change created date and time or other keys to use the default value. There are six parameters to set created date and time for the new file.

a)    Year              – Year of created date. Valid range is 1980 – 2107.

b)    Month           – Month of created date. Valid range is 1 – 12.

c)    Date              – Date of created date. Valid range is 1 – 31.

d)    Hour              – Hour of created time. Valid range is 0 – 23.

e)    Minute           – Minute of created time. Valid range is 0 – 59.

f)      Second         – x2 Second of created time. Valid range is 0 – 29.

 

The input is received as decimal unit. User adds “0x” to be a prefix for hexadecimal input. If the input is invalid, the parameter does not change (the same value is used). Only the input in the valid range is applied to update the parameter.

 

As shown in Figure 2‑5, year parameter is invalid, so the value does not change (2018 is applied). Month, date, hour, minute, and second are valid, so these parameters are updated to the new default value. After that, “Date and Time changed” and the new created time and date are displayed on the console.

 

2)    Input other keys (not ‘y’) to use the recommended start file no. The console displays the recommended value which is the next value from the latest write file.

Note: Input ‘y’ to change start file no. is allowed for replacing the old file. After running, the data in the old file is replaced by the new one.

 

3)    Input NUM of file – Input total files to transfer in this command. After finishing write file operation, Filename <Start file No>.BIN - Filename <Start file No + NUM of file - 1>.BIN are stored in the device. The input is decimal unit when input only digit number. User can add “0x” to be prefix for hexadecimal input.

 

4)    Input test patternSelect pattern of test data in the file. Five patterns can be set, i.e. 32-bit incremental, 32-bit decremental, all-0, all-1, and 32-bit LFSR counter.

 

After all inputs are valid, total data size (calculated by file size x Num of file) is displayed on the console. Next, Write file command is operated. During writing file, current transfer size is displayed on the console every second to show that system is still alive. Finally, total size, total time usage, and test speed are displayed on the console as the test result.

 

The number of files per directory is limited, so the new files may store in the different directory. After finishing Write file command, the console displays the 1st file and the last file which has just written with the directory path (calculated by <file name>/<maximum files per directory>). Finally, the console displays the last available file in the disk which may not be equal to the last file in the latest write test when the user runs the write file test for replacing the files.

 

 

Figure 26 Result from Write File by using current created time

 

 

Figure 2‑6 shows the example to Write File by using current created time. “Start file No” of this test is updated from the previous write test. The previous write test in Figure 2‑5 writes file “0000000.BIN” – “00003FF.BIN”, so the recommended “Start file No” is 0x0000400 (0x00003FF + 1). After finishing creating 1536 (0x600) file, 0x0000400.BIN – 0x00009FF.BIN are available and the last file in the disk is updated to be 0x00009FF.BIN.

 

 

Figure 27 Example test files written by Write File command

 

 

When plugging the device to PC, PC detects the files in subdirectory of DG_exFAT drive. The 1st file in the disk is 0000000.BIN (stored in DIR000). File size and modified date of each file are equal to the created date and created time, set in Write File test.

 

Note: When connecting disk to PC, please do not create, write, or modify data in the disk. If the disk has some modification, the disk must be re-formatted by exFAT-IP.

 

 

Figure 28 Test data in sector#0 - #1 of file “0000000.BIN” by increment/LFSR pattern

 

 

Test data is split into 512-byte unit. For incremental, decremental, or LFSR pattern, each 512-byte data has the different 64-bit header which consists of 48-bit address (calculated by <file name x file size> + offset in the file) and 16-bit zero value. 48-bit address is the unique value for each 512-byte data. The unique header is not included when running all-0 or all-1 pattern

 

The data after 64-bit header is the test pattern, selected by user. The example data in file 0000000.BIN” when writing data by incremental pattern is in the left window of Figure 2‑8. The right window of Figure 2‑8 shows the example when test pattern is LFSR pattern. The header (byte#0-byte#7) does not depend on test pattern (incremental, decremental, and LFSR). After that, the test data of test pattern is filled.

 

 

Figure 29 Set new start file no.

 

 

Figure 2‑9 shows the example of the overwritten case by setting Start file No. and NUM of file to be less than the default value. The last file in the disk is 0x00009FF, but the new command writes 0x0000700.BIN – 0x00008FF.BIN by using decremental pattern which is different from Figure 2‑6 (0x0000400.BIN – 0x00009FF.BIN are created by using incremental pattern).

 

After finishing the operation, the data in 0x0000700.BIN – 0x00008FF.BIN is decremental pattern. Because the last file in the new command (0x00008FF.BIN) is less than the last file in the device (0x00009FF.BIN), the last file on the console is not updated. Otherwise, the last file is updated by the last file in this write test.

 

Figure 2‑10 shows the example of error messages when the input is out of the recommended range for each parameter. “Invalid input” message is displayed on the console and then returns to main menu.

 

 

Figure 210 Error message from the invalid input

 

 

2.3      Read File

 

Select ‘2’ to send Read file command to exFAT-IP. The step to run Read File command is as follows.

 

 

Figure 211 Read File menu when verification is successful

 

 

1)  Input Start file No – Input the 1st file name to read. The input is decimal unit when input only digit number. User can add “0x” to be prefix for hexadecimal input. The maximum value is equal to <total file in the disk – 1>.

 

2)  Input NUM of file – Input total files to transfer in this command. The input is decimal unit when input only digit number. User can add “0x” to be prefix for hexadecimal input. The maximum value is equal to <total file in the disk – Start file No. input>.

 

3)  Input test pattern – Select 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 incremental, 32-bit decremental, all-0, all-1, and 32-bit LFSR counter.

 

When “Start file No.”, “NUM of file”, and “Select pattern” are valid, total data size (calculated by file size x NUM of file) are displayed on the console and Read file command is run.

 

During reading file, current transfer size is displayed on the console every second to show that system is still alive. Finally, total size, total time usage, and test speed are displayed on the console as the test result.

 

When input is out-of-range, “Invalid input” is displayed with operation cancelled.

 

Similar to write file menu, the console shows the 1st and the last file of the latest command. Finally, the last available file in the disk is displayed. This value is not updated by Read menu and always equal to the upper range of Start File No. input.

 

Figure 2‑12 shows the example of error message when data verification is failed. “Verify fail” is displayed with the first error file name, the error address of a file, the expected data, and the read data. User can press any key(s) to cancel read operation or wait until the read process is completed.

 

After the user waits until read command completing, the output performance is displayed as a test result. The user can continue to run the system test if the error is caused from wrong test pattern input. Otherwise, the command may not complete in a good sequence. It is recommended to reset the system to start the new test operation.

 

 

Figure 212 Data verification is failed

 

 

2.4      Shutdown Command

 

Select ‘3’ to send Shutdown command to NVMe device.

 

 

Figure 213 Shutdown Command with confirmation

 

 

The confirmation message is displayed on the console. User inputs ‘y’ or ‘Y’ to confirm the operation or other keys for cancellation.

 

After finishing the operation, the console cannot receive user input. User needs to power off/on test system to start the new test operation.

 

 

3       Revision History

 

Revision

Date

Description

1.0

16-Jan-19

Initial version release

1.1

22-Mar-19

Add file size and total file information

1.2

16-May-19

Correct directory name and update overwritten feature

1.3

20-Feb-20

Support VCU118 board

1.4

20-Apr-20

Remove power adapter cable from AB18

2.0

23-Jul-20

Remove FPGA setup from the document

2.1

14-Mar-22

Correct Figure index