Reply
Regular Visitor
Posts: 9
Registered: ‎12-01-2011

LL_TEMAC link speed autonegotiation

Hello,

 

all Avnet generated designs I have tried so far are able to autonegotaite the link

speed including 1000Mb one. However I tried multiple times to generate my own

designs using xps_ll_temac,  lwip 130 and Xilinx lwip echo server template. I was not able to achieve

any link at 1000Mb unless I specifically  indicate it in temac options in lwip.

It looks like Avnet engineers know a trick.

Could you share it ,please.

Many thanks

 

Avnet Employee (Star Contributor)
Posts: 511
Registered: ‎05-05-2009

Re: LL_TEMAC link speed autonegotiation

We follow the same steps as you described to generate the Echo Server design. Verify that you are using the same version of the ll-temac IP as used in the Avnet reference designs.

Regular Visitor
Posts: 9
Registered: ‎12-01-2011

Re: LL_TEMAC link speed autonegotiation

It is the same vesrion 2.03.a. Speaking of a particular example I am considering now S6LX150T_TEMAC_DMA_Lwip_edk12_3.

Well I do not have 12.3 version of EDK and I am using 13.3. But Soft TEMAC version is the same in both. It looks like the difference

is in hardware implementation. With Avnet files I open SDK. From there I load bit and bmm files generated by AVNET and run raw_apps

with autonegotion. Link speed is successfully detected. Then I using Avnet xbd file implement my design using the same settings 

as in Avnet gude and autonegotion doesn't work. I tried using Avnet raw_apps project with my hardware impementation

and no success. Could you try to implement 6LX150T_TEMAC_DMA_Lwip_edk12_3 in EDK version 13.3 and test it?

Or you have other suggestions?

Thanks

 

 

Regular Visitor
Posts: 9
Registered: ‎12-01-2011

Re: LL_TEMAC link speed autonegotiation

In xapp1026 they say that lwip detects PHY speed only for Marvell PHYs. Wandering why Avnet used one from National Semicondutor.

At any rate Avnet succeded to make it working in teir designs. The question is how?

 

 

Avnet Employee (Star Contributor)
Posts: 511
Registered: ‎05-05-2009

Re: LL_TEMAC link speed autonegotiation

Any reason why you don't start your design with the Avnet reference design and then add/remove what you don't need? Please compare your UCF with the UCF from Avnet reference design to make sure they match.

Highlighted
Regular Visitor
Posts: 9
Registered: ‎12-01-2011

Re: LL_TEMAC link speed autonegotiation

Just to share the information

 

the link speed autonegotion  is performed by the code in the file xlltemacif_physpeed.c

The following lines defines speed links that are written to auto-negotiation advertisement register (0x04).

 

#define ADVERTISE_100_AND_10    (ADVERTISE_10FULL | ADVERTISE_100FULL |        \
                ADVERTISE_10HALF | ADVERTISE_100HALF)
#define ADVERTISE_100        (ADVERTISE_100FULL | ADVERTISE_100HALF)
#define ADVERTISE_10        (ADVERTISE_10FULL | ADVERTISE_10HALF)

 

Bits 4:0 of this register are protocol selection bits. This should be 0b00001 to support IEEE802.3 .

However, Xilinx code overwrites these bits so they become all zero. Depending on the link partner

like a NIC or a switch it may work or not. I tried sevral devices and with some of them the auto negotiation

doesn't complete at the level of PHY. The solution is to add the correct protocol bits value to the above lines

so they would become as follows.

 

#define ADVERTISE_100_AND_10    (ADVERTISE_10FULL | ADVERTISE_100FULL |        \
                ADVERTISE_10HALF | ADVERTISE_100HALF | 0x1)
#define ADVERTISE_100        (ADVERTISE_100FULL | ADVERTISE_100HALF | 0x1)
#define ADVERTISE_10        (ADVERTISE_10FULL | ADVERTISE_10HALF | 0x1)

 

 I lost few days on digging into the problem and just hope that this will save time to somewhat else.

Enjoy