Composition of serial port server
The serial port server is mainly composed of three major modules: the main processor module, the Ethernet interface and control module, and the serial port data processing module.
(1) Main processor module
The main functions completed by this module are: establishing a data link between serial data and Ethernet IP data; realizing the reception and sending of IP data packets by controlling the reading and writing of the Ethernet control chip; identifying serial data The format of the stream , completes the selection of the serial port device and the specification of the serial data stream format; controls the rate between the serial port data stream and the IP data packet, buffers the data; reads the registers of the UART and Ethernet control chips AND operation , and store and forward device status; complete the serial/parallel conversion of 16-bit bus data; complete the bus address latch function; complete the chip select function of each serial port and each storage device; complete the status determination of the interrupt port of each serial port and other functions.
(2) Ethernet interface and control module
The Ethernet interface part completes the functions of the interface circuit between the mid-port server and the Ethernet network. The controller controls all modules, so that the entire interface circuit can coordinate with subsequent circuits to complete the Ethernet transceiver function. The Ethernet control part consists of the receiving end and the transmitting end. Between them there is an Ethernet status detection and control unit and a transceiver coordination controller, which are used to monitor the status of the Ethernet at any time and control the Ethernet as needed. At the same time, It is necessary to coordinate the working status of the internal receiving/transmitting circuit. The status of the interface is sent to the transceiver coordination controller, and then the control signal of the coordination controller is processed and sent to the controller of the Ethernet interface to control the status of the interface. At the receiving end, the received serial data stream signal is converted and encoded through the main processor module, and the Ethernet control unit is used to control the coordination of various parts, and the generated address, data, and write signals are sent to the RAM for reading Write to the control unit for processing. Correspondingly, the workflow of the originating end is opposite to that of the ending end.
(3) Serial data processing module
This module mainly completes the status collection of serial port devices, the reception of serial data streams and the decoding/packaging of data formats. The main processor module reads and writes the corresponding registers, determines the idle state of the connected serial port devices, and establishes the The communication connection sends back the control data frame to the main processor. After receiving the control signal, the main processor decides whether to send or receive the data stream.
Palavras-chave: servidor de porta série