Forum Discussion
Altera_Forum
Honored Contributor
8 years ago --- Quote Start --- Fixed it, so I thought I'd document it here for anyone in the future who runs into this problem and is googling their brains out looking for help. First, make sure you either have the correct UDP checksum, or put all 0s in the checksum field. The OS will drop packets with an incorrect UDP checksum, but will allow packets with no checksum (all 0s). I recommend the all 0s method, since you don't have to buffer the packet and do calculations on it before sending. You can just stuff a FIFO and when it reaches a fill level, put the header on it and send it on its way. Second, be absolutely sure you have ARPs and ICMPs working. If you want the OS's sockets to get your packets, you need to do an ARP first. This will send the MAC address of the PC back to your board. I tried hard coding the MAC address in there, but for some reason the OS would drop the packets if I hadn't ARPed first. There were also some ICMPs that went back and forth. This is the real key though. The IDENTIFICATION field in the IPV4 header has to increment with every packet, and your first packet has to start with some non-zero number in that field. If you leave the IDENTIFICATION field constant, Wireshark will show all your packets as being completely valid, but the OS apparently thinks it's getting the same packet over and over and just drops them. I didn't discover this earlier because I was starting my packet stream with IDENTIFICATION = 0x0000, which apparently also doesn't work. I don't know if it's an OS driver thing, but I arbitrarily started my packet numbering with 0x8000 instead of 0x0000 and it started working. I can't explain that, but that's the difference between a working and a non-working design. So long story short, I'm accomplishing what I wanted, taking data, UDP packetizing it, and having it bubble up through the PC's driver stack such that it's accessible via socket commands. And all this without NIOS, strictly custom modules talking to the TSE core. If anyone ever needs help with doing a strictly HDL implementation of the TSE core for moving data as quickly as possible, send me a PM. Having done this 5-6 times in various forms over the years, I've got a pretty good handle on how to configure the core for both RGMII and SGMII, and on which fields are/aren't necessary in the various headers. --- Quote End --- Heyyyyyyyyyyyy I am getting the same problem. My UDP checksum is hard coded to zero and CRC32 is also hard coded but i cant receive the packets in my program where as wireshark shows the packets as perfect. Help me :(