Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Communicating with Ethernet controller through SPI bus

Status
Not open for further replies.

KD494

Member level 5
Joined
Jun 24, 2015
Messages
82
Helped
13
Reputation
26
Reaction score
13
Trophy points
8
Location
Boston, MA
Activity points
767
Hi everyone,

I'm trying to figure out my expected throughput using this fast ethernet controller and having a conceptual problem more than anything else.

https://www.mouser.com/ds/2/495/ksz8851snl_ds-242556.pdf

So the part claims to be able to support 100Mb/sec communication and I calculated the overhead (preamble, header, frame check, interpacket gap) to be about 1.86% of that leaving me with 98.14Mb/sec. However the source of these bits would be the SPI bus which can only be clocked up to 40MHz. My understanding of SPI tells me that it provides 1bit/clk cycle and would therefore only be able to provide 40Mb/sec under ideal conditions.

Is the 100Mb/sec rating just a maximum that the hardware can handle? Is it attainable in practice? I just don't see how you could utilize the full speed of fast ethernet with such a slow SPI clock.

Thanks!
 

FvM

Super Moderator
Staff member
Joined
Jan 22, 2008
Messages
48,418
Helped
14,252
Reputation
28,765
Reaction score
12,941
Trophy points
1,393
Location
Bochum, Germany
Activity points
280,188
Actual data rate is 80 rather than 100 Mbps due to 8b10b encoding, but of course can't be transported through SPI.

If you want full ethernet throughput, you'll go for a processor with tightly coupled network interface like Arm, PIC32 or wahtsoever. The SPI connected ethernet chip will be typically used with small processors that can't transport 40 Mbps anyway.
 
  • Like
Reactions: KD494

    KD494

    Points: 2
    Helpful Answer Positive Rating

KD494

Member level 5
Joined
Jun 24, 2015
Messages
82
Helped
13
Reputation
26
Reaction score
13
Trophy points
8
Location
Boston, MA
Activity points
767
Thanks for the response. I didn't mention it before but the serial stream out is actually at 125MHz before the MLT-3 so I think that takes care of the 8b10b.

Thanks for confirming that I'm not insane about the 40Mbps!

- - - Updated - - -

Well actually I should ask a followup question while I'm here. So why does the chip, whose only interface is SPI, support such a high data rate? Is it simply because it wants to follow the 10/100/1000 pattern? Is there really no way to get full 100Mbps performance from this chip?
 

ads-ee

Super Moderator
Staff member
Joined
Sep 10, 2013
Messages
7,820
Helped
1,811
Reputation
3,632
Reaction score
1,772
Trophy points
1,393
Location
USA
Activity points
59,030
I think you're missing the point, the part allows a device with SPI to be connected to a 10/100 link, it doesn't mean the device communicates at 100 Mb. The device at most can communicate at 40Mb over SPI and that gets sent over the 100Mb link (with lots of idle time between packets).

The part looks to be one of those internet of things type of dodads, so your dishwasher can be plugged into your home network and you can check on your dishes via the internet. :???:
 

FvM

Super Moderator
Staff member
Joined
Jan 22, 2008
Messages
48,418
Helped
14,252
Reputation
28,765
Reaction score
12,941
Trophy points
1,393
Location
Bochum, Germany
Activity points
280,188
Thanks for correcting, the 8b10b encoded bit rate of commonly used 100BASE-TX is in fact 125 Mbps.

Obviously an ethernet interface is required to implement the defined standard physical layers. So a reasonable question could be why 100 Mbps at all? All existing ethernet interfaces are downward compatible to 10 Mbps. But everyone is asking for 100 Mbps, even if the speed isn't utilized.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top