Hackable FPGA based network tap that uses the Opsero Ethernet FMC (OP031) or Robust Ethernet FMC (OP041).
This project is designed for version 2024.1 of the Xilinx tools (Vivado/Vitis). If you are using an older version of the Xilinx tools, then refer to the release tags to find the version of this repository that matches your version of the tools.
- Vivado 2024.1
- Vitis 2024.1
- Ethernet FMC or Robust Ethernet FMC
- One of the below listed evaluation boards
- Zynq-7000 ZedBoard
- LPC connector
- Zynq UltraScale+ ZCU102 Evaluation board
- HPC0 connector
This project will implement an FPGA based network tap which could be used to "listen" to the communications passing over an Ethernet cable. It is a work that is still under development.
The design in it's present state implements a pass-through between PORT0 and PORT1 of the Ethernet FMC. The pass-through is fully functional and can be tested by connecting ports 0 and 1 to separate Ethernet devices.
To use the sources in this repository, please follow these steps:
- Download the repo as a zip file and extract the files to a directory on your hard drive --OR-- Git users: clone the repo to your hard drive
- Open Windows Explorer, browse to the repo files on your hard drive.
- In the
Vivado
directory, double click on thebuild-vivado.bat
batch file. You will be prompted to select a target design to build. You will find the project in the folderVivado/<target>
. - Run Vivado and open the project that was just created.
- Click Generate bitstream.
- When the bitstream is successfully generated, select
File->Export->Export Hardware
. In the window that opens, tick "Include bitstream" and "Local to project". - Return to Windows Explorer and browse to the Vitis directory in the repo.
- Double click the
build-vitis.bat
batch file. You will be prompted to select the target design. The Vitis workspace will be found in the<target>_workspace
folder. - Run Xilinx Vitis and select the workspace folder that was just created.
- Connect and power up the hardware.
- Open a Putty terminal to view the UART output.
- Right-click on the application and select
Run As->Launch on Hardware (Single Application Debug)
- Open a command terminal and launch the setup script for Vivado and Vitis:
source <path-to-vivado-install>/2024.1/settings64.sh source <path-to-vitis-install>/2024.1/settings64.sh
- Clone the Git repository and
cd
into the repo:git clone https://github.com/fpgadeveloper/ethernet-fmc-network-tap.git cd ethernet-fmc-network-tap
- Run make to build the Vivado project and the Vitis workspace for the target board. You must replace
<target>
with a valid target:Valid targets are:make bootimage TARGET=<target>
zedboard
,zcu102_hpc0
. - Launch the Vitis GUI. When asked to select the workspace path, select the
Vitis/<target>_workspace
directory. - Power up your hardware platform and ensure that the JTAG is connected properly.
- In the Vitis Explorer panel, double-click on the System project that you want to run - this will reveal the application contained in the project. The System project will have the postfix "_system".
- Now right click on the application "echo_server" then navigate the drop down menu to Run As->Launch on Hardware (Single Application Debug (GDB))..
The following tutorials explain the workings of the network tap:
The lwIP echo server application is used here to simplify testing the design. We run the echo server on the carrier board's onboard Ethernet port, which allows us to use only one PC to send and receive packets over the "tapped" link. To test this application, you must make the following connections:
- Carrier board's on-board Ethernet connector to PORT1 of the Ethernet FMC
- PORT0 of the Ethernet FMC to your PC's Ethernet port or a network router
Now when the application is running, you will be able to send packets from your PC through PORT0, out of PORT1, into the carrier board's Ethernet port, from which point they will be echoed by the echo server and come back through the same path to your PC.
Check the following if the project fails to build or generate a bitstream:
Check the version specified in the Requirements section of this readme file. Note that this project is regularly maintained to the latest version of Vivado and you may have to refer to an earlier commit of this repo if you are using an older version of Vivado.
All the projects in the repo are built, synthesised and implemented to a bitstream before being committed, so if you follow the instructions, there should not be any build issues.
Vivado doesn't cope well with long directory structures, so copy/clone the repo into a short directory structure such as
C:\projects\
. When working in long directory structures, you can get errors relating to missing files, particularly files
that are normally generated by Vivado (FIFOs, etc).
We encourage contribution to these projects. If you spot issues or you want to add designs for other platforms, please make a pull request.
This project was developed by Opsero Inc., a tight-knit team of FPGA experts delivering FPGA products and design services to start-ups and tech companies. Follow our blog, FPGA Developer, for news, tutorials and updates on the awesome projects we work on.