PDA

View Full Version : W5100/W5200 speed increase



DynamoBen
03-19-2013, 11:56 AM
I'm looking for ways to speed things up in this driver, and the W5100 driver. The bottleneck at this point appears to be the spin code. Anyone interested in moving some of the common spin routines into ASM?

jstjohnz
03-20-2013, 03:57 PM
I REALLY hate it when this damned thing times out and logs me off while I'm drafting a post. Usually I save it, but not this time.

I'll try again when my patience level comes up a notch.

DynamoBen
03-20-2013, 04:00 PM
I think the TX/RX routines that are currently in spin would benefit the most by being ASM.

jstjohnz
03-20-2013, 09:25 PM
What I was trying to say last time before the post evaporated, I have managed to get another 10-12% speed boost from the read loop in the driver. What I did (in ReadMulti) was:

Move the "mov frqa,frq10 instruction outside of the :bytes loop
Put a copy of rSPI inside of the :bytes loop to eliminate the CALL and RET

These 2 changes reduce the byte loop from 26 to 23 instructions. Also, at 23 instructions, the timing is such that re is no wait for the hub when the WRBYTE comes up.

DynamoBen
03-21-2013, 02:04 PM
For those that are interested in why I want to up the performance, look here (https://github.com/manitou48/DUEZoo/blob/master/wizperf.txt)for what others have done.