Forum Discussion
SimpleSocketServer (EP3C120 DB)
I have been working with the CycloneIII Development board (EP3C120) using QuartusII 9.1sp2 with the project daixiwen (http://alteraforums.com/forum/member.php?u=4443) linked at:
http://alteraforums.com/forum/showthread.php?p=90831#post90831 I created the NIOS template project Simple Socket Server and am having problems with connecting to the server through telnet. The only modification required to compile was Enabling the NicheStack component in System Library Settings. I connect the ethernet cable from the development board to my computer and run the NIOS. once running the console displays:Copyright 1996-2008 by InterNiche Technologies. All rights reserved.
prep_tse_mac 0
Your Ethernet MAC address is 00:07:ed:ff:c2:95
prepped 1 interface, initializing...
INFO : TSE MAC 0 found at address 0x10022800
INFO : PHY Marvell 88E1111 found at PHY address 0x12 of MAC Group
INFO : PHY - Automatically mapped to tse_mac_device
INFO : PHY - Restart Auto-Negotiation, checking PHY link...
INFO : PHY - Auto-Negotiation PASSED
INFO : PHY - Checking link...
INFO : PHY - Link established
INFO : PHY - Speed = 1000, Duplex = Full
OK, x=0, CMD_CONFIG=0x00000000
MAC post-initialization: CMD_CONFIG=0x0400020b
RX descriptor chain desc (1 depth) created
mctest init called
IP address of et1 : 192.168.1.234
Created "Inet main" task (Prio: 2)
Created "clock tick" task (Prio: 3)this all looks perfect! now i use telnet on my PC to connect to the development board at 192.168.1.234 and the console displays this: (telnet on PC times out and closes) dtrap - needs breakpoint
panic: pktdemux: corrupt pkt
dtrap - needs breakpoint
ip_exit: calling func 0xc01235c
netclose: closing iface Altera TSE MAC ethernet
ip_exit: calling func 0xc019808any suggestions?17 Replies
- Altera_Forum
Honored Contributor
more preliminary troubleshooting. Using wireshark, i can verify that my PC is querying for 192.168.1.234. I can also see the "Rx LED" light up on the development board each time my PC sends a ping request. this leads me to believe that there might be some issue with the NicheStack accessing the SGDMA module
- Altera_Forum
Honored Contributor
The first thing you should see in Wireshark is an ARP request. Something like "who is 192.168.1.234? Tell x.x.x.x". Do you get an ARP reply from the board giving its mac address?
Did you do any modification or recompilation to the Quartus design, or are you using the .sof file provided with the project by Altera? - Altera_Forum
Honored Contributor
I did see the arp request but no response from the development board. I did compile the FPGA project. I will look for and try the pre-compiled sof file on Monday.
- Altera_Forum
Honored Contributor
Do you have the license for the TSE? If not, be sure not to close the Opencores evaluation window. It would make the TSE stop working.
- Altera_Forum
Honored Contributor
I am seeing the same behavior on the seme dev kit running the same app under 9.1_sp1... I have a license file that says the tse nios, etc is present, however upon telnet I do not see the house of cards collapse, rather the system simply appears to be hung. Would love to work through this with all of you and perhaps post our fixes here for others rather than the typical "I got it - thanks" or the "dead-thread" that is all too prevalent on sites like this...
- Altera_Forum
Honored Contributor
If you're using the iniche stack, don't use the inice stack port from 9.1 sp2.
Changes in that related to LOCK_NET_RESOURCE / UNLOCK_NET_RESOURCE are broken. In particular access to the network packets are no longer properly protected due to queue access also occurring in interrupts, in some mac drivers. The 9.1 sp1 stack also has some bugs but they are quite so bad. - Altera_Forum
Honored Contributor
jcnhal (http://www.alteraforum.com/forum/member.php?u=26263) (and anyone else) - which version of the iniche stack is seen to be most stable to date? Does anyone have/maintain a bug list for this codebase? Might be a good thread to start...
- Altera_Forum
Honored Contributor
9.1 sp1 is pretty good but we've still had to patch it to get it to work.
it's working pretty well for us on multiple devices with a reasonable number of network threads active simultaneously. without patches 9.1sp1 will crash immediately if your application uses ucos's mutexes. yo also have to make sure to create the appropriate thread semaphores for each thread. I've applied patches to 9.1sp2 that revert most of the code back to 9.1sp1. i can post the patch files if anyone is interested. - Altera_Forum
Honored Contributor
--- Quote Start --- 9.1 sp1 is pretty good but we've still had to patch it to get it to work. it's working pretty well for us on multiple devices with a reasonable number of network threads active simultaneously. without patches 9.1sp1 will crash immediately if your application uses ucos's mutexes. yo also have to make sure to create the appropriate thread semaphores for each thread. I've applied patches to 9.1sp2 that revert most of the code back to 9.1sp1. i can post the patch files if anyone is interested. --- Quote End --- I would definitely be interested. It would be lovely to get something working that i can start from. In the end i just need UDP so i may try to see if i can work with the TSE directly though it seems like that will be a HUGE task. PS: i tried the original .sof file and the board behaved the same as when i used my compiled .sof. and i am familiar with using the evaluation versions of blocks(ie keeping the little window open and JTAG connected during use) - Altera_Forum
Honored Contributor
I agree - a baseline would be a wonderful thing... I believe I had it working using 9.1 web edition without a service pack installed, but am not certain about this... if I recall the SOPC builder was like the one I am using now (which is the nioswiki base hw for the 3c120 kit) but WITHOUT the display device... was a pared down version of the nioswiki linux-capable platform.
I am attempting a build using 9.1 web (no sp installed) to see where I get. There's a ftp site that you can get older rev install files. ftp://ftp.altera.com/outgoing/release/ you have to decipher the release using the names of the files. Chris