C6678 's network coprocessor NETCP module has two external gigabit ports, but the PDK provides a network port driver example that only supports a single network port and needs to be modified. This task is accomplished by using a field in the multi-core navigator descriptor to differentiate two ports. After a few months of use no big problems occurred. However, one day when the optimization attribute of the project is configured as O3 optimization, the network port start has a certain probability failure. The O3 optimization is canceled and re-measured, the start has been successful.
First, the location is where the problem, the individual network port drive files to cancel the optimization and re-measurement, there is no failure, so the problem focused on the network Port drive.
Then analyze the code and draw the initialization flowchart of the network port module. In this process, it is found that there is a delay operation. Therefore, the focus of doubt is the delay time is not enough, check the manual found in the manual does not require delay, here is copied PDK sample code, but it expanded 100 times times after the test still has a probability error, so the main problem is not delay.
Further fine positioning is required. Split the drive file into two files, part of the optimization is not optimized, using this method to fine-tune to the function level. Finally, some of the functions of hardware initialization are found to be problematic. However, these functions do not involve a delay operation, just a simple configuration register. The configured register value is viewed in bits per bit against the document, and no problem is found.
At this time debugging and deadlock. You can only carefully analyze the document and code again. During the reading of the document, the initialization process in the code was found to be inconsistent with the document requirements. Could that be the problem?
After modifying the initialization process of the code, the test is actually successful. The O3 has been optimized for nearly hundreds of years and no further errors have been encountered. Problem solving.
Back to the analysis, why the original error, and O3 optimization after the error. Should be in a time series is just at the critical value, no optimization happens to meet the conditions, when the optimization is not eligible. So optimization simply amplifies and exposes the problems that are already there.
Lenovo to another C6455 network port driver bug. After the test is finished, and then one time in a network, a machine or not ping the board. Finally, on the machine, the Wireshark packet found the ARP packet sent by the board has a problem, its FCS check is not passed by the machine is discarded. The last four bytes of the packet that was found to be problematic compared to the normal ARP packet are all zeros, not the frame check of the Ethernet data frame.
Finally, it also took a lot of time to troubleshoot the problem, and it turned out that the branch that was used to C6455 the packet in the network port drive incorrectly padded the packet to 64 bytes, rather than the normal 60 bytes (FCS not included). This error is inherited from the TI sample code.
These lessons attest to the truth that the demo is not credible and plagiarism is prudent.