## 1 Introduction  
In industrial applications, such as automation, communications between computers and machines are critical, and any flaw can damage an entire system. Many of these communications are based on Ethernet networks, working at Gigabit speeds and having some protocols developed specifically for industrial communications, like EtherCAT and PROFINET [1]. Since these communications are crucial to many systems, they need to be as reliable as possible. This has inspired the creation of redundant protocols that could bring zero-delay network reconfiguration [2]. The Parallel Redundancy Protocol (PRP) and High-Availability Seamless Redundancy (HSR) are two redundant protocols introduced by the IEC 62439-3 standard [3]. Both protocols have a duplicated network but different topologies: the PRP uses a double local area network (LAN), while HSR uses a ring topology. Every packet sent will be duplicated on the network; this means that, if a flaw occurs in a network, the packet can still be delivered by the other one. These duplicated packets can be handled by Ethernet switches, which need to discard the second copies. A redundant Ethernet switch,named RedBox (Redundant Box), can be used to attach any non-redundant device to a PRP/HSR network, executing the PRP/HSR protocol for them. Field-programmable gate arrays (FPGAs) have multiple possible applications. Their reconfiguration characteristics make them suited for industrial Ethernet switch implementation [4]. FPGAs can be low-cost implementation platforms for real-time Ethernet switches [5]. Additionally, the network conditions of real-time Ethernet communications can be diagnosed by FPGA-based instruments [6]. In [7], a ring network adapter was implemented in an FPGA, whereas, in [8], an FPGA implementation of a real-time network adapter, serving as an Ethernet bridge, was presented. The evolution of FPGAs continues with the improvement of hardware resources like analog resources, floating point arithmetic, embedded processors, and hard memory control, as well as software development, including the availability of many IP cores that can simplify the design of complex systems [9]. This constant evolution positions FPGAs as an interesting option in terms of cost-performance, and they are used to implement controllers in many industrial areas, like robotic applications, power electronics, and drive applications. The main goal of this work was the development of an open-source Ethernet switch implementing the PRP protocol, filling a gap in existing implementations. To make this possible without developing a switch from scratch, multiple open-source projects related to network communications and switches were analyzed, and one was selected to be used as a basis for development. Besides implementing the PRP protocol, the proposed Ethernet switch should also be capable of working as a non-redundant switch. The developed switch was named REDSwitch, and its source code is available online at [[https://github.com/[PERSON]/RedSwitch](https://github.com/[PERSON]/RedSwitch)]([https://github.com/[PERSON]/RedSwitch](https://github.com/[PERSON]/RedSwitch)) (accessed on 5 February 2025). It supports the IPv4 protocol and the IEEE 802.1Q norm and implements the PRP protocol. Developed in Verilog and SystemVerilog, it is, as far as we know, the only open-source Switch implementing any of the redundant protocols (PRP or HSR). This paper is divided into five sections, having the following structure. Section 2 addresses some redundant switches available on the market and some open-source projects related to switches and networking and justifies the selection of the one that was used as a starting point. In Section 3, the proposed switch is described, along with how it differs from the open-source switch that was used as a starting point and with the developments in the used hash table. In Section 4, several simulations performed on the Ethernet parser, the hash table, and the complete switch are presented and discussed. Finally, Section 5 presents the conclusions and future work.