Altera_Forum
Honored Contributor
14 years agoQuestion : Avalon OpenCores 10/100 Ethernet MAC TX problem
Hi All,
I am experiencing strange behaviour with the transmit side of the OCM version 9.1, I have created a sof for a Cyclone II custom board that includes a Nios II/f, 16MB SDRAM (32bit databus) and OCM using Quartus 10.1. My SBT project utilises Interniche superloop mode. I have also have recently tried a uC + Interniche project as well - same problem. When run, I receive messages as expected and I have traced the generated replies all the way down to the low level send OCM routines. The problem is that the data that appears on the wire (verified via Packetyzer) is different to that what is held in the SDRAM. For example, here’s the memory contents from the descriptor data pointer for an ARP reply.... 5C 26 0A 32 2B 9F 00 07 ED 08 02 6F 08 06 00 01 08 00 06 04 00 02 00 07 ED 08 02 6F C0 A8 0B 0A 5C 26 0A 32 2B 9F C0 A8 0B 0B C0 A8 0B 0B 00 00 00 00 00 00 00 00 00 00 00 00 00 00 And here is what appears on the wire... 5C 36 2B 9F 0A 32 2B 0F 00 07 ED 08 02 6F 08 06 00 01 08 00 06 04 00 02 00 07 ED A8 02 6F C0 28 0B 0A 5C 96 0A 32 2B 0F C0 A8 0B 0B 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 This can also be seen in the attached jpg which shows Packetyzer and NIOS debug screen grab. As you can see it appears that there is a word swap at the beginning of the message and 2 lost characters in addition to odd bits been set or cleared. The strange thing is that the ‘corruption’ is not random – i.e. the same bits are set/clear and word is swapped in an identical fashion each time the message is sent. Also, this is a known working board. It has been in commercial use for 4 1/2 years using the wishbone OCM running a Quartus 6.1 sof. Further related information, - system clock of 80Mhz for NiosII, SDRAM and OCM - no data cache - with debug mode set to 5 (ETH_OCM_DBG_LVL) no debug error messages (on RX and TX) are generated. - MDI and MDO pins are connected via a tristate buffer using MDOE. I have also tried using a altiobuf. - PHY is National DP83848C, running from 2.5MHz osc. - OCM Burst Modes disabled (due to size constraints) of 2C8 device As RX works I am at a complete loss as to why this is occurring.. anybody got any ideas? Thanks in advance Ade