2
\$\begingroup\$

Is it possible to have a TCP connection with an FPGA? I need a low power device that can control relays based on Ethernet packets that are received and send back confirmation packets.

\$\endgroup\$
  • 1
    \$\begingroup\$ FPGA is a general logic device. You can do any digital logic with it. Including TCP connections. I am not talking about effort involved as you haven't asked. \$\endgroup\$ – Eugene Sh. Oct 16 '15 at 19:18
  • 1
    \$\begingroup\$ Yes, although you have to build all the state machine yourself. And they're not particularly low power. A microcontroller would be simpler. \$\endgroup\$ – pjc50 Oct 16 '15 at 19:28
  • 1
    \$\begingroup\$ Developing TCP is hard work. You will need: Ethernet Controller (incl. MDIO controller), MAC layer, ARP layer, IP layer and the TCP layer. TCP is complex because of its flow control. Can't you use UDP? It's much simpler. \$\endgroup\$ – Paebbels Oct 16 '15 at 21:35
  • 1
    \$\begingroup\$ Adding to what @Paebbles said, even a cheap AVR combined with an ethernet-to-SPI chip can do the same, and to control relays high speed is not required. Do yo really need it to be FPGA-based for some other reason? \$\endgroup\$ – fceconel Oct 16 '15 at 23:27
3
\$\begingroup\$

Yes it is possible.

For the low end, you could have a look at http://opencores.org/project,tcp_socket (800 LUTs in Spartan 6).

At the high end, see http://dx.doi.org/10.1109/FCCM.2015.12 (slides) for 10 Gbps on Virtex7.

\$\endgroup\$
  • \$\begingroup\$ Wow, the first link just made my day. I've been thinking about implementing that in an open core for a very long time, and there it is. :) \$\endgroup\$ – J A Oct 20 '15 at 1:28
2
\$\begingroup\$

Is it possible? yes

Are there times when you would want to do it? yes

It it the right soloution for the problem you describe? almost certainly not!

FPGAs are great for doing stuff that is simple and repetitive but needs to happen with very tight timings and where the market is too small to justify custom silicon but for lower speed stuff they tend to be an expensive (both in terms of hardware costs and development time) and power hungry option.

Relays are at the opposite end of the speed scale. So using a FPGA to control them seems pretty crazy. Personally for a networked relay controller I would be looking at either a microcontroller based soloution or an embedded linux based soloution depending on the dev/prod cost balance and the features required (it's much easier to add support for things like TLS or web interfaces on a linux based soloution than a microcontroller based soloution).

\$\endgroup\$
0
\$\begingroup\$

you can use lantronix Ethernet module. and there are lot of companies who makes board using these modules like this one Ethernet controlled relay so you can get these boards which have relay and Ethernet, which will make controlling relay very easy. all you need to send commands using your master hardware. these lantronix modules also come with inbuilt webpage.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.