• Stars
    star
    147
  • Rank 251,347 (Top 5 %)
  • Language
    C
  • License
    GNU General Publi...
  • Created over 1 year ago
  • Updated 9 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

10Gb Ethernet Switch

An Open Source 10Gb Ethernet Switch

The main goal of this project is to demonstrate a 10Gb Ethernet switch. Packets will arrive in one of four SFP+ interfaces, and from there be routed as appropriately.

For a full discussion of the design, please check out this ZipCPU blog article: An Overview of a 10Gb Ethernet Switch.

Routing algorithm

The current (draft) routing algorithm is as follows:

  1. For each incoming packet, its incoming port and source MAC address will be captured, and then recorded in a table.

    • The table will have timeouts for all entries.
    • If the table is full, the new entry will overwrite the oldest entry
  2. For each outgoing packet, if the destination MAC address matches the source address seen on a previous incoming source MAC address, the packet will be routed to that port.

  3. In all other cases, if the port cannot be determined or if the destination port is to a broadcast address, the packet will be broadcast to all (other) ports.

  4. One address has been reserved and used for a local soft-core CPU.

Other hardware interfaces

Other hardware interfaces are also be present within this design, to include UART, HDMI Tx and Rx, a SATA controller (still under development), micro SD, eMMC, QSPI flash, I2C, temperature sensing and fan control, and much more.

Sponsorship

This project was sponsored by NetIdee.

License

This project is released under the GPLv3 license. This should be sufficient for most individual needs. Should you find this license insufficient to meet your needs, other licenses can be purchased from Gisselquist Technology, LLC.

Status

As of 30 November, 2023:

  • The initial PCB for this project has been built and testing has completed. Several issues have been found, which are now scheduled to be fixed in the next revision.

  • The project RTL is mostly assembled. The only significant component not yet integrated is the SATA.

  • Components assembled, attached, and demonstrated to be working include:

    • The bus RTL has been assembled, to include the Wishbone crossbars, as well as up and down sizing components.

    • The debug bus, the ZipCPU, its console, and the ZipCPU's (new) DMA. All four are running, and are currently an integral part of testing. This includes STDLIB and STDIO (i.e. printf) support via NEWLIB.

    • Several Wishbone Scopes have been used to debug things so far.

    • Was working: The QSPI flash. (The control wires have since been disconnected on the board, due to a conflict with the SDIO. This will be fixed in the next PCB revision.) A voltage conflict kept the board from configuring itself from the flash on power up. Both of these issues should be fixed in the next board revision. This controller has been removed from the currently active design.

    • The ICAPE port. Once the flash hardware has been fixed, this peripheral will allow the design to issue warm configuration restart requests.

    • The I2C Controller, to include a new I2C DMA.

      • Fan control and temperature measurement. The I2C controller is used here to sense temperature, and so it is an integral part of the fan controller. This is not (yet) a closed loop system, however, since the board is currently using a heat sink instead of a fan.

      • EDID information may be successfully read from the downstream HDMI port, and pushed upstream to support the HDMI receiver.

      • DDR3 configuration information may be read successfully from the DDR3 daughter board

      • SFP+ configuration information may also be read, and interpreted according to SFF-8472. This information was used successfully in the early rounds of debugging the Ethernet ports.

      • Si5324 reference clock controller. The clock can be configured, and also measured within the FPGA.

      • OLED display via I2C. You can see a demonstration image here.

    • General and Special Purpose IO controllers. This means that all buttons, switches, and LEDs are working.

    • SD/eMMC:

    • (Sort of) Working: SMI Slave Controller. The SMI pins appear to work--all except the SMI address pins. I'm not sure why that is, but appears to be a design issue with the CM4 daughter board. Still, it's working well enough that the project can use SMI if desired.

    • HDMI transmitter/receiver. The receiver now accepts video from the RPi and forwards it downstream. Either this video, or a blank screen, can then be forwarded to an overlay module. The result has now been display (successfully) via the HDMI transmitter. (This component has since been temporarily removed for a lack of available space in the FPGA.)

    • The 10Gb Ethernet component. All connections are up and running in our test setup. The router itself appears to be working as well.

    • This open source DDR3 SDRAM memory controller. While I haven't (yet) measured its performance, I'm expecting this controller to a 2x lower latency when compared with Xilinx's MIG controller.

    • The CPU-based virtual packet FIFOs are fully integrated, and appear to be working.

  • Only one component remains to be integrated and tested:

The next steps for this project include:

  • Measuring the network throughput. iperf has been recommended for this purpose.

  • Completing the SATA controller.

    This task is not yet funded.

  • Updating the simulation so that it can simulate the entire design.

    Currently the design has no functional top level simulation. This is due to a lack of simulation models for key subsystems, to include the DDR3 SDRAM and the EMMC. Whether these remaining models get built in Verilog, C++ for use with Verilator, or both is a decision that remains to be made.

    This task is not currently funded, as all of the funded tasks associated with this project have been completed.

To track the project's status at a glance, you can check either the bus blocks testing stoplight chart, or the 10Gb Ethernet testing diagram. Both show the status of the hardware testing of various components within the system, although from different viewpoints. The bus blocks chart shows the status of the various components connected to the backbone Wishbone bus, but doesn't really break down the 10Gb ethernet components. The 10Gb Ethernet blocks diagram, on the other hand, breaks down the status of the 10Gb Ethernet components, but doesn't show the status of the rest of the design. Together, both will provide insight into the current state of the design.

Ideally, the dev branch of this project would have the most recent status. In practice, the master branch has tended to have the most recent updates.

More Repositories

1

zipcpu

A small, light weight, RISC CPU soft core
Verilog
1,268
star
2

wb2axip

Bus bridges and other odds and ends
Verilog
469
star
3

wbuart32

A simple, basic, formally verified UART controller
Verilog
272
star
4

dblclockfft

A configurable C++ generator of pipelined Verilog FFT cores
C++
213
star
5

sdspi

SD-Card controller, using either SPI, SDIO, or eMMC interfaces
Verilog
185
star
6

autofpga

A utility for Composing FPGA designs from Peripherals
C++
167
star
7

vgasim

A Video display simulator
Verilog
154
star
8

dspfilters

A collection of demonstration digital filters
Verilog
138
star
9

openarty

An Open Source configuration of the Arty platform
Verilog
119
star
10

dpll

A collection of phase locked loop (PLL) related projects
Verilog
95
star
11

cordic

A series of CORDIC related projects
C++
85
star
12

qspiflash

A set of Wishbone Controlled SPI Flash Controllers
Verilog
72
star
13

wbscope

A wishbone controlled scope for FPGA's
Verilog
72
star
14

sdr

A basic Soft(Gate)ware Defined Radio architecture
Verilog
71
star
15

interpolation

Digital Interpolation Techniques Applied to Digital Signal Processing
Verilog
53
star
16

zbasic

A bare bones, basic, ZipCPU system designed for both testing and quick integration into new systems
Verilog
42
star
17

wbi2c

Wishbone controlled I2C controllers
Verilog
40
star
18

fftdemo

A demonstration showing how several components can be compsed to build a simulated spectrogram
Verilog
39
star
19

s6soc

CMod-S6 SoC
Verilog
35
star
20

dbgbus

A collection of debugging busses developed and presented at zipcpu.com
Verilog
33
star
21

rtcclock

A Real Time Clock core for FPGA's
Verilog
22
star
22

arrowzip

A ZipCPU based demonstration of the MAX1000 FPGA board
Verilog
21
star
23

wbfmtx

A wishbone controlled FM transmitter hack
Verilog
21
star
24

icozip

A ZipCPU demonstration port for the icoboard
Verilog
17
star
25

xulalx25soc

A System on a Chip Implementation for the XuLA2-LX25 board
Verilog
16
star
26

wbpwmaudio

A wishbone controlled PWM (audio) controller
Verilog
15
star
27

videozip

A ZipCPU SoC for the Nexys Video board supporting video functionality
Verilog
14
star
28

wbspi

A collection of SPI related cores
Verilog
14
star
29

website

The ZipCPU blog
HTML
14
star
30

wbpmic

Wishbone controller for a MEMs microphone
Verilog
14
star
31

qoiimg

Quite OK image compression Verilog implementation
Verilog
14
star
32

fwmpy

A multiply core generator
C++
13
star
33

zipversa

A Versa Board implementation using the AutoFPGA/ZipCPU infrastructure
Verilog
13
star
34

wbhyperram

A cross platform, formally verified, open source, hyperRAM controller with simulator
11
star
35

axidmacheck

AXI DMA Check: A utility to measure DMA speeds in simulation
Verilog
10
star
36

wbicapetwo

Wishbone to ICAPE interface conversion
Verilog
8
star
37

tinyzip

A ZipCPU based demonstration for the TinyFPGA BX board
Verilog
8
star
38

wbsata

Wishbone SATA Controller
Verilog
8
star
39

tttt

A 4x4x4 Tic-Tac-Toe game suitable for porting to embedded hardware platforms
C
8
star
40

autofpga-demo

A demonstration of how AutoFPGA can compose a design from simple components
Verilog
8
star
41

debouncer

Digital logic necessary to debounce buttons
Verilog
8
star
42

kimos

Enclustra Mercury demonstration project
C
8
star
43

openz7

OpenZ7, an open source Zynq demo based on the Arty Z7-20
Verilog
6
star
44

zipstormmx

ZipSTORM-MX, an iCE40 ZipCPU demonstration project
Verilog
5
star
45

cputest-harness

A simulation test harness, containing serial port, QSPI flash, and an output done I/O--just provide the CPU
C++
4
star
46

xtimesheet

A very simple timesheet tracking program using text files and a GTK/Glade interface
C++
1
star