
“With the improvement of computer performance and the increase of communication volume, the traditional local area network has exceeded its own load more and more, and the switched Ethernet technology came into being, which greatly improved the performance of the local area network. Network switches can significantly increase bandwidth and can build geographically dispersed networks. Each port of the LAN switch can transmit information in parallel, safely and in real time, and has stable performance, flexible structure, easy installation and management, and can well meet the needs of enterprise networks and telecom operators for broadband access.
“
1 Introduction
With the improvement of computer performance and the increase of communication volume, the traditional local area network has exceeded its own load more and more, and the switched Ethernet technology came into being, which greatly improved the performance of the local area network. Network switches can significantly increase bandwidth and can build geographically dispersed networks. Each port of the LAN switch can transmit information in parallel, safely and in real time, and has stable performance, flexible structure, easy installation and management, and can well meet the needs of enterprise networks and telecom operators for broadband access.
2 Hardware Design of Network Switches
With the demand for security and high bandwidth in network applications, network switches are becoming more and more widely used. The switch adopts the ROX bus of the AL101 chip, and connects three 8-port switching chips to form a 24-port switch, which meets the user’s demand for multiple switching ports.
2.1 Circuit performance requirements
The high-speed PCB circuit board of the switch has relatively high requirements on EMC and ESD. It uses high-speed clocks of 75MHz and 50MHz. The precision of the crystal oscillator is less than 50PPM. At the same time, the clock needs to be sent to different chips through the clock distribution circuit. The phase difference between the distributed clocks is less than 2ns.
The switch has 24 10/100M adaptive ports, and each port can achieve wire-speed switching. According to user needs, the port can be set to 10/100M rate, full/half duplex, flow control, static MAC address, mirroring, VLAN, etc.
2.2 The principle block diagram of the switch
The switching technology of this switch adopts the store-and-forward mode, which is mainly composed of five parts: interface unit, switching unit, management unit, light Display unit and power interface unit. Its block diagram is shown in Figure 1.
After the RJ45 interface receives the data packet of the Ethernet frame structure, it is sent to the PHY (physical interface chip) after transformer isolation and impedance matching. In this chip, the conversion of the analog signal to the digital signal of the RMII interface is completed, and the link status is obtained. , conflict, information is too long, speed and other information.
The data enters the switching chip (composed of three chips, forming a loop through the ROX bus, which can complete the exchange of data between the three chips), the switching chip will obtain the destination address and source address of the data, and perform the Ethernet frame processing. Error checking. The switching chip saves the source address in its own MAC address table, and then matches the destination address with the address in the MAC address table to obtain the corresponding port to which the data will be forwarded. If the destination port is in the same switch chip, the data is taken from SGRAM and forwarded to the corresponding port; if the destination port is not in the same switch chip, the data is transmitted to the corresponding switch chip through the ROX bus, and then forwarded; If the corresponding destination address is not found in the MAC address table, the frame is forwarded to all ports belonging to the same VLAN except the source port or to a certain upstream port (related to the setting of the switch chip register). The Display of the light is given by the PHY. Through the display of the light, you can observe the working rate, connection and data transmission and reception of each port.
During each power-on or reset, the switch chip first reads the content of the external EEPROM to initialize and configure the switch chip registers. The content of the switch chip register can be read and written through the PC’s management program or the PC’s hyperterminal, so as to control or read the working configuration of the switch.
3 Software Design of Network Switch
The software of the whole network switch system includes the control software of the microcontroller, the EEPROM configuration data and the management program of the PC. The control software of the MCU mainly completes the reading and writing of the registers and the communication with the PC. Through this management unit, the switch can be configured into various working modes to meet the needs of different users.
The switch chip is connected to the EEPROM (24C02) through the I2C bus to save the configuration data. When the device is powered on or reset, the device will read these data from the EEPROM for system initialization. The management program of the PC is that the user connects the serial port of the PC with the system equipment, and can easily configure the system through the management program interface of the PC.
3.1 Software design of microcontroller control
The management unit is composed of a single-chip microcomputer and a serial port, and the registers of the EEPROM or the exchange chip are configured through the PC. The single-chip microcomputer mainly completes the reading and writing of registers and the communication with the PC. The serial port acts as a connection with the PC. There is also a level conversion chip between the microcontroller and the serial port to complete the connection between the microcontroller and the PC. conversion of signals. Through the management unit, the switch can be configured into various working modes to meet the needs of different users, such as: 10/100M rate setting, full/half duplex setting, flow control, static MAC address setting, mirror setting, broadcast storm control , VLAN settings, etc. The software flow of the microcontroller is shown in Figure 2.
The modules are described as follows:
main – the main program;
init_uart – serial port initialization;
delay – system delay;
helpMenu – help menu;
systemCheck – check the system device ID;
whict>:——command prompt (whict is the abbreviation of Wuhan Institute of Chemical Technology);
D——View the entire configuration data of the system;
E——Edit the configuration data of the system;
F——Configure and manage various functions of the switch;
R——Read the configuration data of the system;
W——The system saves the current configuration data to EEPROM;
L——Configuration of system static MAC address;
M – change the password of the system;
I——System software reset;
S – The system downloads the default configuration to the EEPROM.
3.2 Management program design of PC
The management program of the PC is programmed in VB language and has an easy-to-understand software interface. Users can easily configure network switches. The management program of the PC is shown in Figure 3, and the interface of the switch management software is shown in Figure 4.
4 Performance testing of network switches
The switch was tested for 12 hours at room temperature (25°C). The test instrument was Smartbits2000. A total of 4 items of permeability, delay, packet loss rate, and back-to-back were measured. The test results are listed in Table 1.
The Links: FF900R12IE4 DD110F-160 IGBTMODULE