Intel® Simics® Simulator for Intel® FPGAs: User Guide

ID 784383
Date 12/04/2023

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents TFTP Using Forwarding Port

Set up an outgoing port forwarding to forward the tftp request from the service node to the host PC.

The following capture shows how to set up the forwarding port. In this case, the port in the service node that forwards the request is the 69 (standard for TFTP service). You must define the target port and target IP (the host for outgoing forwarding port) to which the request is forwarded, which is also the 69 and (host IP address). You also define the UDP protocol, which is the one that supports the TFTP service.

HostPC | Target system
 Outgoing   69 <- 69
#Intel Simics simulator CLI 

simics> connect-real-network-port-out ethernet-link = ethernet_switch0
service-node-port = 69 target-port = 69 target-ip = -udp UDP port 69 on link -> host
ff02::1:2 UDP port 69 on link -> host
Warning: This can expose the target system on the host local network.
simics> run

In the host PC terminal, install a TFTP server, define its directory, in which you must locate the file to be transferred to the target system. The following capture shows an example of how to use the tftp command in the Linux host terminal. For this example, it is important to do the following setup in the Host PC:

  1. Locate the file to be transferred to the target system in the tftp directory.
  2. The tftp directory must be different than the current directory in which the current simulation is running.
  3. The file to be transferred must not be in the same directory in which the simulation is running.

For this example, the last two conditions are important because, as you see in the next section, the file to be transferred can be done using a TFTP server that is provided as part of the service node and may hide the functionality supplied by the forwarding port created.

In the following capture from the target system console, the tftp command executes the file transfer. In this case, the file is called host2target.txt and the service node IP along with the port 69 is used:

# Target Serial Console

root@psgdevice:~# tftp -gr host2target.txt 69
root@psgdevice:~# ls