FPGA Intellectual Property
PCI Express*, Networking and Connectivity, Memory Interfaces, DSP IP, and Video IP
6359 Discussions

Problem TSE MAC (CRC-32 Error)

Altera_Forum
Honored Contributor II
1,469 Views

I am currently using the TSE MAC to communicate with another device in gigabit mode. Things seemed to be working fine for the last couple of weeks and then all of the sudden I can no longer receive data packets. The MAC seems to detect a CRC-32 error. I'm pretty sure that it is not a sender error, b/c I have tried sending packets with 2 different devices and monitoring that they are correct with a program called wireshark. 

 

I changed the settings of the MAC to forward packets to the application even if a CRC-32 error is detected. The data that I receive looks somewhat correct, but some bytes are repeated. Has anyone run into a problem like this before or have any suggestions on what to look for? I have exhausted around 24 hours trying to fix this issue.
0 Kudos
6 Replies
Altera_Forum
Honored Contributor II
637 Views

What version of the MAC are you using? How are you using the MAC (stand-alone or NIOS)/

0 Kudos
Altera_Forum
Honored Contributor II
637 Views

I am using version 7.2. I am using along with Nios as well. I am not using the Interniche stack. I wrote a custom driver for it (though it is very similar to the Altera driver) to support a different stack.

0 Kudos
Altera_Forum
Honored Contributor II
637 Views

There are a few things you may want to look at. I can't promise any of these will help but they are issues we had trouble with. 

 

1 - Memory alignment. Make sure your memory write addresses (when the MAC is receiving data) are 32-bit word aligned. The SGDMA controller really does not handle unaligned addresses. You'll notice in the Altera InterNiche driver that they use the 16-bit shift feature of the MAC to accomplish this. 

 

2 - Known bug. There is a known bug in the TSE MAC that has been fixed in 8.0. It is listed as "Intermittent Corrupted Packets Received on Avalon Streaming Interface When Byte Shifting Is Used" in the errata. Under certain circumstances (combination of loading and varying byte sizes), an incorrect amount of data gets transferred from the MAC. This results in truncation of the data. 

 

3 - Software driver. We had several circumstances where the MAC and PHY were not operating in the same mode. (like PHY in 10Mbit half duplex and MAC in 1000Mbit full duplex). This caused a lot of issues (like occasional CRC errors). Obviously is the software driver's responsibility to configure the two correctly. 

 

Now of course the fact that you had everything working fine and now it's stopped means that something has changed. Have you made a change to software, firmware, or hardware? If you did not make any changes that caused things to stop working, then you should consider a hardware failure. Have you tried another board? 

 

Jake
0 Kudos
Altera_Forum
Honored Contributor II
637 Views

 

--- Quote Start ---  

There are a few things you may want to look at. I can't promise any of these will help but they are issues we had trouble with. 

 

1 - Memory alignment. Make sure your memory write addresses (when the MAC is receiving data) are 32-bit word aligned. The SGDMA controller really does not handle unaligned addresses. You'll notice in the Altera InterNiche driver that they use the 16-bit shift feature of the MAC to accomplish this. 

 

2 - Known bug. There is a known bug in the TSE MAC that has been fixed in 8.0. It is listed as "Intermittent Corrupted Packets Received on Avalon Streaming Interface When Byte Shifting Is Used" in the errata. Under certain circumstances (combination of loading and varying byte sizes), an incorrect amount of data gets transferred from the MAC. This results in truncation of the data. 

 

3 - Software driver. We had several circumstances where the MAC and PHY were not operating in the same mode. (like PHY in 10Mbit half duplex and MAC in 1000Mbit full duplex). This caused a lot of issues (like occasional CRC errors). Obviously is the software driver's responsibility to configure the two correctly. 

 

Now of course the fact that you had everything working fine and now it's stopped means that something has changed. Have you made a change to software, firmware, or hardware? If you did not make any changes that caused things to stop working, then you should consider a hardware failure. Have you tried another board? 

 

Jake 

--- Quote End ---  

 

 

After utilizing some signal tap lines to view the data coming in to the MAC from the PHY and the data being pushed into the FIFO, it seems that the first byte of the packet is disappearing somehow. I don't think it is associated with any of the problems you highlighted above unfortunately. The addresses are 32-bit aligned and the PHY and MAC are both in 1000Mbit full-duplex. It could be associated with the second issue you highlighted, but I'm not sure how to check without upgrading to 8.0 which I really don't want to do. I put in a support request to Altera and am currently waiting to here their recommendations. Thanks for your help Jake. I will follow up letting you know the fix unless you have any other ideas.
0 Kudos
Altera_Forum
Honored Contributor II
637 Views

Contact your FAE. There is a patch available for 7.2 that addresses the second issue. 

 

Jake
0 Kudos
Altera_Forum
Honored Contributor II
637 Views

Will do, thanks again.

0 Kudos
Reply