FPGARelated.com
Forums

Implementing a communication protocol for data transfer over TCP on an FPGA

Started by Andre Renee April 3, 2007
Hi,

I am currently working on a project where I have to transmit data from a PC 
to an FPGA board via Ethernet. For that purpose I use the HTG-V4PCIe 
evaluation board, which is a Xilinx Virtex-4 PCI Express Development Board 
from HighTech Global (http://www.hitechglobal.com/boards/v4pcie.htm). It 
features the Marvell Alaska 88E1111 Gigabit-Ethernet PHY which I use in 
combination with the Virtex-4 built-in MAC interface. I implemented the 
TCP/IP stack fully in hardware in VHDL and it works. Fine! :-)

Now I have some serious problems with the data transmission and maybe 
someone could point me to the right direction.

For transmitting the data from the PC to the board (in the form of files) I 
need some sort of application protocoll layer, I guess. First I thought 
about HTTP which is in my opinion a bit overkill, because all I want to do 
is transmit files FROM the PC TO the FPGA. I may run a HTTP server on the 
FPGA's Microblaze but I have the impression that would not satisfy my need 
of just transmitting data files.
Then I thought about Telnet but I am afraid I am not familiar enough with it 
to estimate if it allows the transfer of files. Is there any simple solution 
to transmit files from a PC to the FPGA board with a plain application 
protocoll layer?

Any help is highly appreciated.

Regards      Andre 


On Apr 3, 8:34 am, "Andre Renee" <trauben...@arcor.de> wrote:
> Hi, > > I am currently working on a project where I have to transmit data from a PC > to an FPGA board via Ethernet. For that purpose I use the HTG-V4PCIe > evaluation board, which is a Xilinx Virtex-4 PCI Express Development Board > from HighTech Global (http://www.hitechglobal.com/boards/v4pcie.htm). It > features the Marvell Alaska 88E1111 Gigabit-Ethernet PHY which I use in > combination with the Virtex-4 built-in MAC interface. I implemented the > TCP/IP stack fully in hardware in VHDL and it works. Fine! :-) > > Now I have some serious problems with the data transmission and maybe > someone could point me to the right direction. > > For transmitting the data from the PC to the board (in the form of files) I > need some sort of application protocoll layer, I guess. First I thought > about HTTP which is in my opinion a bit overkill, because all I want to do > is transmit files FROM the PC TO the FPGA. I may run a HTTP server on the > FPGA's Microblaze but I have the impression that would not satisfy my need > of just transmitting data files. > Then I thought about Telnet but I am afraid I am not familiar enough with it > to estimate if it allows the transfer of files. Is there any simple solution > to transmit files from a PC to the FPGA board with a plain application > protocoll layer? > > Any help is highly appreciated. > > Regards Andre
you could try using socket, it's standard way to tranfer files over tcp/ip jet
In article <461257ca$0$6411$9b4e6d93@newsspool2.arcor-online.net>,
"Andre Renee" <traubenuss@arcor.de> writes:
|>
|> Then I thought about Telnet but I am afraid I am not familiar enough with it 
|> to estimate if it allows the transfer of files. Is there any simple solution 
|> to transmit files from a PC to the FPGA board with a plain application 
|> protocoll layer?

FTP or even TFTP.  You can do it a lot more simply, but it sounds as
if you aren't the sort of person who is happy designing a one-off
protocol.  WITH FTP, you need implement only one form of binary.


Regards,
Nick Maclaren.
"Andre Renee" <traubenuss@arcor.de> wrote in message 
news:461257ca$0$6411$9b4e6d93@newsspool2.arcor-online.net...
> I implemented the TCP/IP stack fully in hardware in VHDL and it works.
Man!
> Is there any simple solution to transmit files from a PC to the FPGA board > with a plain application protocoll layer?
Personally, I would look at GNU Netcat(http://netcat.sourceforge.net/) for very simple file transfer over TCP/UDP. You might also try TFTP (yuk). Good luck, -Ben-
Andre Renee wrote:
> Hi, > > I am currently working on a project where I have to transmit data from a PC > to an FPGA board via Ethernet. For that purpose I use the HTG-V4PCIe > evaluation board, which is a Xilinx Virtex-4 PCI Express Development Board > from HighTech Global (http://www.hitechglobal.com/boards/v4pcie.htm). It > features the Marvell Alaska 88E1111 Gigabit-Ethernet PHY which I use in > combination with the Virtex-4 built-in MAC interface. I implemented the > TCP/IP stack fully in hardware in VHDL and it works. Fine! :-) > > Now I have some serious problems with the data transmission and maybe > someone could point me to the right direction. > > For transmitting the data from the PC to the board (in the form of files) I > need some sort of application protocoll layer, I guess. First I thought > about HTTP which is in my opinion a bit overkill, because all I want to do > is transmit files FROM the PC TO the FPGA. I may run a HTTP server on the > FPGA's Microblaze but I have the impression that would not satisfy my need > of just transmitting data files. > Then I thought about Telnet but I am afraid I am not familiar enough with it > to estimate if it allows the transfer of files. Is there any simple solution > to transmit files from a PC to the FPGA board with a plain application > protocoll layer? > > Any help is highly appreciated.
The simple way is TFTP. It uses UDP as the transport layer, so even TCP is not needed. However, there's practically no security, and the protocol is a simple send-and-wait-for- ack protocol. For local links, it's simple and works. TFTP was created to boot diskless workstations, and for similar tasks it's OK. For more general file transfer, FTP is probably the correct thing, although it's much more tedious to implement than TFTP. The primary reference for TFTP is <http://www.faqs.org/rfcs/rfc1350.html>. -- Tauno Voipio tauno voipio (at) iki fi
Hi Nick,

thanks for your quick reply. The problem is: with my TCP/IP implementation I 
have only one port available. As far as I know with FTP I need at least 
two...!? 


On Apr 3, 9:12 am, n...@cus.cam.ac.uk (Nick Maclaren) wrote:
> In article <461257ca$0$6411$9b4e6...@newsspool2.arcor-online.net>,"Andre Renee" <trauben...@arcor.de> writes: > > |> > |> Then I thought about Telnet but I am afraid I am not familiar enough with it > |> to estimate if it allows the transfer of files. Is there any simple solution > |> to transmit files from a PC to the FPGA board with a plain application > |> protocoll layer? > > FTP or even TFTP. You can do it a lot more simply, but it sounds as > if you aren't the sort of person who is happy designing a one-off > protocol. WITH FTP, you need implement only one form of binary. > > Regards, > Nick Maclaren.
If you have to write on the PC side as well, simple TCP socket communication should be simple. If not, just implement a simple TFTP server with the bare minimum in the FPGA, so you can connect from any computer with "tftp" command. Regards, Zoltan
On Apr 3, 5:22 pm, "Andre Renee" <trauben...@arcor.de> wrote:
> Hi Nick, > > thanks for your quick reply. The problem is: with my TCP/IP implementation I > have only one port available. As far as I know with FTP I need at least > two...!?
Yes, FTP client, FTP server and TFTP server require at least two ports. But TFTP client could leave with one local port that communicates with two remote ports. By the way, do you really implemented full TCP transport protocol in hardware, all related RCPs including adaptive retransmission timers, window size adjustment, flow control and congestion avoidance? If you did that implementing application protocols should be a piece of cake - most of them are order of magnitude simpler than TCP. BTW, what you have against microblaze? Could save you months (years?) of work and plenty of logic cells at cost of some embedded memory.