CN109474707B - Two-layer protocol design and data transmission method and system based on serial port protocol - Google Patents

Two-layer protocol design and data transmission method and system based on serial port protocol Download PDF

Info

Publication number
CN109474707B
CN109474707B CN201910039311.1A CN201910039311A CN109474707B CN 109474707 B CN109474707 B CN 109474707B CN 201910039311 A CN201910039311 A CN 201910039311A CN 109474707 B CN109474707 B CN 109474707B
Authority
CN
China
Prior art keywords
serial port
protocol
layer
frame
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910039311.1A
Other languages
Chinese (zh)
Other versions
CN109474707A (en
Inventor
李朋
赵鑫鑫
姜凯
于治楼
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Inspur Group Co Ltd
Original Assignee
Inspur Group Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Inspur Group Co Ltd filed Critical Inspur Group Co Ltd
Priority to CN201910039311.1A priority Critical patent/CN109474707B/en
Publication of CN109474707A publication Critical patent/CN109474707A/en
Application granted granted Critical
Publication of CN109474707B publication Critical patent/CN109474707B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/30Definitions, standards or architectural aspects of layered protocol stacks
    • H04L69/32Architecture of open systems interconnection [OSI] 7-layer type protocol stacks, e.g. the interfaces between the data link level and the physical level
    • H04L69/322Intralayer communication protocols among peer entities or protocol data unit [PDU] definitions
    • H04L69/324Intralayer communication protocols among peer entities or protocol data unit [PDU] definitions in the data link layer [OSI layer 2], e.g. HDLC

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Communication Control (AREA)
  • Computer And Data Communications (AREA)

Abstract

The invention discloses a serial port protocol-based two-layer protocol design and data transmission method and system, belonging to the electronic field, aiming at solving the technical problem of how to realize data transmission of more than 8 bits on the basis of a serial port protocol, and the technical scheme is as follows: the method for designing the two-layer protocol based on the serial port protocol comprises the steps of constructing the two-layer protocol by the first layer of native serial port protocol and the second layer of serial port interframe new group protocol. Secondly, a two-layer protocol data transmission method based on a serial port protocol comprises the following steps: s1, configuring an M-bit variable A by the PC end serial port debugging system; s2, N native serial port protocol frames are needed, wherein the N native serial port protocol frames comprise a frame start frame and N-1 data frames; s3, judging whether M is a multiple of 8. The two-layer protocol data transmission system based on the serial port protocol comprises a parameter register, a two-layer protocol encapsulation module, a two-layer protocol analysis module, a serial port sending module, a serial port receiving module and a serial port interface which are designed based on the two-layer protocol of the serial port protocol.

Description

Two-layer protocol design and data transmission method and system based on serial port protocol
Technical Field
The invention relates to the field of electronics, in particular to a serial port protocol-based two-layer protocol design and data transmission method and system.
Background
Serial ports are a very common device communication protocol on computers (not to be confused with Universal serial bus or USB). Most computers contain two serial ports based on RS 232. The serial port is also a universal communication interface for instrument and meter equipment; many GPIB-compatible devices also have an RS-232 port. Meanwhile, the serial port communication protocol can also be used for acquiring data of the remote acquisition equipment.
Serial communication refers to serial sending and receiving bytes by bit. Although slower than byte (byte) parallel communication, the serial port can use one line to transmit data while using another line to receive data, enabling full duplex mode. However, a serial port frame can only transmit 8-bit data, and for data exceeding 8 bits, one serial port frame cannot be completed, so how to realize transmission of data exceeding 8 bits on the basis of a serial port protocol is a technical problem which needs to be solved urgently in the prior art at present.
Patent document CN107347075A discloses a method for converting a serial port protocol into an SNMP protocol, which comprises the following steps: starting the SNMP server; acquiring data corresponding to equipment sent according to a serial port protocol, and sharing the data corresponding to the equipment to a specified memory address; acquiring a device request instruction of an upper computer; obtaining a value corresponding to the request instruction according to the equipment request instruction and the specified address of the memory; and converting the value corresponding to the request instruction according to the SNMP protocol and feeding back the converted value to the upper computer so as to realize conversion from the serial port protocol to the SNMP protocol. But the technical scheme can not realize the data transmission of more than 8 bits on the basis of the serial port protocol.
Disclosure of Invention
The technical task of the invention is to provide a two-layer protocol design and data transmission method and system based on a serial port protocol, so as to solve the problem of how to realize data transmission of more than 8 bits on the basis of the serial port protocol.
The technical task of the invention is realized according to the following mode, the two-layer protocol design method based on the serial port protocol is characterized in that a first layer of native serial port protocol and a second layer of serial port interframe new group protocol form the two-layer protocol, and the transmission of data exceeding 8 bits is realized on the basis of the serial port protocol; the first layer native serial port protocol adopts a serial port protocol for originally transmitting 8bit data, is a bottom layer protocol, ensures the continuous practicability of various existing serial port debugging assistants, and has good compatibility; the new group protocol between the second layer serial port frames breaks the restriction that the original serial port protocol only transmits 8 bits, and 2 or more serial port frames are used as a new protocol frame, so that parameter registers with contents exceeding 8 bits can be configured or read, the requirement that respective system registers read and write at will is met, the existing serial port debugging tool is effectively utilized, and a new protocol assistant does not need to be developed.
Preferably, the native serial port protocol frame comprises a 1-bit start bit, at most 8-bit data bits, a 1-bit check bit and a 1-bit stop bit or a 2-bit stop bit, and the protocol serially transmits no more than 8-bit data.
Preferably, the second layer serial port interframe is newThe group protocol comprises a plurality of native serial port protocol frames, the first native serial port protocol frame of the second layer serial port interframe new group protocol is used for transmitting a 7-bit variable address and a read-write control mark, the variable address is 7 bits, so the second layer serial port interframe new group protocol can be configured with 2 bits7The size of the new group protocol between the second layer serial port frames mainly depends on the bit width of the artificially defined variables.
A two-layer protocol data transmission method based on a serial port protocol comprises the following steps:
s1, configuring an M-bit variable A by the PC end serial port debugging system;
s2, N native serial port protocol frames are needed, wherein the N native serial port protocol frames comprise a frame start frame and N-1 data frames;
s3, S3, judging whether M is a multiple of 8:
if M is not a multiple of 8, b [7:0] { (8-K) 0, A [ M-1:8 (N-2) ] } of the last serial port frame, wherein (N-2) is a quotient of M/8, and K is a remainder of M/8;
and if M is a multiple of 8, (N-1) is a quotient of M/8.
Preferably, the formula of N in step S2 is as follows:
Figure BDA0001946982340000021
the initial frame represents the variable address and the read-write control mark (the mark bit is 0 when the parameter is configured);
the data Frame represents different bits of data of M-bit variable a, such as b [7:0] ═ a [7:0] in UART Frame2, b [7:0] ═ a [15:8] in UART Frame3, and so on.
The system comprises a parameter register, a two-layer protocol packaging module, a two-layer protocol analysis module, a serial port sending module, a serial port receiving module and a serial port interface which are designed based on the two-layer protocol of the serial port protocol, wherein the serial port interface is communicated with the serial port interface of a PC (personal computer) end serial port debugging assistant tool through a serial port line and mutually transmits data; the parameter register transmits data to the two-layer protocol encapsulation module, the two-layer protocol encapsulation module transmits data to the serial port sending module, the serial port sending module transmits data to the serial port interface, the serial port interface transmits data to the serial port receiving module, the serial port receiving module transmits data to the two-layer protocol analysis module, the two-layer protocol analysis module transmits data to the parameter register, and a closed data transmission channel is formed by the parameter register, the two-layer protocol encapsulation module, the two-layer protocol analysis module, the serial port sending module, the serial port interface and the serial port receiving module.
Preferably, the parameter register is used for transmitting data of more than 8 bits based on a two-layer protocol of a serial port protocol;
the two-layer protocol encapsulation module is used for controlling the serial port sending module and controlling the time and data sent by the serial port sending module;
the two-layer protocol analysis module is used for analyzing the two-layer protocol and analyzing the original serial port data analyzed by the serial port receiving module;
the serial port sending module is used for sending an original serial port protocol frame;
the serial port receiving module is used for analyzing the received original serial port protocol frame;
the serial port interface is used for communicating the serial port interface of the PC end serial port debugging assistant tool and transmitting data mutually.
Preferably, the data transmission system uses a hardware description language HDL to develop FPGA/ASIC hardware design codes, and the serial port uses a PC port serial port debugging assistant tool to perform variable reading and variable configuration on the developed FPGA/ASIC hardware.
Preferably, the steps of the parameter register, the two-layer protocol encapsulation module, the two-layer protocol analysis module, the serial port sending module, the serial port interface and the serial port receiving module forming a closed data transmission channel for data transmission are as follows:
(1) after passing through a two-layer protocol encapsulation module, the parameter register sends an original serial port protocol frame to a serial port interface through a serial port sending module;
(2) the serial port receiving module receives the original serial port protocol Frame, the serial port receiving module analyzes the original serial port protocol Frame, and then the result data is sent to the two-layer protocol analyzing module for two-layer protocol analysis, if b 7 of UART Frame1 is 0, the Frame data of the next analysis is stored in the corresponding parameter data bit;
(3) when a serial port debugging assistant tool at the PC end reads the numerical value of the variable A, only a UART Frame1 is needed to be sent, wherein b [6:0] is the address of the variable A which is manually allocated, and at the moment, a read-write control mark b [7] is set to be 1, which represents that the PC is a variable with the address of b [6:0] in a parameter register needing to be read;
(4) the parameter register analyzes the original serial port protocol according to the UART Frame1 sent by the PC end serial port debugging assistant tool to obtain b 7:0, and then the b 7 obtained by the parameter register is analyzed by the two-layer protocol analysis module, at this time, the b 7 obtained by the parameter register is 1, which represents that the parameter with the variable address of b 6:0 is sent to the PC end serial port debugging assistant tool through the serial port sending module, and the number of the sent original serial port protocol frames is the same as the method when the variable is configured.
The two-layer protocol design and data transmission method and system based on the serial port protocol have the following advantages that:
the invention carries out secondary development on the basis of the serial port protocol to realize a more friendly two-layer protocol, improves the limitation that the serial port protocol can only read and write 8bit, is compatible with the current serial port debugging tool, has the characteristics of strong practicability, simple and convenient implementation and the like, and has wide application prospect;
the first layer protocol of the invention is formed by the original serial port protocol for transmitting 8bit data, and the bottom layer protocol adopts the original serial port protocol to ensure the continuous practicability of the prior various serial port debugging assistants, so that the compatibility is good;
and (III) the second layer protocol breaks the limit that the original serial port protocol only transmits 8 bits, and takes 2 or more serial port frames as a new protocol frame, so that parameter registers with the content exceeding 8 bits can be configured or read, the requirements of random reading and writing of respective system registers are met, the existing PC-side serial port debugging assistant tool is effectively utilized, and a new protocol assistant does not need to be developed.
Drawings
The invention is further described below with reference to the accompanying drawings.
FIG. 1 is a schematic diagram of example 2;
fig. 2 is a schematic structural diagram of a two-layer protocol data transmission system based on a serial port protocol.
Detailed Description
The two-layer protocol design and data transmission method and system based on the serial port protocol according to the present invention will be described in detail with reference to the drawings and specific embodiments of the specification.
Example 1:
the invention relates to a serial port protocol-based two-layer protocol design method, which comprises the steps that a first layer of native serial port protocol and a second layer of serial port inter-frame new group protocol form a two-layer protocol, and the transmission of data exceeding 8 bits is realized on the basis of the serial port protocol; the first layer protocol adopts the original serial port protocol for transmitting 8bit data, and the bottom layer protocol adopts the original serial port protocol, so that the continuous practicability of the conventional various serial port debugging assistants is ensured, and the compatibility is good; the native serial port protocol frame comprises a 1-bit start bit, at most 8-bit data bits, a 1-bit check bit and a 1-bit stop bit or a 2-bit stop bit, and the protocol transmits no more than 8-bit data in serial; the new group protocol between the second layer serial port frames breaks the restriction that the original serial port protocol only transmits 8 bits, and 2 or more serial port frames are used as a new protocol frame, so that parameter registers with contents exceeding 8 bits can be configured or read, the requirement that respective system registers read and write at will is met, the existing serial port debugging tool is effectively utilized, and a new protocol assistant does not need to be developed. The second-layer serial inter-frame new group protocol comprises a plurality of native serial protocol frames, the first native serial protocol frame of the second-layer serial inter-frame new group protocol is used for transmitting a 7-bit variable address and a read-write control mark, the variable address is 7 bits, so that 27 to 128 variables can be configured in the second-layer serial inter-frame new group protocol, each variable comprises a plurality of native serial protocol frames, and the size of the second-layer serial inter-frame new group protocol mainly depends on the width of a variable bit defined by people.
Example 2:
as shown in fig. 1, the number of serial frames is determined according to the amount of contents to be transmitted by the serial port. For example, to transmit 12 bits of data to the register, a first frame of serial port frame may be first sent, where 8 bits of data in the frame respectively represent a 7-bit variable address (128 different parameters may be configured by a two-layer protocol) and are read-write identification bits (0 is write and 1 is read), a second frame of serial port frame sends lower 8 bits of data in the register, and a third frame of serial port frame sends upper 4 bits of the register, where 4 bits of the serial port frame are redundant bits. Here, the address is not limited to be represented by one frame of serial frame, and the extension can be performed in the case of a large number of variables, for example, 15 bits of the previous 2 frames of serial frames represent variable addresses, and 16 th bits represent read/write bits. As shown in the above example, once the first frame of serial port is received at the receiving end, it can be determined that the next 2 frames of serial port are all different bits configured with the same parameter according to the address. After the 2 frames of serial port frames after the address frame is received, the received frame of serial port frame is the address and read-write information of another parameter.
Example 3:
the invention relates to a two-layer protocol data transmission method based on a serial port protocol, which comprises the following steps:
s1, configuring an M-bit variable A by the PC end serial port debugging system;
s2, N native serial port protocol frames are needed, wherein the N native serial port protocol frames comprise a frame start frame and N-1 data frames; wherein,
Figure BDA0001946982340000051
the initial frame represents the variable address and the read-write control mark (the mark bit is 0 when the parameter is configured); the data Frame represents different bits of data of M-bit variable a, such as b [7:0] ═ a [7:0] in UART Frame2, b [7:0] ═ a [15:8] in UART Frame3, and so on.
S3, S3, judging whether M is a multiple of 8:
if M is not a multiple of 8, b [7:0] { (8-K) 0, A [ M-1:8 (N-2) ] } of the last serial port frame, wherein (N-2) is a quotient of M/8, and K is a remainder of M/8;
and if M is a multiple of 8, (N-1) is a quotient of M/8.
Example 4:
as shown in fig. 2, in the serial port protocol-based two-layer protocol data transmission system of the present invention, a hardware description language HDL is used to develop FPGA/ASIC hardware design codes, and a serial port uses a PC port serial port debug assistant tool to perform variable reading and variable configuration on the developed FPGA/ASIC hardware. The system comprises a parameter register, a two-layer protocol encapsulation module, a two-layer protocol analysis module, a serial port sending module, a serial port receiving module and a serial port interface which are designed based on a two-layer protocol of a serial port protocol, wherein the serial port interface is communicated with a serial port interface of a PC (personal computer) end serial port debugging assistant tool through a serial port line and mutually transmits data; the parameter register transmits data to the two-layer protocol encapsulation module, the two-layer protocol encapsulation module transmits data to the serial port sending module, the serial port sending module transmits data to the serial port interface, the serial port interface transmits data to the serial port receiving module, the serial port receiving module transmits data to the two-layer protocol analysis module, the two-layer protocol analysis module transmits data to the parameter register, and a closed data transmission channel is formed by the parameter register, the two-layer protocol encapsulation module, the two-layer protocol analysis module, the serial port sending module, the serial port interface and the serial port receiving module. The parameter register is used for transmitting data exceeding 8 bits based on a two-layer protocol of a serial port protocol; the two-layer protocol encapsulation module is used for controlling the serial port sending module and controlling the time and data sent by the serial port sending module; the two-layer protocol analysis module is used for analyzing the two-layer protocol and analyzing the original serial port data analyzed by the serial port receiving module; the serial port sending module is used for sending an original serial port protocol frame; the serial port receiving module is used for analyzing the received original serial port protocol frame; the serial port interface is used for communicating the serial port interface of the PC end serial port debugging assistant tool and transmitting data mutually. The steps of the parameter register, the two-layer protocol encapsulation module, the two-layer protocol analysis module, the serial port sending module, the serial port interface and the serial port receiving module forming a closed data transmission channel for data transmission are as follows:
(1) after passing through a two-layer protocol encapsulation module, the parameter register sends an original serial port protocol frame to a serial port interface through a serial port sending module;
(2) the serial port receiving module receives the original serial port protocol Frame, the serial port receiving module analyzes the original serial port protocol Frame, and then the result data is sent to the two-layer protocol analyzing module for two-layer protocol analysis, if b 7 of UART Frame1 is 0, the Frame data of the next analysis is stored in the corresponding parameter data bit;
(3) when a serial port debugging assistant tool at the PC end reads the numerical value of the variable A, only a UART Frame1 is needed to be sent, wherein b [6:0] is the address of the variable A which is manually allocated, and at the moment, a read-write control mark b [7] is set to be 1, which represents that the PC is a variable with the address of b [6:0] in a parameter register needing to be read;
(4) the parameter register analyzes the original serial port protocol according to the UART Frame1 sent by the PC end serial port debugging assistant tool to obtain b 7:0, and then the b 7 obtained by the parameter register is analyzed by the two-layer protocol analysis module, at this time, the b 7 obtained by the parameter register is 1, which represents that the parameter with the variable address of b 6:0 is sent to the PC end serial port debugging assistant tool through the serial port sending module, and the number of the sent original serial port protocol frames is the same as the method when the variable is configured.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

Claims (6)

1. A two-layer protocol design method based on a serial port protocol is characterized in that a first layer of native serial port protocol and a second layer of serial port interframe new group protocol form the two-layer protocol, and the transmission of data exceeding 8 bits is realized on the basis of the serial port protocol; the first layer of native serial port protocol adopts a serial port protocol for originally transmitting 8bit data; the new group protocol between the second layer serial port frames breaks the limit that the original serial port protocol only transmits 8 bits, and 2 or more serial port frames are used as a new protocol frame, so that a parameter register with the content exceeding 8 bits can be configured or read;
the second layer serial port inter-frame new group protocol comprises a plurality of native serial port protocol frames, the first native serial port protocol frame of the second layer serial port inter-frame new group protocol is used for transmitting a 7-bit variable address and a read-write control mark, the variable address is 7 bits, and therefore the second layer serial port inter-frame new group protocol can be configured with 2 bits7Each variable comprises a plurality of native serial port protocol frames, and the size of a new group protocol between the second layer of serial port frames mainly depends on the bit width of the artificially defined variable;
the two-layer protocol data transmission method based on the serial port protocol comprises the following steps:
s1, configuring an M-bit variable A by the PC end serial port debugging system;
s2, N native serial port protocol frames are needed, wherein the N native serial port protocol frames comprise a frame start frame and N-1 data frames; wherein, the formula of the frame number N is as follows:
Figure FDA0002818283950000011
the initial frame represents a variable address and a read-write control mark;
the data frame represents different bits of data of the M-bit variable A;
s3, judging whether M is a multiple of 8:
if M is not a multiple of 8, b [7:0] { (8-K) 0, A [ M-1:8 (N-2) ] } of the last serial port frame, wherein (N-2) is a quotient of M/8, and K is a remainder of M/8;
and if M is a multiple of 8, (N-1) is a quotient of M/8.
2. The serial-protocol-based two-layer protocol design method according to claim 1, wherein the native serial protocol frame comprises a 1-bit start bit, at most 8-bit data bits, a 1-bit check bit and a 1-bit stop bit or a 2-bit stop bit, and the protocol serially transfers no more than 8-bit data.
3. The two-layer protocol data transmission system based on the serial port protocol is characterized by comprising a parameter register, a two-layer protocol encapsulation module, a two-layer protocol analysis module, a serial port sending module, a serial port receiving module and a serial port interface which are designed based on the two-layer protocol of the serial port protocol, wherein the serial port interface is communicated with the serial port interface of a PC (personal computer) end serial port debugging assistant tool through a serial port line and mutually transmits data; the parameter register transmits data to the two-layer protocol encapsulation module, the two-layer protocol encapsulation module transmits data to the serial port sending module, the serial port sending module transmits data to the serial port interface, the serial port interface transmits data to the serial port receiving module, the serial port receiving module transmits data to the two-layer protocol analysis module, the two-layer protocol analysis module transmits data to the parameter register, and a closed data transmission channel is formed by the parameter register, the two-layer protocol encapsulation module, the two-layer protocol analysis module, the serial port sending module, the serial port interface and the serial port receiving module;
the method for implementing the system is as follows:
the first layer of native serial port protocol and the second layer of serial port inter-frame new group protocol form a two-layer protocol, and the transmission of data exceeding 8 bits is realized on the basis of the serial port protocol; the first layer of native serial port protocol adopts a serial port protocol for originally transmitting 8bit data; the new group protocol between the second layer serial port frames breaks the limit that the original serial port protocol only transmits 8 bits, and 2 or more serial port frames are used as a new protocol frame, so that a parameter register with the content exceeding 8 bits can be configured or read; the second layer serial inter-frame new group protocol comprises a plurality of native serial protocol frames, the first native serial protocol frame of the second layer serial inter-frame new group protocol is used for transmitting a 7-bit variable address and a read-write control mark, the variable address is 7 bits, so that the second layer serial inter-frame new group protocol can be configured with 2 bits7Each variable comprises a plurality of native serial port protocol frames, and the size of a new group protocol between the second layer of serial port frames mainly depends on the bit width of the artificially defined variable; the method comprises the following specific steps:
s1, configuring an M-bit variable A by the PC end serial port debugging system;
s2, N native serial port protocol frames are needed, wherein the N native serial port protocol frames comprise a frame start frame and N-1 data frames; wherein, the formula of the frame number N is as follows:
Figure FDA0002818283950000031
the initial frame represents a variable address and a read-write control mark;
the data frame represents different bits of data of the M-bit variable A;
s3, judging whether M is a multiple of 8:
if M is not a multiple of 8, b [7:0] { (8-K) 0, A [ M-1:8 (N-2) ] } of the last serial port frame, wherein (N-2) is a quotient of M/8, and K is a remainder of M/8;
and if M is a multiple of 8, (N-1) is a quotient of M/8.
4. The serial protocol-based two-layer protocol data transmission system according to claim 3, wherein the parameter register is used for transmitting data exceeding 8 bits based on the two-layer protocol of the serial protocol;
the two-layer protocol encapsulation module is used for controlling the serial port sending module and controlling the time and data sent by the serial port sending module;
the two-layer protocol analysis module is used for analyzing the two-layer protocol and analyzing the original serial port data analyzed by the serial port receiving module;
the serial port sending module is used for sending an original serial port protocol frame;
the serial port receiving module is used for analyzing the received original serial port protocol frame;
the serial port interface is used for communicating the serial port interface of the PC end serial port debugging assistant tool and transmitting data mutually.
5. The two-layer protocol data transmission system based on the serial port protocol according to claim 3 or 4, wherein the data transmission system uses a hardware description language HDL to develop FPGA/ASIC hardware design codes, and the serial port uses a PC-end serial port debugging assistant tool to perform variable reading and variable configuration on the developed FPGA/ASIC hardware.
6. The two-layer protocol data transmission system based on the serial port protocol according to claim 5, wherein the parameter register, the two-layer protocol encapsulation module, the two-layer protocol analysis module, the serial port sending module, the serial port interface and the serial port receiving module form a closed data transmission channel for data transmission, and the steps of the data transmission are as follows:
(1) after passing through a two-layer protocol encapsulation module, the parameter register sends an original serial port protocol frame to a serial port interface through a serial port sending module;
(2) the serial port receiving module receives the original serial port protocol Frame, the serial port receiving module analyzes the original serial port protocol Frame, and then the result data is sent to the two-layer protocol analyzing module for two-layer protocol analysis, if b 7 of UART Frame1 is 0, the Frame data of the next analysis is stored in the corresponding parameter data bit;
(3) when a serial port debugging assistant tool at the PC end reads the numerical value of the variable A, only a UART Frame1 is needed to be sent, wherein b [6:0] is the address of the variable A which is manually allocated, and at the moment, a read-write control mark b [7] is set to be 1, which represents that the PC is a variable with the address of b [6:0] in a parameter register needing to be read;
(4) the parameter register analyzes the original serial port protocol according to the UART Frame1 sent by the PC end serial port debugging assistant tool to obtain b 7:0, and then the b 7 obtained by the parameter register is analyzed by the two-layer protocol analysis module, at this time, the b 7 obtained by the parameter register is 1, which represents that the parameter with the variable address of b 6:0 is sent to the PC end serial port debugging assistant tool through the serial port sending module, and the number of the sent original serial port protocol frames is the same as the method when the variable is configured.
CN201910039311.1A 2019-01-16 2019-01-16 Two-layer protocol design and data transmission method and system based on serial port protocol Active CN109474707B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910039311.1A CN109474707B (en) 2019-01-16 2019-01-16 Two-layer protocol design and data transmission method and system based on serial port protocol

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910039311.1A CN109474707B (en) 2019-01-16 2019-01-16 Two-layer protocol design and data transmission method and system based on serial port protocol

Publications (2)

Publication Number Publication Date
CN109474707A CN109474707A (en) 2019-03-15
CN109474707B true CN109474707B (en) 2021-02-02

Family

ID=65678755

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910039311.1A Active CN109474707B (en) 2019-01-16 2019-01-16 Two-layer protocol design and data transmission method and system based on serial port protocol

Country Status (1)

Country Link
CN (1) CN109474707B (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101145899A (en) * 2006-09-15 2008-03-19 华为技术有限公司 MAC secure network communication method and network device
CN101262486A (en) * 2008-04-18 2008-09-10 清华大学 Modbus bus analysis system based on built-in platform
KR20080097941A (en) * 2007-05-02 2008-11-06 이노베이티브 소닉 리미티드 Method and related apparatus for handling packet discard in a wireless communications system
CN101964737A (en) * 2010-11-08 2011-02-02 国电南瑞科技股份有限公司 Protocol conversion device based on PROFIBUS-DP master station field bus
CN101969498A (en) * 2010-08-31 2011-02-09 浙江大学 Braille short message printing equipment
CN202257553U (en) * 2011-04-08 2012-05-30 昆明华奥航星电气有限公司 Protocol converter for converting universal serial port to MODBUS
CN103064817A (en) * 2012-12-21 2013-04-24 桂林电子科技大学 Simplified two-line serial data bus transport method
CN106375161A (en) * 2016-12-06 2017-02-01 中国电子科技集团公司第四十研究所 10-gigabit Ethernet tester
CN106896803A (en) * 2017-04-24 2017-06-27 成都雅骏新能源汽车科技股份有限公司 A kind of CCP calibration systems of the processor of compatible 16BIT
CN107547574A (en) * 2017-10-31 2018-01-05 哈尔滨工业大学 A kind of communication system and method based on puppy parc

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101145899A (en) * 2006-09-15 2008-03-19 华为技术有限公司 MAC secure network communication method and network device
KR20080097941A (en) * 2007-05-02 2008-11-06 이노베이티브 소닉 리미티드 Method and related apparatus for handling packet discard in a wireless communications system
CN101262486A (en) * 2008-04-18 2008-09-10 清华大学 Modbus bus analysis system based on built-in platform
CN101969498A (en) * 2010-08-31 2011-02-09 浙江大学 Braille short message printing equipment
CN101964737A (en) * 2010-11-08 2011-02-02 国电南瑞科技股份有限公司 Protocol conversion device based on PROFIBUS-DP master station field bus
CN202257553U (en) * 2011-04-08 2012-05-30 昆明华奥航星电气有限公司 Protocol converter for converting universal serial port to MODBUS
CN103064817A (en) * 2012-12-21 2013-04-24 桂林电子科技大学 Simplified two-line serial data bus transport method
CN106375161A (en) * 2016-12-06 2017-02-01 中国电子科技集团公司第四十研究所 10-gigabit Ethernet tester
CN106896803A (en) * 2017-04-24 2017-06-27 成都雅骏新能源汽车科技股份有限公司 A kind of CCP calibration systems of the processor of compatible 16BIT
CN107547574A (en) * 2017-10-31 2018-01-05 哈尔滨工业大学 A kind of communication system and method based on puppy parc

Also Published As

Publication number Publication date
CN109474707A (en) 2019-03-15

Similar Documents

Publication Publication Date Title
KR101832797B1 (en) A method, apparatus and system for performing management component transport protocol (mctp) communications with a universal serial bus (usb) device
CN101262304B (en) A data stream parsing method based on universal communication data format
CN114048164B (en) Chip interconnection method, system, device and readable storage medium
CN113626360B (en) Low-speed MIPI observation type SOC chip and operation method thereof
CN104156333A (en) FPGA-based UART multi-interface extension system and method
CN110851388A (en) Debugging system and debugging signal transmission method for RISC-V processor
CN113114707B (en) Rule filtering method for power chip Ethernet controller
CN108462620B (en) Gilbert-level SpaceWire bus system
CN112052010A (en) ICD byte order automatic conversion method
CN115357535A (en) Virtual serial port design method and device
CN110401586A (en) A kind of bus communication, device, equipment and readable storage medium storing program for executing
CN112565036B (en) Data transmission method, device, storage medium and communication system
CN109474707B (en) Two-layer protocol design and data transmission method and system based on serial port protocol
CN117056249A (en) MDIO-to-AHB conversion method, system, equipment and medium
CN117539807A (en) Data transmission method, related equipment and storage medium
TWI727581B (en) Data transmission system
CN113608889A (en) Message data processing method, device, equipment and storage medium
CN112416843A (en) Backboard communication equipment, control method thereof and storage medium
CN112015425A (en) Data storage method, data reading device, electronic equipment and storage medium
CN107317773B (en) On-chip network communication interface and communication method
CN115695176A (en) Method for configuring physical interface chip and related device
CN114625610B (en) Multichannel space bus monitoring method based on single time axis transmission
WO2023097903A1 (en) Message transmission method and apparatus, electronic device, and storage medium
CN214795911U (en) Data type control circuit and circuit board
CN115037809B (en) Industrial wireless gateway system supporting multiple protocols

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20210106

Address after: No. 1036, Shandong high tech Zone wave road, Ji'nan, Shandong

Applicant after: INSPUR GROUP Co.,Ltd.

Address before: 250100 First Floor of R&D Building 2877 Kehang Road, Sun Village Town, Jinan High-tech Zone, Shandong Province

Applicant before: JINAN INSPUR HI-TECH INVESTMENT AND DEVELOPMENT Co.,Ltd.

GR01 Patent grant
GR01 Patent grant