Reading the repo
Opening the box…
Reading the repo
Opening the box…
How to install on Windows
A minimal Layer 2 network switch implemented in Verilog at the Register-Transfer Level (RTL), featuring FSM control logic, FIFO buffering, and hardware-based packet routing.
Saved setup from 1 h ago
Will it work on Windows?
winget install Git.Git) or WSL2 (wsl --install).The maintainers included run_sim.sh. Run it from the cloned folder after reading it.
bash run_sim.sh
All modules were developed and smoke-tested with Icarus Verilog. Hence requires Icarus Verilog 11 or newer to simulate the build.
./run_sim.sh # 4-port system test + MAC aging test
./run_sim.sh 8 # same system test with NUM_PORTS = 8
<div align="center">
<img src="assets/terminal.svg" alt="Animated terminal showing the regression passing" width="90%"/>
</div>
<br>
To custom instantiate the switch, change the parameters as needed
l2_switch_top #(
.NUM_PORTS (4),
.ING_FIFO_DEPTH (256),
.EGR_FIFO_DEPTH (256),
.EGR_STORE_FWD (1)
) u_switch (
.clk(clk), .rst_n_async(rst_n),
.rx_data(rx_data), .rx_sop(rx_sop), .rx_eop(rx_eop), .rx_valid(rx_valid), .rx_ready(rx_ready),
.tx_data(tx_data), .tx_sop(tx_sop), .tx_eop(tx_eop), .tx_valid(tx_valid), .tx_ready(tx_ready),
.table_ready(table_ready),
.cnt_rx_frames(), .cnt_tx_frames(), .cnt_runts(), .cnt_vlan_frames(),
.cnt_filtered(), .cnt_rx_stall(), .cnt_tx_stall()
);
Wait for table_ready (about 128 cycles at the default table size) before sending traffic.
Then run powershell -ExecutionPolicy Bypass -File .\setup.ps1. It stops at the first error and is safe to run again. Servers and tests aren't started; it lists them at the end. Read it first.
Needs Git: winget install Git.Git
git clone https://github.com/TharinduHimantha/Minimal-Network-Switch-Verilog-Implementation.git cd Minimal-Network-Switch-Verilog-Implementation
Run these in Git Bash (installed with Git) or WSL — not PowerShell. Do the README instructions above first.
./run_sim.sh # 4-port system test + MAC aging test ./run_sim.sh 8 # same system test with NUM_PORTS = 8
The steps run shell scripts (.sh). Use Git Bash (winget install Git.Git) or WSL2 (wsl --install).
No reports for Windows yet.
GitManual AI Agent reads the 1 key files and writes a step-by-step guide for Windows. Once written, it's saved for everyone.