- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I have the dsp development kit, cyclone iii edition (http://www.altera.com/products/devkits/altera/kit-cyc3-dsp.html). How can I use the Ethernet? In my altera > 80 > ip Directory I have triple_speed_ethernet. Will that work with this board? Or will I need additional IP-Cores? Will they also be shipped with my dev. kit? And are there IP-Cores for USB-Communication? Kind regards, Stefan__Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes you can use triple_speed_ethernet from your quartus installation directory. It will shipped wit open core pulse feature enable so that without license you will able generate timelimited sof file.
There is no any core require to communicate with PC. For USB IP Core, there is in built IP core shipped with Quartus software desiged from SLS. (altera -> 80 -> ip -> SLS). Regards, Hardik- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for your response!
But what about the avalon stream interface? Should I use this, too? And is there any possibility to make that Ethernet stuff a little bit more simple?- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes you need to use that interface to send your Ethernet packets. It is rather simple to use.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- Yes you need to use that interface to send your Ethernet packets. It is rather simple to use. --- Quote End --- But it is only for unidirectional communication: --- Quote Start --- You can use Avalon Streaming (Avalon-ST) interfaces for components that drive high bandwidth, low latency, unidirectional data. --- Quote End --- (Source: http://www.altera.com/literature/manual/mnl_avalon_spec.pdf) Is there also something for bidirectional data?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
No there isn't. The Triple Speed Ethernet uses two Avalon streams: a source for received packets and a sink for packets to transmit.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Where can I get this avalon ethernet core?
At opencores.org I find some Ethernet Projects, but which of them is the right one...? And is it for GigaBit Ethernet? Maybe I should ask in another way: Which is the best possibility to communicate from Cyclone III Board to PC via Ethernet?- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This is the Altera Triple Speed Ethernet, available in SOPC builder, or seperately from the MegaWizard in Quartus. But I thought you found it, according to your first post.
I don't know what you mean by "best", it depends on your needs and resources. The easiest way would be to use a Nios CPU and an operating system with a TCP/IP stack. Without the Nios you'll need to code at least the ARP and UDP/IP protocols in hardware.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- The easiest way would be to use a Nios CPU and an operating system with a TCP/IP stack. --- Quote End --- OK, I understand. So I have a question about nios now: As I have read, the NIOS II is an embedded soft processor on the Board. Is it possible to write a program in C for the NIOS and use that NIOS program as a core/entity in my Quartus Block Diagram/Schematic File? To get a fast speed I want to use mainly VHDL. But if Ethernet is that difficult with VHDL, I could maybe use the NIOS. I have attached two Images so you can see what I am doing.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can use C-2-H feature for converting your Nios C code into hardware. Using this all your c code convert into hardware block by altera tools and surly you will get the speed. But condition is that your c code is without any altera API ( like IORD, IOWR etc... ).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'd look at the udp offload (http://www.nioswiki.com/exampledesigns/nios2udpoffloadexample) example on the Wiki. That should give you the performance you desire.
- slacker- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for your responses.
--- Quote Start --- I'd look at the udp offload (http://www.nioswiki.com/exampledesigns/nios2udpoffloadexample) example on the Wiki. That should give you the performance you desire. --- Quote End --- Hopefully it will work with Quartus II 8.0, too... I will try both but I can't do this by now because my development kit / board is not yet delivered.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- You can use C-2-H feature for converting your Nios C code into hardware. Using this all your c code convert into hardware block by altera tools and surly you will get the speed. But condition is that your c code is without any altera API ( like IORD, IOWR etc... ). --- Quote End --- "The C2H Compiler improves the performance of Nios II programs by implementing specific C functions as hardware accelerators. the c2h compiler is not designed to create arbitrary hardware systems from c code. Rather, the C2H Compiler is a tool for generating a hardware accelerator module, functionally identical to the original C function, that offloads and enhances the performance of the Nios II processor." "The C2H Compiler is not designed to build all types of FPGA systems. It is designed specifically to augment the performance of programs that run on the Nios II processor; it does not replace the processor." (source: http://www.altera.com/literature/ug/ug_nios2_c2h_compiler.pdf) -> So it is not exactly what I am looking for. But OK, finally there are two possibilities and both of them have some disadvantages:
- I could use TripleSpeedEthernet with avalon opencores 10/100 ethernet mac (http://www.niosforum.com/pages/project_details.php?p_id=115&t_id=18) and code at least the ARP and UDP/IP protocols in hardware.
- An alternative would be to use the NIOS processor, but the NIOS processor is slower than a FPGA. With the C2H Compiler I can improve the performance of a NIOS C-program, but I don't want a NIOS C-program. I want to use only the FPGA without NIOS.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The Nios is the easiest way if you don't want to spend too much time on the project.
If you need performance, the offload example given by slaker is a good way to go: you use a CPU for all the protocols that are better handled in software (ARP, TCP...) and use hardware only for specific high-speed UDP ports.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- The Nios is the easiest way if you don't want to spend too much time on the project. --- Quote End --- On the one hand, I got several months to get it working but on the other hand I am still a beginner... I got another question: --- Quote Start --- Also included is a complete MAC driver to be used in conjunction with Altera's implementation of the InterNiche TCP/IP Stack. The driver and MAC have been tested with both the UCOSII and Superloop implementations of the stack. you should be able to drop it into your system and be able to run altera's simplesocket server example without problems. You may need to do a little work to support your PHY (explained in the enclosed MSWORD document). --- Quote End --- I downloaded this and put it in Quartus but I couldn't understand how to use this, even not when reading the included Guide (the DOC-File). But if it says that I should be able to run the SimpleSocket Server example, so it is not true that I need to code ARP/TCP/... by myself, because I think that this InterNiche TCP/IP Stack is doing this for me. Where can I read how to use the avalon opencores 10/100 ethernet mac and who can give me an example design with it and Cyclone III Board?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, if you use the Interniche stack all the protocols will be handled automatically and you can just use the standard socket API.
As for the example design, I don't think they made any for the DSP kit that includes the Ethernet interface. You can have a look at the nios ii 3c120 design example (http://www.nioswiki.com/exampledesigns/niosii3c120designexample) on the Nios Wiki. For the software side you can create a Simple Sockets Server project directly from the IDE.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
OK, so let me resume what I have understood until now (please correct me if I am wrong):
If we look in wikipedia in the article ethernet (http://en.wikipedia.org/wiki/ethernet) we can see how the different layers are called:- Application Layer
- Transport Layer
- Internet Layer
- Link Layer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When you are communicating with the PC, you are sending IP packets, either TCP or UDP. Those protocols are in the Network and Transport layers.
To transmit IP packets from one system to another, you need a link that is on the Physical layer. Ethernet is the most popular today. To implement an Ethernet link, you need 3 parts:- the PHY chip, that contains the analog front end. It is usually outside of the FPGA on the PCB.
- the MAC, that implements the protocol. It can be either outside the FPGA or inside, as an IP. On the 3C120 kit you need to have it in the FPGA
- the driver, that takes an IP packet and adds the Ethernet header, to build an Ethernet frame ready for the MAC to transmit, or in the other direction that decodes an incoming frame to recover the IP packet.
- Triple Speed Ethernet, provided by Altera
- Avalon Opencores Ethernet MAC, opensource
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for your response, that helped a lot!
--- Quote Start --- If you choose the hardware way, remember that you need to fill in the complete packet headers, including Ethernet, IP and UPD. --- Quote End --- OK. I am sorry if I am changing the subject/topic so abruptly, but my next question is: Do you think it would be a more simple and faster solution to use USB instead for communicating with the PC? --- Quote Start --- The downsides to USB are that it has limited connectivity (length, point-to-point) and you have to write everything pretty much yourself. You don't get to take advantage of the existing software and hardware that are built around TCP/IP. Ethernet is nice because you don't have to write any of the low-level stuff. --- Quote End --- So here we can compare now: What is more difficult: Generating the Ethernet frames in hardware (and fill in all these headers) or using USB and writing everything pretty much myself?- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
To generate the Ethernet frames in hardware, you need to know the PC's MAC address (that is usually found from it's IP using the ARP protocol) and compute the IP and UDP checksums.
For the USB communication, the USB part of the board isn't documented, and it doesn't seem easy. There is another thread on that subject in this forum. An alternative would be to use the embedded USB blaster in JTAG mode, and use the system console tools on the PC to directly access the Nios' memory and read the data in there. Unfortunately I'm not sure the performance will be very high...- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- ...directly access the nios' memory --- Quote End --- I think the size of the Nios' memory is about 4 MBit. So I guess it's not the same as the ddr2-sdram on the Board... For my project, I think I am going to use Ethernet (with NIOS). My VHDL-Hardware will fill the DDR2-SDRAM with Data (received from ADC). Then the NIOS should read the DDR2-SDRAM and send the Data via Ethernet to the PC. I will take care of the speed of Ethernet later, at first I am glad if it works at all... In this case, my hardware and software are independent in a way. Could there be problems when the FPGA and the NIOS both access the DDR2-SDRAM? Thank you, Daixiwen! :)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page