This repository contains a complete implementation of a 10Base-T Ethernet hub based on the IEEE 802.3-9 multiport repeater specification, designed for FPGA deployment. The project was developed as part of a university engineering course and demonstrates functional Ethernet communication at the physical and data link layers.
The hub implements five 10Base-T Ethernet ports with full transmit and receive pathways, including:
- Differential signaling with RS-485 line drivers
- Manchester encoding/decoding
- Frame delineation and CRC32 validation
- Network Link Pulse (NLP) functionality
- AXI4-Stream internal communication
- Packet routing with broadcast distribution and loopback prevention
- FIFO buffers for congestion management
The primary VHDL source files are located in the repository root. Files follow a consistent naming convention:
-
tx_*.vhd- Transmit path componentstx_fsm_axi.vhd- AXI4-Stream receiver FSMtx_fsm_pt.vhd- Packet transmitter FSMtx_phy.vhd- Physical layer with Manchester encoder and NLP generationsr_piso.vhd- Parallel-in, serial-out shift register
-
rx_*.vhd- Receive path componentsrx_decoder.vhd- Manchester decoderrx_fsm_pr.vhd- Packet receiver FSMrx_fsm_adr.vhd- Address reader FSMrx_fsm_axi.vhd- AXI4-Stream transmitter FSMrx_fcs_crc.vhd&rx_fcs_verify.vhd- CRC validationrx_2ff.vhd- Two flip-flop synchronizersr_sipo.vhd- Serial-in, parallel-out shift register
-
eth_*.vhd- Top-level integration componentseth_tx.vhd- Complete transmit moduleeth_rx.vhd- Complete receive moduleeth_port.vhd- Single Ethernet port (TX + RX)ethernet_switch.vhd- Top-level five-port hub
-
axi4s_interconnect.vhd- Five-port broadcast interconnect with loopback prevention -
ringbuffer.vhd- FIFO buffer for egress packet queuing -
reset_ctrl.vhd- System reset controller -
pll_main.vhd- PLL for clock generation
tb/- Testbenches for all modules and system-level integration testingva/- Validation code used for on-FPGA testing and debuggingold/- Deprecated code from previous design iterations (not used in final implementation)output_files/- Quartus compilation outputssimulation/- Simulation artifacts and waveformsdb/,incremental_db/- Quartus project database filesgreybox_tmp/,atom_netlists/- Synthesis intermediate files
.qpf,.qsf- Quartus project files.gtkw- GTKWave waveform configuration files.hex- Memory initialization files for RAM blocksstla.stp- SignalTap logic analyzer configuration
This project is best opened in Visual Studio Code or VSCodium. The repository includes VS Code workspace settings that automatically hide build artifacts, intermediate files, and other clutter to keep the file explorer clean and focused on source files.
The project is configured for Intel/Altera Quartus Prime. Compilation outputs will be generated in the output_files/ directory.
Testbenches use GHDL for simulation and GTKWave for waveform viewing. Compiled testbench executables (.exe) and waveform files (.ghw) are included in the root directory for quick verification.
The design targets a custom PCB with:
- Five RJ45 connectors with integrated 1:1 isolation transformers
- SN65HVD33DR RS-485 line drivers for differential signaling
- Connection to FPGA via expansion headers
- Proper impedance matching and EMI protection
Macauley Lim, Rhyse Williams, Jaylen Avtarovski, Luke Skjellerup
© All Rights Reserved.
This project was developed for educational purposes as part of university coursework. Please feel free to learn from this code for educational purposes.