Synchronous serial port device based on FPGA
By designing a synchronous serial port device based on FPGA, using register configuration module, sending FIFO module, sending state machine and receiving FIFO module, the problem of high parallel transmission costs is solved, and efficient synchronous serial port communication is realized, suitable for large data transmission.
Patent Information
- Application Number
- CN202420062774.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Utility models(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-10
- Publication Date
- 2024-12-06
- Estimated Expiration
- 2034-01-10
AI Technical Summary
The communication cost of existing parallel transmission devices is high, resulting in low data transmission efficiency.
A synchronous serial port device based on FPGA is designed, including a register configuration module, a sending FIFO module, a sending state machine, a receiving FIFO module and a receiving state machine. Through these modules, synchronous serial port communication is realized, reducing communication costs and improving transmission efficiency.
It realizes a synchronous serial communication method with simple circuit and low cost. The number of bits transmitted by information is almost unlimited. It is suitable for the transmission of large data volumes and has high communication efficiency.
Smart Images

Figure CN222125744U_ABST
Abstract
Description
Technical Field
[0001] The utility model relates to the technical field of synchronous serial communication, and in particular discloses a synchronous serial port device based on FPGA. Background Art
[0002] Parallel transmission refers to the transmission of data in groups on multiple parallel channels at the same time. In the transmission, multiple data bits are transmitted between devices at the same time. However, parallel transmission has high communication costs. Each bit of transmission requires a separate channel support. Therefore, if a character contains 8 binary bits, parallel transmission requires 8 independent channels to support it.
[0003] Therefore, the high communication cost of the existing parallel transmission device is a technical problem that needs to be solved urgently. Utility Model Content
[0004] The utility model provides a synchronous serial port device based on FPGA, aiming to solve the technical problem of high communication cost in the existing parallel transmission device.
[0005] The utility model relates to a synchronous serial port device based on FPGA, comprising a register configuration module, a sending FIFO module, a sending state machine, a receiving FIFO module and a receiving state machine, wherein the register configuration module is connected with the sending state machine through the sending FIFO module, and the register configuration module is connected with the receiving state machine through the receiving FIFO module.
[0006] Furthermore, the register configuration module includes a shift register, a read data register, a write data register and a CPU, and the CPU is connected to the shift register, the read data register and the write data register respectively.
[0007] Furthermore, the register configuration module includes an FPGA chip.
[0008] Furthermore, the model of the FPGA chip is FMQL45T900.
[0009] Furthermore, the sending FIFO module includes a sending FIFO chip.
[0010] Furthermore, the receiving FIFO module includes a receiving FIFO chip.
[0011] Furthermore, the models of the transmitting FIFO chip and the receiving FIFO chip are both JMAX4754.
[0012] Furthermore, the sending state machine includes a sending state machine chip.
[0013] Furthermore, the receiving state machine includes a receiving state machine chip.
[0014] Furthermore, the models of the transmitting state machine chip and the receiving state machine chip are both JM3096W.
[0015] The beneficial effects achieved by the utility model are:
[0016] The utility model provides a synchronous serial port device based on FPGA, which adopts a register configuration module, a transmission FIFO module, a transmission state machine, a reception FIFO module and a reception state machine, wherein the register configuration module is connected to the transmission state machine through the transmission FIFO module, the register configuration module is connected to the reception state machine through the reception FIFO module, the register configuration module is used to send data to the transmission FIFO module and start the transmission state machine; and is also used to read data sent by the reception state machine from the reception FIFO module. The synchronous serial port device based on FPGA provided by the utility model has a simple circuit and low cost; adopts the communication mode of the synchronous serial port, the number of bits of information transmitted is almost unlimited, the data transmitted in one communication is from dozens to thousands of bytes, the communication efficiency is high, and it is suitable for the transmission of large amounts of data. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 This is a functional module diagram of the FPGA-based synchronous serial port device of the utility model;
[0018] Figure 2 This is a system block diagram of the FPGA-based synchronous serial port device of the utility model;
[0019] Figure 3 This is a circuit diagram of a register configuration module in a synchronous serial port device based on FPGA of the utility model;
[0020] Figure 4 It is a circuit diagram of a sending FIFO module and a receiving FIFO module in a synchronous serial port device based on FPGA of the utility model;
[0021] Figure 5 The utility model is a circuit diagram of a sending state machine and a receiving state machine in a synchronous serial port device based on FPGA.
[0022] Description of Figure Numbers:
[0023] 10. Register configuration module; 20. Send FIFO module; 30. Send state machine; 40. Receive FIFO module; 50. Receive state machine. DETAILED DESCRIPTION
[0024] In order to better understand the above technical solution, the above technical solution will be described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0025] like Figure 1 and Figure 2 As shown, the first embodiment of the utility model proposes a synchronous serial port device based on FPGA, including a register configuration module 10, a transmission FIFO module 20, a transmission state machine 30, a reception FIFO module 40 and a reception state machine 50, wherein the register configuration module 10 is connected to the transmission state machine 30 through the transmission FIFO module 20, and the register configuration module 10 is connected to the reception state machine 50 through the reception FIFO module 40. The register configuration module 10 is used to send data to the transmission FIFO module 20 and start the transmission state machine 30; it is also used to read the data sent by the reception state machine 50 from the reception FIFO module 40. In this embodiment, the register configuration module 10, the transmission FIFO module 20, the transmission state machine 30, the reception FIFO module 40 and the reception state machine 50 can all adopt existing functional modules, and are all within the protection scope of this patent.
[0026] Further, see Figures 1 to 5 In the synchronous serial port device based on FPGA proposed in this embodiment, the register configuration module includes a shift register, a read data register, a write data register and a CPU, and the CPU is connected to the shift register, the read data register and the write data register respectively. The shift register is used for data storage, data movement and data operation under the control of the CPU. The read data register is used for data read operation under the control of the CPU. The write data register is used for data write operation under the control of the CPU.
[0027] Preferably, see Figures 1 to 5 In the synchronous serial port device based on FPGA proposed in this embodiment, the register configuration module 10 includes an FPGA chip, and the model of the FPGA chip used is FMQL45T900. The sending FIFO module includes a sending FIFO chip. The receiving FIFO module includes a receiving FIFO chip. In this embodiment, the models of the sending FIFO chip and the receiving FIFO chip are both JMAX4754. The sending state machine includes a sending state machine chip. The receiving state machine includes a receiving state machine chip. In this embodiment, the models of the sending state machine chip and the receiving state machine chip are both JM3096W.
[0028] like Figures 1 to 5 As shown, the synchronous serial port device based on FPGA provided in this embodiment has the following working principle:
[0029] The synchronous serial port device based on FPGA mainly consists of a register configuration module 10 (SYNC_ConfigReg32), a transmit FIFO module 20 (TX_FIFO), a transmit state machine 30 (TX_STATE), a receive FIFO module 40 (RX_FIFO and a receive state machine 50 (RX_STATE).
[0030] Register configuration module 10: used to configure the interface baud rate, configure the transmission data frame length, configure the frame header and frame tail, write the transmission data to the transmission FIFO module 20 (TX_FIFO), start the transmission state machine 30, register the transmission state machine working status, and read the reception data from the reception FIFO module 40 (RX_FIFO).
[0031] Transmit FIFO module 20: buffers transmit data.
[0032] Sending state machine 30: implements the interface data sending logic.
[0033] Receiving FIFO module 40: buffers receiving data.
[0034] Receiving state machine 50: implements the interface data receiving logic.
[0035] The CPU groups the data in a frame format and writes the data into the write data register of the register configuration module 10 through the Local Bus. The register configuration module 10 writes the data into the transmit FIFO module 20 (TX_FIFO), writing one byte at a time. After writing a frame of data, the transmit state machine 30 (TX_STATE) is turned on. The transmit state machine 30 (TX_STATE) starts working and takes the data out of the transmit FIFO module 20 (TX_FIFO) in sequence and sends it out.
[0036] When the receiving state machine 50 (RX_STATE) detects that the data line is pulled low, it stores the data in the shift register. After receiving 4 bytes of data, it determines whether it is a frame header. If so, the received data is written byte by byte into the receiving FIFO module 40 (RX_FIFO). When the remaining amount of the receiving FIFO module 40 (RX_FIFO) reaches the threshold set by the software, an interrupt is triggered, and the CPU takes the data out of the FIFO module 40 (RX_FIFO) by reading the read data register of the register configuration module 10.
[0037] The FPGA-based synchronous serial port device provided in this embodiment, compared with the prior art, adopts a register configuration module, a transmission FIFO module, a transmission state machine, a reception FIFO module and a reception state machine, wherein the register configuration module is connected to the transmission state machine through the transmission FIFO module, the register configuration module is connected to the reception state machine through the reception FIFO module, the register configuration module is used to send data to the transmission FIFO module and start the transmission state machine; and is also used to read the data sent by the reception state machine from the reception FIFO module. The FPGA-based synchronous serial port device provided in this embodiment has a simple circuit and low cost; the synchronous serial port communication mode is adopted, the number of bits of information transmitted is almost unlimited, the data transmitted in one communication is from dozens to thousands of bytes, the communication efficiency is high, and it is suitable for the transmission of large amounts of data.
[0038] The FPGA-based synchronous serial port device provided in this embodiment, compared with the prior art, adopts a register configuration module, a transmission FIFO module, a transmission state machine, a reception FIFO module and a reception state machine, wherein the register configuration module is connected to the transmission state machine through the transmission FIFO module, the register configuration module is connected to the reception state machine through the reception FIFO module, the register configuration module is used to send data to the transmission FIFO module and start the transmission state machine; and is also used to read the data sent by the reception state machine from the reception FIFO module. The FPGA-based synchronous serial port device provided in this embodiment has a simple circuit and low cost; the synchronous serial port communication mode is adopted, the number of bits of information transmitted is almost unlimited, the data transmitted in one communication is from dozens to thousands of bytes, the communication efficiency is high, and it is suitable for the transmission of large amounts of data.
[0039] Although preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they are aware of the basic creative concepts. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention. Obviously, those skilled in the art may make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
Claims
1. A synchronous serial port device based on FPGA, characterized in that: The invention comprises a register configuration module (10), a transmission FIFO module (20), a transmission state machine (30), a reception FIFO module (40) and a reception state machine (50), wherein the register configuration module (10) is connected to the transmission state machine (30) via the transmission FIFO module (20), and the register configuration module (10) is connected to the reception state machine (50) via the reception FIFO module (40).
2. The synchronous serial port device based on FPGA as claimed in claim 1, characterized in that: The register configuration module (10) comprises a shift register, a read data register, a write data register and a CPU, wherein the CPU is connected to the shift register, the read data register and the write data register respectively.
3. The synchronous serial port device based on FPGA as claimed in claim 2, characterized in that: The register configuration module (10) comprises an FPGA chip.
4. The synchronous serial port device based on FPGA as claimed in claim 3, characterized in that: The model of the FPGA chip is FMQL45T900.
5. The synchronous serial port device based on FPGA as claimed in claim 1, characterized in that: The sending FIFO module (20) comprises a sending FIFO chip.
6. The synchronous serial port device based on FPGA as claimed in claim 5, characterized in that: The receiving FIFO module (40) comprises a receiving FIFO chip.
7. The synchronous serial port device based on FPGA as claimed in claim 6, characterized in that: The models of the transmitting FIFO chip and the receiving FIFO chip are both JMAX4754.
8. The synchronous serial port device based on FPGA as claimed in claim 1, characterized in that: The sending state machine (30) comprises a sending state machine chip.
9. The synchronous serial port device based on FPGA as claimed in claim 8, characterized in that: The receiving state machine (50) comprises a receiving state machine chip.
10. The synchronous serial port device based on FPGA as claimed in claim 9, characterized in that: The models of the sending state machine chip and the receiving state machine chip are both JM3096W.
