Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Ethernet core implementation methodologie

Status
Not open for further replies.

jhon.c

Newbie level 6
Joined
Jun 12, 2012
Messages
12
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,381
Hi all,

Since I'm not familiar with FPGA I read almost of the topics about Ethernet core but I still confuse in some points
and your help will be helpful for me
In fact my first goal is to get a data not the implementation of the core it self, I'll not send data just receive from fpga
I want to ask some questions please :

1-a find many topics about implementation of the Ethernet core with tcp/ip, udp, with nios II , without nios II ,NicheStack TCP/IP Stack
and I'm confuse which one is more suitable for my case,the system already contains 2 niosII, on chip ram,
shared memory where stored the data so I want to add this core to receive data from shared memory .

2- a read a documentation of MYSQL and there is a C implementation of sql, I want to ask if someone succeed to connect an FPGA with a database.

Thank you very much and sorry for these basic questions.
 
Last edited:

Whether or not you use a processor to implement networking functions, you'll probably need an Ethernet MAC core (some FPGAs have MACs built-in).

Using a processor to implement high level network functions usually makes things much easier. Free code that does it is readily available, and even if you have to do it from scratch, it's generally faster to develop software in high level programming languages than HDL.

The tradeoff is that soft processors aren't usually extremely fast. If you need the highest performance possible (latency and/or throughput), you might choose to implement all or part of your networking code in HDL.

An FPGA can't be connected with a MySQL database directly - it's just a bunch of programmable logic gates. You could connect an FPGA to another computer that runs a database (using RS232, Ethernet, or something else) and then transfer queries and results back and forth. It might also be possible to implement a soft processor on your FPGA that runs Linux and MySQL (though I couldn't think of many good reasons to do that).
 
  • Like
Reactions: jhon.c

    jhon.c

    Points: 2
    Helpful Answer Positive Rating
Thank you very much joelby many things were clarified ! but I still don'i know which way I have to choose!
In my case I don't care about performance! I'm not a hardware designer and my first goal is to get the data from FPGA to be displayed in browser with GUI
so I want to follow the most easiest way.
Using the niche TCP/IP coupled with an RTOS especially the documentation is available it's ok ? :|

An FPGA can't be connected with a MySQL database directly - it's just a bunch of programmable logic gates. You could connect an FPGA to another computer that runs a database (using RS232, Ethernet, or something else) and then transfer queries and results back and forth. It might also be possible to implement a soft processor on your FPGA that runs Linux and MySQL (though I couldn't think of many good reasons to do that).

the idea to implement the mysql connection is to get and store the data automatically(shared memory=> ethernet core=> mysql=>displaying the data), that's mean I don't want to store the data in other pc and after that transfer it .
I didn't find any documentation to do it like you suggest me with a soft core and linux, and in this example you mean the db is emplemented inside the core and after that I can do a replication to another database ?
please help !
any suggestion or comment or link would be very helpful for me, I'm very new in this area.

Thanks in advance
 

If you were using Xilinx parts, I'd suggest that you read XAPP1026, which implements a simple Web server on top of Microblaze. There's also a tutorial for **broken link removed**. It doesn't look like the Altera tutorial implements a Web server, but you should be able to find some LwIP example code for doing this.

You could implement a database on an operating system running on a soft processor code, but performance won't be great. If the database is small and flat, you could store it in Flash or something. Otherwise you can use TCP and LwIP or similar to access a database server on another computer over a network.
 
  • Like
Reactions: jhon.c

    jhon.c

    Points: 2
    Helpful Answer Positive Rating
Thanks joelby !

your post it's very helpful especially the tutorial for LwIP on nios II where I find complete implementation and also I find some mysql library work with LwIP
but I don't know why in altera web site they mention that it's not recommended to use LwIP in new design !
I have another question regarding the software layer implementation I want to be sure before starting implementation

Now my system display the output in the LCD the data is stored in sahred memory (I'm using startixIII) and if I understand well
I have write a drivers to connect also the Ethernet core to this memory and after that LwIP will be responsible to send this data ?
Where I can find this driver and if it's depend on the data stored in this memory or it's depend only on the hardware part (I know it's very stupid question! )

Thank you in advance
 

I'm not sure why lwIP would be deprecated - maybe Altera are supporting some alternative IP implementation? lwIP itself is an open source project independent of Altera, so it's not going away.

I don't understand your requirements, but if the LCD works by updating a frame buffer in shared memory you could write some more Nios code that talks to the lwIP components, deals with the contents of incoming packets, and then updates the frame buffer in RAM as appropriate.
 
  • Like
Reactions: jhon.c

    jhon.c

    Points: 2
    Helpful Answer Positive Rating
Hi joelby
Yes I think altera support the nichestack IP rather than LwIP the link that you give me is from the Japanese version of altera website!
anyway thanks again ,it's not well understood for me but it's a good step from where I can start
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top