Driving a design via TCP/IP

Oct 06, 2010 14 Replies

Hello all,



I've had an enquiry in about a project that is mostly simple enough, I'll be using an FPGA for what's required, the fly in the ointment is the client wants the thing unit via TCP/IP.



All the ethernet interface is going to be used for is driving and reading internal registers, it could very easily be done via RS-422 (which is an option) but it looks like they definitely want TCP/IP.



One approach would be to implement a NIOS core with OS and network stacks, I'd have to outsource setting this all up. This really does seem to be a lot of added complexity required both in FPGA resource and external components required to support the NIOS.



It would also require licensing the NIOS IPS-Embedded suite and an OS (or does it?) which isn't cheap.



Another approach would be to use a microcontroler with embedded TCP/IP stack and MAC and use this to drive the FPGA via an external bus, although I think an SPI bus might be sufficient.



I have designed a couple of boards with an ethernet interface but this was to an ARM device where a SW engineer had the responsibility of getting it all set up and working.



Can anyone comment on the difficulty of implementing an ethernet interface with a NIOS core, or advise on a small simple microcontroller that would make this all much simpler.



Thanks in advance,



Nial.


Depending on where you are on the build/buy curve, the little XPort gizmos are often an easy answer. From the inside of the box, looking out, it appears as a serial port. From the outside it handles UDP/IP or TCP/IP (configurable). Could be a good fit for configuration & status.

Rich Webb Norfolk, VA

Thanks Rich, I'm completely open to any solution which simply provides TCP/IP access to the unit.

That looks like an ideal solution!

Nial.

A similar device providing the equivalent of four AF_INET sockets on a chip and speaking SPI or memory-bus connection is

or a module based on it

These chips/boards are the ones I used. There are probably more recent versions.

Mel.

FreeRtos (freertos.org) + NXP LPC17xx.

Failure does not prove something is impossible, failure simply indicates you are not using the right tools... nico@nctdevpuntnl (punt=.) --------------------------------------------------------------

If it is not specified how the TCP/IP is to be used, you can design a simple request-response exchange based on simple UDP packets. It is not too tedious to implement the protocol stack up to UDP even for raw silicon. The difficult beast is TCP.

Get a controller with Ethernet and SPI, e.g. Stellaris LM3S6965. The dev board is pretty inexpensive (less than 100 USD, IIRC) and you should be able to do the required networking with it for testing.

Tauno Voipio tauno voipio (at) iki fi

Seem to be quite similar to the FreeScale MCF5223X. Are there any other TCP/IP stacks other than Internice available for the LM3S6965?

Petter

.sig removed by request.

There are any number of 32 bit single-chip controllers with enough on-chip Flash and RAM to run a TCP/IP stack and a an application. We've used plenty of NXP devices from the LPC23xx and LPC17xx families. There are also the Stellaris/TI devices LM3S9B9x. Freescale have plenty of Coldfire devices, e.g. MCF52259. Some of these have external bus interfaces if that makes interfacing the FPGA any easier.

Stephen

Stephen Pelc, stephenXXX@mpeforth.com MicroProcessor Engineering Ltd - More Real, Less Time 133 Hill Lane, Southampton SO15 5AF, England tel: +44 (0)23 8063 1441, fax: +44 (0)23 8033 9691 web: http://www.mpeforth.com - free VFX Forth downloads

Not the only place but if the RS422 option is what you feel comfortable with you could use one of these as the Ethernet interface.

Might save you some work if the network speed you require is not that fast.

******************************************************************** Paul E. Bennett............... Forth based HIDECS Consultancy Mob: +44 (0)7811-639972 Tel: +44 (0)1235-510979 Going Forth Safely ..... EBA. www.electric-boat-association.org.uk.. ********************************************************************

There are uIP and LwIP with the dev kit. I'm running my own.

Tauno Voipio

Thanks Nico but this isn't much simpler than implementing an OS & TCP/IP on a NIOS (I presume).

Nial.

Yes it is. It's way, way, way, simpler.

I've used a NIOS core. There's nothing even remotely simple about it. [And we never did get the OpenCores Ethernet MAC to work very well.]

Grant Edwards grant.b.edwards Yow! I'm thinking about at DIGITAL READ-OUT systems gmail.com and computer-generated IMAGE FORMATIONS ...

I'm OK with setting the NIOS system up, it's integrating the OS and TCP/IP stack I haven't got a clue about.

It looks like the Lantronix XPort or a Wiznet chip (if volumes are big enough) is the easiest way for me to get this done.

Thanks all for your feedback.

Nial.

IP

.

Hi Nial

I have been using Wiznet in a number of 'in production' designs for the last 4 years. Currently the W5300 or module with the same would be the best choice. I evaluated the other options but required > 50Mb/s and ability to use only UDP (harsh industial heavy welding environments along with real time data meant TCP retries would not be desirable to say the least). A few registers to set up (from the client side) and thereafter it's akin to FTDI. The Wiznet chip cost is in the same ball park as a separate PHY or MAC/ PHY in 100 to 1k volume. Can buy from Wiznet (watch out for the new VAT customs rubbish) or from their UK disty (Hero?)

Regards

DG

Thanks David, it's an industrial environment this is going into so this is useful to know.

Nial.

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required