Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
21602 Discussions

Need help : implement Gigabit Ethernet

Altera_Forum
Honored Contributor II
4,874 Views

Hello, 

I'm new on this forum, so I hope that I'll be clear with my question. 

I'm currently working on Cyclone III FPGA Development Kit with the EP3C120F780C7N.  

For my project I have to etablish a communication between my PC and my board with the Gigabit Ethernet. I have to send to the board datas to configure a camera and then send the pixels to the PC for a display. 

My PHY device is Marvell 88E1111 so I try since two weeks to configure it with RGMII interface. 

My problem is that I don't know how to use the TripleSpeedEthernet 9.1 either with MegaWizard Plug-In Manager (how to link all the I/O) or with SOPC (where I'm a total beginner). 

Can someone help me and explain me how to use these functions or how to begin (maybe a tutorial exists with v9.1sp1) to advance in my project ? 

Thanks in advance.
0 Kudos
36 Replies
Altera_Forum
Honored Contributor II
2,360 Views

If you have the old CD with your kit, download the latest archive from this page (http://www.altera.com/products/devkits/altera/kit-cyc3.html). It includes a design example with gigabit Ethernet.

0 Kudos
Altera_Forum
Honored Contributor II
2,360 Views

Hi :)  

Kindly go to the below link and download the our latest Quartus II Subscription Edition v9.1 

 

https://www.altera.com/support/software/download/altera_design/quartus_sub/dnl-quartus_sub.jsp 

 

and After downloading the software go to the below link and download the Triple-Speed Ethernet Data Path Reference Design 

 

http://www.altera.com/support/refdesigns/ip/interface/ref-triple-speed-ethernet-data-path.html
0 Kudos
Altera_Forum
Honored Contributor II
2,360 Views

This reference design doesn't apply well to the Cyclone III kit. It uses a SGMII interface, whereas you have RGMII on the kit. It is better to download the reference design from the page I indicated, which will run straight out of the box.

0 Kudos
Altera_Forum
Honored Contributor II
2,360 Views

thanks for your respond 

i made run the program "cycloneIII_3c120_dev_niosII_standard" on my board but then how can i can communicate between the host (i think my PC) and my peripheral (i think my board)  

1) i tried a "ping" request with the cmd windows but without an IP address, i can't have a response  

2) i absolutly don't know how to use NIOS II IDE with the .c I have, maybe a tutorial on this task can help me but the only one i have is for the utilisation of LED (not very usefull in my case) 

thanks in advance
0 Kudos
Altera_Forum
Honored Contributor II
2,360 Views

Start with the Simple Sockets Server example from the IDE and compile it. The board should get an IP address from DHCP and start a server you can access with Telnet. 

You can then change the code to suit your needs.
0 Kudos
Altera_Forum
Honored Contributor II
2,360 Views

thanks for advice Daixi, 

i build the project without trouble but when i tried to run as "nios II hw", i didn't see some errors but that :  

Using cable "USB-Blaster [USB-0]", device 1, instance 0x00 

Processor is already paused 

Reading System ID at address 0x10022C90: verified 

Initializing CPU cache (if present) 

OK 

 

Downloading 0C000000 ( 0%) 

Downloading 0C010000 (20%) 

Downloading 0C020000 (40%) 

Downloading 0C030000 (61%) 

Downloading 0C040000 (81%) 

Downloaded 314KB in 5.4s (58.1KB/s) 

 

Verifying 0C000000 ( 0%) 

Verify failed between address 0xC000000 and 0xC00FFFF 

Leaving target processor paused 

"  

and nothing else happened on my board or on the console 

 

i have exactly the same with an "hello_world" project, maybe do you know what mistake i have done 

thanks in advance
0 Kudos
Altera_Forum
Honored Contributor II
2,360 Views

There could be a lot of reasons why it fails at that point. What is located at 0x0c000000 in your system? Is it the DDR ram?

0 Kudos
Altera_Forum
Honored Contributor II
2,360 Views

ty for your response daixi 

 

i recapitulate : 

1) i launch Nios II IDE 9.1 

2) with the tab run, i programm the FPGA with the .sof from the devkit 9.0.2 

3) i create my project using the SSS as the tutorials frome the kit tells me 

4) i build the project with success 

5) i do Run As > Nios II Hardware  

and the i get the message as my previous message 

 

i checked in SOPC Builder and 0xC000000 correspond with the base address of altmemddr_bridge : an "Avalon-MM Clocking Cross Bridge" as the attached picture show you
0 Kudos
Altera_Forum
Honored Contributor II
2,360 Views

I can't find anything wrong... Is there on-chip memory in your project? If yes you can try and compile a memory test application (it is one of the templates) using a reduced C library, put the .text and .bss sections in the on-chip memory, and have it test the DDR memory. 

It should tell you if there is a problem with your board.
0 Kudos
Altera_Forum
Honored Contributor II
2,360 Views

ty for all your advices daixi, it was only a problem with power now it's working 

but when i try to use telnet with "putty" fixing my <ip address> and port "30" it told me that no host is connected 

maybe "putty" consider my board should be the host but in fact it is the peripheral, have you got an idea for begin my communication ? 

ps : i'm currently trying to follow the step from http://www.altera.com/literature/tt/tt_nios2_tcpip.pdf 

to begin a communication
0 Kudos
Altera_Forum
Honored Contributor II
2,360 Views

You can try first to use a 'ping' command to send packets to your board and see if you get any reply. Check also the transmit an receive LEDs on the board to see if any packets are received or transmitted. 

I'd suggest to install Wireshark on your PC to see all the packets that go on the Ethernet interface. 

When you ping your board, you should see the following packets: 

 

Your PC -> Broadcast : ARP request 

Board -> Your PC: ARP reply 

Your PC -> Board: ICMP echo request 

Board -> Your PC: ICMP echo reply
0 Kudos
Altera_Forum
Honored Contributor II
2,360 Views

when i tried ping or telnet, Tx led doesn't blink and sometimes Rx led blinks but not necessery with the request from my pc 

i installed wireshark but couldn't see any transaction between my board and the pc 

then i tried o plug the board and my pc both, again without success 

just for you to know, i would like to do this architecture, maybe you can give some advices (and i think i'll use sdram rather than sram) 

thanks in advance
0 Kudos
Altera_Forum
Honored Contributor II
2,360 Views

You couldn't even see the ARP request on Wireshark? Then the problem must come from your PC. It could be a routing problem. Did you set up your PC IP address on the same subnet than your board?

0 Kudos
Altera_Forum
Honored Contributor II
2,360 Views

my board and my pc haven't got the same ip that't sure, 

yes both have the same subnet adresses "255.255.255.0"
0 Kudos
Altera_Forum
Honored Contributor II
2,360 Views

The IP addresses of the PC and your board, ANDed with their network masks must match. 

As an example if the network mask is 255.255.255.0, 192.168.0.1 and 192.168.0.2 are on the same subnet, but 192.168.0.1 and 192.168.1.2 aren't. 

subnet on wikipedia (http://en.wikipedia.org/wiki/subnetwork)
0 Kudos
Altera_Forum
Honored Contributor II
2,360 Views

i edit my post sorry 

so they are both on 255.255.255.0 

and i know this :  

 

board : ip 192.168.1.234 

Subnet Mask : 255.255.255.0 

Gateway : 192.168.0.1 

 

PC : IP : 192.168.1.17 

subnet mask : 255.255.255.0 

"passerelle par defaut" : 192.168.1.1 

DHCP 192.168.1.2 

DNS 192.168.1.2 

192.168.1.1 

"serveur principal wins" 192.168.1.2 

 

i saw that on the cmd window by typing "ipconfig /all" sorry for some expressions but i'm french and don't know the exact translation 

and in fact the ip adress and the subnet mask change when i plus my pc to the board and the new ip is 192.168.20.117 and the subnet mask becomes 255.255.0.0 so maybe that's the problem 

do i have to fix the same subnet on both, i mean  

PC : ip : 198.168.20.117 

subnet mask 255.255.0.0 

and for my board these for example : 

ip 192.168.20.234 

SN mask : 255.255.0.0 

thanks you
0 Kudos
Altera_Forum
Honored Contributor II
2,360 Views

It may be a good idea to disable the automatic IP addressing through DHCP on your PC and set up both IP addresses manually so that they are on the same subnet. The example you give should work.

0 Kudos
Altera_Forum
Honored Contributor II
2,360 Views

so i'm still having this problem, i set my own ip adress for the pc as follow 

192.168.1.17 

255.255.255.0 

192.168.1.1 

and for my board as follow : 

192.168.1.234 

255.255.255.0 

192.168.1.1 

i launch wireshark before perfoming everything with nios 2 ide, and i see nothing with wireshark although my two leds (Rx and Tx) twinkle 

note : in wireshark, it is written that "who has 192.168.1.234 tells 192.168.1.17" without response but when i look more in details, i can see the mac adress for the destination and the source, it is ok for the source (the mac adress of my pc) but i have only 00:00:00:00:00:00 for the destination but i know that it should be the one the console in nios 2 ide gave me so 00:07:ed:ff:3b:14 

any idea how i can proceed ? 

thanks in advance
0 Kudos
Altera_Forum
Honored Contributor II
2,360 Views

The message you have in wireshark is the ARP request. The PC doesn't know your board's mac address yet, so it is broadcasting the Ethernet packet (but the destination MAC should be ff:ff:ff:ff:ff:ff, not zeroes...) 

If you don't get any reply, it can be for two reasons: 

[list][*]the TCP/IP stack doesn't receive the ARP request 

[*]it receives it and send a reply, but this reply isn't received by the PC[/list] 

It can have multiple causes, you could start by putting signaltap probes on the MII interface, and between the MAC and SGDMAs, to see if anything is going on over there.
0 Kudos
Altera_Forum
Honored Contributor II
2,243 Views

i continue to try by changing some Ip but unsuccessful, i have a stupid question but about the wire : is it a straight or a crossover one ?

0 Kudos
Reply