brain wrote:
Dunno, I am always told that the cs8900 code makes it hard to write a suitable tcp/ip client solution.
If one was starting from scratch (i.e. without ip65, or contiku/uip or whatever) then it would definately be quicker & easier to create a tcp client app on w5100 than on cs8900a (since to do tcp on cs8900a, you would need to roll your own ARP & TCP layers).
But since there are already software stacks that talk to cs8900a, the question is, is it easier to write an app using those than using the native w5100 stack?
As the maintainer of one of those stacks, I obviously have a different perspective to most, since I will have a deep understanding of ip65, and it is thus easy for me to use. In any case, I think:
- for someone coming in cold, learning how to interface directly with the w5100 will have a similar learning curve to any other library (there are a few curly concepts, e.g. the way each socket has a circular buffer, that takes a bit of time to understand, and some of english in the datasheet is incoherent).
- learning from scratch, and then using, an existing library which has DHCP and DNS will be faster than implementing DHCP & DNS from scratch on w5100, and I think DHCP & DNS are essential for a TCP client.
- It would probably be possible to write a new library on top of w5100 that included DHCP & DNS, and would be smaller than ip65. Whether that library is easier to use than ip65 is a question of API architecture & documentation, rather than the chip on the NIC.
brain wrote:
However, does the Wiz stack provide performance enhancements that might make it useful?
On my board (where auto-increment is flaky), it is definately slower to write a page of data to the w5100 than the cs8900a. However I can imagine it would be possible to use the w5100 in full memory mapped mode (i.e. with a latch that fiddled with /GAME and /EXROM at appropriate times, it would be possible to map in one of the a) the common & socket registers in wiznet address 0x0000 ... 0x7FF, or b) the TX buffers at 0x4000..0x5FFF, or c) the RX buffers at 0x6000..0x7FFF ) into say c64 address range $8000..$9FFF )
The upside though is (in ip65 at least) there are a few calls that are effectively delayed for a few network interactions. For example, in my TCP implementation, when you call 'tcp_send' to send data to a remote host, the ip65 stack doesn't pass control back until the remote host has ACKed the data. At best, there is a network round trip, at worst, there are timeouts & retransmissions, maybe even an ARP request as well. With the w5100 implementation, the call to tcp_send returns as soon as the data is written to the w5100 chip, and the chip handles ARP, retransmits etc. So application responsiveness is improved.