Giter Site home page Giter Site logo

rmii-firewall-fpga's Introduction

RMII Firewall FPGA

The project "RMII Firewall FPGA" is VHDL implementation of 100 Mbps (RMII) firewall for FPGA. The RMII Firewall FPGA allows to filter Ethernet packets according to MAC or IP addresses. The Wishbone bus is used to control the entire design. The Wishbone requests can be transmitted from a PC via the UART interface. The target device is FPGA board CYC1000 by Trenz Electronic. As Ethernet PHY are used two LAN8720 boards connected to FPGA via RMII interfaces.

Current status

In development, it may not work properly!

Top level diagram

         +---------+    +-------------+    +---------+
ETH0 <===| RMII    |<===| FIREWALL in |<===| RMII    |<=== ETH1
PORT ===>| MAC     |===>| both ways   |===>| MAC     |===> PORT
         +----+----+    +------+------+    +----+----+
              ↕                ↕                ↕
              +================+================+ WISHBONE BUS
              ↕                                 ↕
         +----+----+                       +----+----+
UART <---| UART2WB |                       | SYSTEM  |
PORT --->| MASTER  |                       | MODULE  |
         +---------+                       +---------+

Main modules description

  • RMII MAC - Receiving and transmitting Ethernet packets on the RMII interface (limitations: only 100 Mbps full duplex mode, no CRC checking).
  • FIREWALL - Parses (extraction of MAC and IP addresses) and filters incoming packets by MAC or IP address.
  • UART2WB MASTER - Transmits the Wishbone requests and responses via UART interface (Wishbone bus master module).
  • SYSTEM MODULE - Basic system control and status registers (version, debug space etc.) accessible via Wishbone bus.

Resource usage summary:

Module LE (LUT+FF) LUT FF BRAM (M9k) Fmax
FPGA (whole design) 11471 6671‬ 10147 52 70.2 MHz
Some submodules: === === === === ===
UART2WBM 192 103 156 0 303.9 MHz
RX_RMII_MAC 1061 848 894 4 149.0 MHz
TX_RMII_MAC 370 232 318 3 165.7 MHz
Firewall 4121 2116 3746 19 153.6 MHz

Implementation was performed using Quartus Prime Lite Edition 18.1.0 for FPGA Intel Cyclone 10 LP 10CL025YU256C8G.

Address space

0xOOOO - 0x3FFF -- System module
0x4000 - 0x40FF -- ETH PORT0 - RX RMII MAC module
0x4100 - 0x41FF -- ETH PORT0 - TX RMII MAC module
0x4200 - 0x5FFF -- Reserved
0x6000 - 0x60FF -- ETH PORT1 - RX RMII MAC module
0x6100 - 0x61FF -- ETH PORT1 - TX RMII MAC module
0x6200 - 0x7FFF -- Reserved
0x8000 - 0x83FF -- Firewall module (ETH PORT0 to PORT1)
0x8400 - 0x87FF -- MatchUnit MAC_DST (ETH PORT0 to PORT1)
0x8800 - 0x8BFF -- MatchUnit MAC_SRC (ETH PORT0 to PORT1)
0x8C00 - 0x8FFF -- MatchUnit IPV4_DST (ETH PORT0 to PORT1)
0x9000 - 0x93FF -- MatchUnit IPV4_SRC (ETH PORT0 to PORT1)
0x9400 - 0x97FF -- MatchUnit IPV6_DST (ETH PORT0 to PORT1)
0x9800 - 0x9BFF -- MatchUnit IPV6_SRC (ETH PORT0 to PORT1)
0x9C00 - 0x9FFF -- Reserved
0xA000 - 0xA3FF -- Firewall module (ETH PORT1 to PORT0)
0xA400 - 0xA7FF -- MatchUnit MAC_DST (ETH PORT1 to PORT0)
0xA800 - 0xABFF -- MatchUnit MAC_SRC (ETH PORT1 to PORT0)
0xAC00 - 0xAFFF -- MatchUnit IPV4_DST (ETH PORT1 to PORT0)
0xB000 - 0xB3FF -- MatchUnit IPV4_SRC (ETH PORT1 to PORT0)
0xB400 - 0xB7FF -- MatchUnit IPV6_DST (ETH PORT1 to PORT0)
0xB800 - 0xBBFF -- MatchUnit IPV6_SRC (ETH PORT1 to PORT0)
0xBC00 - 0xFFFF -- Reserved

License

The RMII Firewall FPGA is available under the MIT license (MIT). Please read LICENSE file.

rmii-firewall-fpga's People

Contributors

jakubcabal avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

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.