4

We are developing an ARMv8 processor based SoC which doesn't have ethernet IP inside. Now it's in FPGA form.

Currently I'm using SD card interface to load Linux and file system. But during the development, it would be convenient to have a network interface. For external interface, the final SoC will have some GPIO pins.

Is there any well known method of connecting Ethernet chip to those GPIO pins to use Ethernet network? If it is possible I could mount a network file system and let the software people use the environment.

Armandas
  • 7,845
  • 1
  • 32
  • 56
Chan Kim
  • 153
  • 5
  • What's the FPGA platform, and if applicable, the FPGA board you're developing this one? This makes a difference, because typcially, you get Ethernet MAC IP that you can directly wire up to a set of GPIO pads to connect to a PHY IC, from the FPGA vendor – typically even for free (at least for "old" ethernet standards like fast and gigabit ethernet and the RMII and RGMII interface standards) – Marcus Müller Jan 18 '23 at 08:54
  • We are using proFPGA board, but we want to keep the logic inside the FPGA as exactly the same to the final SOC as possible. – Chan Kim Jan 18 '23 at 09:57
  • 1
    Lantronix or Moxa Serial-Ethernet module? Or an ESP8266 WiFi-Serial module? – tomnexus Jan 18 '23 at 15:25

2 Answers2

4

RMII or RGMII are standard interfaces to PHY devices. Microchip and others offer these PHYs. You should be able to source appropriate AXI or AHB/APB MAC IP blocks for your FPGA to support them. (You will also need the MII interface for PHY control.)

SDIO is a possibility, but is more hassle than RMII/RGMII with fewer PHY choices.

SPI is another option, but slower.

hacktastical
  • 49,832
  • 2
  • 47
  • 138
  • 1
    Hi, having RMII or RGMII in our SoC means we have the MAC and high level circuit inside our SoC, doesn't it? We cannot include Ethernet circuits inside our SoC. We have SD card interface (4 line with clock and command) but I'm not sure it is the same as what's called SDIO. Having said it, if we had SDIO, maybe we could just connect the Ethernet card which has SDIO interface. and yes we have 3 SPI (now all for NOR flash) but could use one for Ethernet maybe. I think but R(G)MII is not an option in our case. – Chan Kim Jan 18 '23 at 09:36
  • @ChanKim *why* can't you have a MAC inside your SoC? What do you think would be better than that? The MAC functionality has to sit *somewhere*, and you would need another communication controller to talk to an external MAC, which would probably be more complex, space-using and expensive than just putting the MAC inside your SoC... – Marcus Müller Jan 18 '23 at 10:57
  • @MarcusMüller because the question is how to attach Ethernet to a microcontroller *without* putting an Ethernet MAC in the microcontroller... – user253751 Jan 18 '23 at 13:21
  • @user253751 I get that, but it makes little sense; there's very few buses over which you would want to attach anything "networky" that would need a smaller interface controller; as you can see in the comments to jpa's excellent answer, what you want to do instead would depend on *why* you are choosing to design your SoC the way you design it. So, that's why I'm asking. Does it hurt you to tell us why you don't want to have an Ethernet MAC on your SoC, specifically? Maybe we can address a few of the troubles you have! – Marcus Müller Jan 18 '23 at 13:24
  • @MarcusMüller notice that the point is to prototype an SoC which has no built-in Ethernet but needs a connection for prototyping. Don't ask me about the time I tunneled IP in hex-encoded packets via a router's serial console port. – user253751 Jan 18 '23 at 13:26
  • @user253751 that gives me a drop of sadness! It's bad to have a design constraint that requires you to *not* do something, even if it's a design objective (you *want* to have ethernet connectivity), and even if it's probably the easiest and cheapest way to achieve the design objectives. All the best for you! – Marcus Müller Jan 18 '23 at 13:29
  • @MarcusMüller development prototypes do be like that sometimes! If you needed Ethernet in your real product, you'd pick a SoC with Ethernet. But since the point is to test one that doesn't have Ethernet... – user253751 Jan 18 '23 at 13:30
  • @user253751 But I though *you* were the one designing that SoC? – Marcus Müller Jan 18 '23 at 13:32
  • @MarcusMüller the asker is designing an SoC without Ethernet and for some convenience reason wants to use Ethernet to probably load the test code onto the SoC and communicate the test results back. – user253751 Jan 18 '23 at 13:33
  • yes user253751's coment is correct. We have to finish the back-end work of the SoC in a few months and we don't have time to put Ethernet now,. If we decide to do it, we have to change so many things (including the interconnect which is not a simple bus) and we don't have ethernet IP. (I used to design ASICs long time ago for more than 15 years but now I'm in S/W part. we'll attach W5500 chip to our SPI and that will require some S/W work, I have to write the SPI driver for our SPI controller which isn't simple too. If we could buy ethern IP with linux driver, it would be convenient) – Chan Kim Jan 18 '23 at 14:06
  • I get it about not wanting to spend the time integrating a MAC - time, resources, etc., only to take it out in the end ( I think for a product it would be a nice-to-have.) An off-the-shelf MAC should come with a board support package, which makes the software easier, especially using a popular PHY. On the other hand the W5500 is an ok solution, but will be more of a snowflake driver-wise. – hacktastical Jan 18 '23 at 17:22
  • SDIO is based on SD Card and has the same interface. You can get networking devices (including WiFi) that support it. So another option besides W5500. That said, you can get W5500 as an Arduino shield so that makes the prototype easier. – hacktastical Jan 18 '23 at 17:27
4

Some more options, assuming you want minimal modifications and this only for development use:

  • USB port + USB to Ethernet adapter. Well supported by Linux.
  • SPI port: Linux has support for ENC424J600 chip, for which breakout boards are easy to find. The transfer rate will be limited to around 1 Mbyte/s, but probably usable for development & testing purposes.
  • USART: You can pipe network from your PC through a serial port, using pppd.
jpa
  • 6,804
  • 17
  • 32
  • SLIP is apparently more common on microcontrollers than PPP, due to lower overhead or something. – user253751 Jan 18 '23 at 13:20
  • Uff, not sure you could get an USB 2.0 HiSpeed port smaller than a Fast Ethernet MAC; I have a rough rule of thumb of ca 600 flipflops for an ethernet MAC, and about twice as much for a barebone USB 2.0 HS controller, in my head. I think USB would make your problem harder, not easier. About the other two: agreed, SPI and UART are "basically free", but very slow. – Marcus Müller Jan 18 '23 at 13:20
  • 1
    Yeah, USB makes sense mostly if there happens to already be USB on the SoC. – jpa Jan 18 '23 at 13:21
  • @jpa yeah, then it's a nice choice (downside: you *really* need a working operating system to boot before you can then use the USB network interface; simple MACs are often supported at a very early stage, even by the bootloader) – Marcus Müller Jan 18 '23 at 13:22
  • yes, we don't have a USB port. The SoC is not for a standalone application but will be connected to another CPU turhgou PCIe, so not many interfaces. Thank you for the info and comments. – Chan Kim Jan 18 '23 at 14:11
  • USB is painful software-wise (for a host) and consumes a lot of pins if an external PHY is used - yes even ULPI - compared to other solutions. It’s a big camel to drag into the tent - much bigger than RMII or SPI. – hacktastical Jan 18 '23 at 17:34