GithubHelp home page GithubHelp logo

eth_switch's Introduction

Verilog Ethernet Switch (layer 2)

Features:

  • Parameterized Number of Ports
  • Parameterized MAC-Table (based on dual-port CAM, complexity O(1))
  • Flooding and Broadcasting
  • CRC Checking
  • Static or Dynamic MAC-Table

Compatible Ethernet Frame

eth_frame structure

Common Ethernet Switch Structure

eth_switch structure

Dual-Port CAM

Structure

dpcam structure

Dual-port scheme allows to execute simultaneous request to MAC-Table for SOURCE and DESTINATION ports respectively.

Mode

Static

In this mode MAC-Table do not update itself on the fly. For MAC-Table configuration port s_axis_config_* must be used.

Dynamic

In this mode MAC-Table works in 'normal' mode. It dynamically update itself.

AXIS Interconnect

Arbiter scheduling: Round-Robin

Parameters

  • PORT_NUM - Number of ports (must be power of '2')
  • ADDR_WIDTH - Address width of MAC-Table
  • ETHERNET_MTU - Ethernet Maximum Transmismission Unit
  • FLOODING_ENABLE - Enables (1) or disables (0) Flooding technique
  • CRC_CHECK - Enables (1) or disables (0) CRC Checking (last 4 octets, if presented)
  • RAM_STYLE_DATA - Type of RAM ("block" or "distributed")
  • MODE - Mode of MAC-Table ("dynamic" or "static")

Ports

  • aclk - Clock
  • aresetn - Synchronous reset (active-LOW)
  • s_axis_tdata - Input data
  • s_axis_tvalid - Input 'Valid' signal
  • s_axis_tready - Output 'Ready' signal
  • s_axis_tlast - Input 'Last' transfer signal (end of frame)
  • m_axis_tdata - Output data
  • m_axis_tvalid - Output 'Valid' signal
  • m_axis_tready - Input 'Ready' signal
  • m_axis_tlast - Output 'Last' transfer signal (end of frame)
  • s_axis_config_tdata - Input MAC-Table Configuration Data (if MODE == "static")
  • s_axis_config_tuser - Input MAC-Table Configuration 'User' signal (if MODE == "static")
  • s_axis_config_tvalid - Input MAC-Table Configuration 'Valid' signal (if MODE == "static")

Data Format

  • s_axis_tdata[8*1-1-:8] - Channel #0 Data
  • s_axis_tdata[8*2-1-:8] - Channel #1 Data
  • ...
  • s_axis_tdata[8*PORT_NUM-1-:8] - Channel #(PORT_NUM-1) Data

Configuration Data Format

  • s_axis_tdata[ADDR_WIDTH-1-:ADDR_WIDTH] - Address of CAM cell
  • s_axis_tdata[$clog2(PORT_NUM)+ADDR_WIDTH-1-:$clog2(PORT_NUM)] - Port Number (from 0 to PORT_NUM-1)
  • s_axis_tdata[48+$clog2(PORT_NUM)+ADDR_WIDTH-1-:48] - Destination MAC-address

eth_switch's People

Contributors

mcjtag avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

eth_switch's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.