FTP Server Demo Instruction

Rev1.0 5-Jul-23

 

 

1       Environment Setup. 2

2       PC Setup. 3

2.1       Ethernet Setting. 3

2.2       Power Option Setting. 5

2.3       FileZilla Setting. 6

3       FPGA board setup. 7

4       FTP Client 14

4.1       Login FTP Server 14

4.2       Upload file. 15

4.3       Download file. 17

5       Revision History. 19

 


 

This document describes the instruction to run FTP Server demo on FPGA development board by using FileZilla version 3.45.1 as FTP client. SATA-III device is applied as the storage to store file for transferring with TestPC by using FTP protocol through 1 Gb Ethernet. To interface with SATA device and 1 Gb Ethernet, exFAT-IP for SATA and TOE1G-IP are implemented in FPGA design. User interface for setting the test parameters on FPGA and monitoring the hardware status is NiosII command shell.

 

1       Environment Setup

 

To operate FTP Server demo, please prepare following test environment.

1)    FPGA development boards (Cyclone10 GX development board)

2)    1-Gb Ethernet connection on Test PC

3)    Micro USB cable for JTAG connection connecting between FPGA development board and PC

4)    Ethernet cable (cat5e or Cat6) for network connection between FPGA development board and PC

5)    AB09-FMCRAID board provided by Design Gateway

6)    SATA-III device connecting to CN0 on AB09 board

7)    ATX power supply for AB09 board

8)    QuartusII Programmer for programming FPGA and NiosII command shell, installed on PC

9)    Test Application named FileZilla version 3.45.1

Figure 1‑1 FTP Server demo (FPGA<->PC) on Cyclone10 GX


 

2       PC Setup

 

Before running demo, please check the network setting on PC. The example to set the network is shown as follows.

 

2.1      Ethernet Setting

 

Figure 2‑1 IPv4 setting

 

1)    Open Ethernet setting option from Control Panel -> Network and Internet -> Network and Sharing Center.

2)    Click Ethernet icon which is used to connect with FPGA board.

 

Figure 2‑2 Select IP address setting menu

 

3)    Click Properties button in Ethernet Status window.

4)    Select “TCP/IPv4”.

5)    Click Properties button in Ethernet Properties window.


 

Figure 2‑3 Set IP address

 

6)    Set IP address = 192.168.11.25 and Subnet mask = 255.255.255.0. After that, click OK button to confirm IP address setting.

7)    Click Configure button in Ethernet Properties window. On Link Speed, select “1 Gbps Full Duplex” and click OK button

 

Figure 2‑4 Set link speed = 1 Gbps


 

2.2      Power Option Setting

 

Figure 2‑5 Power options

 

1)    Open Control Panel and select Power Options.

2)    Select High performance plan.


 

2.3      FileZilla Setting

 

The reference design supports only one connection for transferring data through 1 Gb Ethernet. So, FileZilla must be configured to transfer data by using one connection as shown in Figure 2‑6.

 

1)    On FileZilla application, select Edit -> Settings.

2)    In Transfers page, set “Maximum simultaneous transfer” = 1 (Default value is 2) and click “OK” button to confirm the setting.

 

Figure 2‑6 FileZilla Setting

 


 

3       FPGA board setup

 

1)    Turn off power switch and connect power supply to FPGA board.

2)    Connect micro USB cable from FPGA board to PC.

3)    Connect Ethernet cable (CAT5e or CAT6) between RJ45 on FPGA board to PC.

 

 

Figure 3‑1 Power, Ethernet, and micro USB cable connection

 

4)    Connect SATA-III device to AB09 and then connect AB09 to FPGA, as shown in Figure 3‑2.

a.    Connect AB09-FMCRAID board to FMC-HPC connector on FPGA board.

b.    Connect SATA-III device to CN0 on AB09-FMCRAID board.

c.    Connect ATX power to power connector on AB09-FMCRAID board.

Figure 3‑2 AB09-FMCRAID connection


 

5)    Open QuartusII Programmer to program FPGA through USB-1 by following step.

a.    Click “Hardware Setup…” to select USB-BlasterII[USB-1].

b.    Click “Auto Detect” and select FPGA (10CX220Y).

c.    Select 10CX device icon.

d.    Click “Change File” button, select SOF file in pop-up window, and click “open” button.

e.    Check “program”.

f.     Click “Start” button to program FPGA.

g.    Wait until Progress status is equal to 100%.

 

Figure 3‑3 FPGA Programmer


 

6)    Open NiosII command shell and type “nios2-terminal”. The message is displayed to show current status as follows

 

Figure 3‑4 Message after system boot-up

 

·         “Waiting exFAT-IP initialization” is displayed during running initialization.

·         “exFAT-IP initialization complete” is displayed when finishing initialization and IP is idle.

·         “The disk must be formatted by exFAT-IP” is displayed. User press ‘y’ to format the disk when the disk is the new disk which has never been formatted by exFAT-IP. Also, format the disk can be used to clear the data from the disk. The example to run Format command is shown in Figure 3‑5. The user needs to set file size for storing in SATA device. This file size must be matched to the file in Test PC when the user loads the new file to SATA device through FTP client. User press other keys (not ‘y’) to skip Format operation.

 

Figure 3‑5 Format the disk

 


 

·         “Current time created” is displayed to show default time. User can press ‘y’ to change time created or press other keys (not ‘y’) to use the default value. Figure 3‑5 shows the example when the system is initialized by using default time created (11-Nov-2019, 14:02). Figure 3‑6 shows the example to set time created. There are six parameters for setting created date and time for empty directory.

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.

 

Input is received as decimal unit. User can add “0x” as a prefix for hexadecimal input. When the input is invalid, the parameter is not updated and the same value is used.

After setting the new created date and time, “Date and Time changed” with the updated value are displayed on the console.

 

Figure 3‑6 Change time created


 

Note: Time created value is applied for two functions.

First, the new file which is loaded from Test PC to SATA device by using FTP client software uses this created time/date as created time/date of the file in the SATA device.

Second, when user reads the file list in SATA device through FTP client software, the created time/date of all files in the disk is equal to this set time. So, if some files in the disk is the old file, created from the previous test, the created time/date displayed on FTP client software may not be matched to the created time/date in the disk, as shown in Figure 3‑7.

Figure 3‑7 Time created comparison on real SATA device and on FTP client

 

7)    After finishing date and time setting, default TOE1GIP parameter is displayed on the console. Figure 3‑8 shows the example when the system is booted with some available files in the SATA device.

 

Figure 3‑8 Initialization without format operation and time created updating


 

Figure 3‑9 Set TOE1G-IP parameter before running demo

 

8)    Input ‘x’ to skip parameter setting and use default parameters for system initialization. Otherwise, input other keys to change parameters. Seven parameters can be changed by the user.

 

During changing parameter, user can set the invalid value such as ‘n’ to the parameter for using the same value. After finishing parameter setting, TOE1G-IP is reset and begins initialization process. More details of each parameter are described as follows.

 

·         Window Update Gap: Set threshold value to transmit window update packet. Valid value is 0x00 – 0x3F (0-63). The unit size of threshold value is 1 Kbyte. Default value is 0 (disable window update feature).

·         FPGA MAC address: Input 12-digit of hex value. Add “0x” as a prefix for hexadecimal input.

·         FPGA IP address: A set of four decimal digits is separated by “.”. The valid range of each decimal digit is 0-255.

·         FPGA port number: Valid range is 0-65535, except 21 which is control port number.

·         Target IP address: A set of four decimals like FPGA IP address. This value is IP address of Test PC.

·         Target port number: Valid range is 0-65535, except 21 which is control port number.


 

After finishing system initialization, three parameters for setting in FTP client application, i.e. Host IP, User name, and password are displayed. Now the user can open FTP client application on Test PC to connect with FTP server hardware.

 


 

4       FTP Client

 

4.1      Login FTP Server

 

To login FTP Server by FileZilla, the step is as follows.

 

1.  Input server parameters following parameter recommended on the console.

a.    Host IP        : FPGA IP, set during initialization. Default value is 192.168.11.42.

b.    Username  : dgftp

c.    Password   : admin

2.  Click “Quickconnect” button.

 

Figure 4‑1 Login FTP server

 

After finishing to set server parameter, the console shows logged in successful. Directory name shows file size set in the storage. In the example, File size is 2 GB, so directory name is F002GB. If FTP storage is not empty, file lists in the storage are displayed. The modified date and time of the file is equal to time created, set during initialization phase.

Note: FTP client reads time zone from FTP server as UTC+0 time zone, but the time displayed on FTP client is adjusted to user’s time zone. In the example, when created time in initialization is 14:02, modified time on FTP client is 21:02 (user’s time zone is UTC+7).


 

4.2      Upload file

 

To upload file to FTP Server from Test PC by using FileZilla, user must prepare the uploaded file on Test PC. The status during uploading can be monitored on FileZilla for FTP client side and NiosII command shell for FTP server side. The step for uploading file is as follows.

 

1.  Select the uploaded file in Test PC. The limitation of the uploaded file is as follows.

a.    File name is XXXXXXX.BIN (X is hex value). The value of uploaded file name must be equal or less than the next value of the latest file in FTP server storage. In Figure 4‑2, the latest file is 0000001.BIN, so, the uploaded file must be 0000002.BIN or less.

b.    File size of the uploaded file name must be equal to FTP server directory name. In the example, F002GB supports only 2 GiB (1024x1024x1024 byte) file.

Note:   (1) File size can be changed by format operation only.

(2) For the new disk, the 1st file name must be 0000000.BIN.

2.  Right-click on the selected file and select “Upload”, as shown in Figure 4‑2.

 

User can select multiple files on Test PC to upload to FTP server.

 

Figure 4‑2 Upload file


 

During uploading process, user can monitor the progress on FileZilla or NiosII command shell.

a.  Current transfer size of each file is displayed on NiosII command shell every second.

b.  After finishing uploading file, transfer speed is displayed on NiosII command shell.

c.   On Filezilla, total time and successful message are displayed as status.

d.  The new uploaded file is available on FTP server storage. In the example, 0000002.BIN is available in the storage.

Figure 4‑3 Status message during uploading file

 

e.  As shown in Figure 4‑4, when directly connecting SATA device which is FTP server storage to the PC, the new file shows modified date similar to time created of the demo.

Figure 4‑4 Uploaded File in SATA device


 

4.3      Download file

 

To download file from FTP Server to Test PC, user selects the downloaded file on FTP server through FileZilla for storing the file to the destination folder on Test PC. The step for downloading file is as follows.

 

1.  Select the downloaded file from FTP Server storage.

2.  Right-click on the selected file and select “Download”, as shown in Figure 4‑5.

 

User can select multiple files for downloading from FTP server.

 

Figure 4‑5 Download file


 

During downloading file, user can monitor the progress on FileZilla or NiosII command shell like uploading process.

a.  Current transfer size of each file is displayed on NiosII command shell every second.

b.  After finishing downloading file, transfer speed is displayed on NiosII command shell.

c.   On Filezilla, total time and successful message are displayed as status.

d.  The new downloaded file is available on Test PC. In the example, 0000002.BIN is the new file downloaded from FTP server.

 

Figure 4‑6 Downloading File

 


 

5       Revision History

 

Revision

Date

Description

1.0

7-Feb-20

Initial version release