CN114221903B - Data transmission method and device - Google Patents

Data transmission method and device Download PDF

Info

Publication number
CN114221903B
CN114221903B CN202111444609.4A CN202111444609A CN114221903B CN 114221903 B CN114221903 B CN 114221903B CN 202111444609 A CN202111444609 A CN 202111444609A CN 114221903 B CN114221903 B CN 114221903B
Authority
CN
China
Prior art keywords
frame
data
data request
operation type
lvds bus
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
CN202111444609.4A
Other languages
Chinese (zh)
Other versions
CN114221903A (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.)
New H3C Technologies Co Ltd Hefei Branch
Original Assignee
New H3C Technologies Co Ltd Hefei Branch
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 New H3C Technologies Co Ltd Hefei Branch filed Critical New H3C Technologies Co Ltd Hefei Branch
Priority to CN202111444609.4A priority Critical patent/CN114221903B/en
Publication of CN114221903A publication Critical patent/CN114221903A/en
Application granted granted Critical
Publication of CN114221903B publication Critical patent/CN114221903B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/60Router architectures
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/004Arrangements for detecting or preventing errors in the information received by using forward error control
    • H04L1/0056Systems characterized by the type of code used
    • H04L1/0061Error detection codes

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Bus Control (AREA)
  • Small-Scale Networks (AREA)

Abstract

The application provides a data transmission method and a device, wherein the method is applied to a main control board in routing equipment, an LVDS bus is arranged between the main control board and any line card board in the routing equipment, and the method comprises the following steps: when detecting that an idle frame exists in the LVDS bus and target data needs to be read/written on any line card board, sending a starting frame to the line card board through the LVDS bus, so that the line card board stops sending the idle frame when receiving the starting frame; after the start frame is sent, a data request frame is sent to the line card board through the LVDS bus, so that the line card board performs related read/write operations based on the received data request frame. According to the method and the device, data transmission between the main control board and the line card board in the routing equipment is achieved through the LVDS bus, fewer pin resources can be occupied, and therefore PCB space is saved.

Description

Data transmission method and device
Technical Field
The present disclosure relates to the field of communications technologies, and in particular, to a data transmission method and apparatus.
Background
At present, a main control board in the routing equipment generally performs data transmission with a line card board in the routing equipment through a LocalBus so as to realize the function of managing the line card board. However, the LocalBus requires 8/16 data lines and several address lines and control lines, which not only takes a long time for communication, but also occupies many pin resources, i.e. occupies more space on the printed circuit board (Printed Circuit Board, PCB).
Disclosure of Invention
In order to overcome the problems in the related art, the application provides a data transmission method and device.
According to a first aspect of embodiments of the present application, there is provided a data transmission method applied to a main control board in a routing device, a low voltage differential signaling (Low Voltage Differential Signaling, LVDS) bus being provided between the main control board and any one of the line cards in the routing device, the method including:
when detecting that the LVDS bus has an idle frame and target data need to be read/written on any line card board, sending a starting frame to the line card board through the LVDS bus, so that the line card board stops sending the idle frame when receiving the starting frame;
after the initial frame is sent, a data request frame is sent to the line card board through the LVDS bus, so that the line card board judges whether the operation type carried in the data request frame is a writing operation type or a reading operation type after receiving the data request frame, when the judging result is the writing operation type, a target carried in the data request frame is written into a storage space corresponding to a storage address carried in the data request frame, and after target data is successfully written, an idle frame is sent to the LVDS bus; and when the judgment result is the read operation type, reading target data from a storage space corresponding to a storage address carried in the data request frame, sending a data response frame carrying the read target data to the main control board through the LVDS bus, and sending an idle frame on the LVDS bus after sending the data response frame.
According to a second aspect of embodiments of the present application, there is provided a data transmission method, where the method is applied to any line card board in a routing device, and an LVDS bus is disposed between the line card board and a main control board in the routing device, and the method includes:
stopping sending an idle frame when receiving a start frame sent by the main control board through the LVDS bus, wherein the start frame is sent by the main control board when detecting that the LVDS bus has the idle frame and target data need to be read/written on the line card board;
receiving a data request frame sent by the main control board through the LVDS bus, wherein the data request frame is sent by the main control board after the initial frame is sent through the LVDS bus;
judging whether the operation type carried in the data request frame is a writing operation type or a reading operation type;
when the judgment result is the writing operation type, writing target data carried in the data request frame into a storage space corresponding to a storage address carried in the data request frame, and after the target data is successfully written, sending an idle frame on the LVDS bus;
and when the judgment result is the read operation type, reading target data from a storage space corresponding to a storage address carried in the data request frame, sending a data response frame carrying the read target data to the main control board through the LVDS bus, and sending an idle frame on the LVDS bus after sending the data response frame.
According to a third aspect of the embodiments of the present application, there is provided a data transmission apparatus, the apparatus is applied to a main control board in a routing device, a low voltage differential signaling LVDS bus is provided between the main control board and any one of the line cards in the routing device, the apparatus includes:
the first transmission module is used for sending a start frame to the line card board through the LVDS bus when the existence of an idle frame of the LVDS bus is detected and target data needs to be read/written on any line card board, so that the line card board stops sending the idle frame when receiving the start frame;
the second transmission module is used for sending a data request frame to the line card board through the LVDS bus after the first transmission module sends the initial frame, so that the line card board judges whether the operation type carried in the data request frame is a write operation type or a read operation type after receiving the data request frame, writes a target carried in the data request frame into a storage space corresponding to a storage address carried in the data request frame when the judging result is the write operation type, and sends an idle frame on the LVDS bus after successfully writing target data; and when the judgment result is the read operation type, reading target data from a storage space corresponding to a storage address carried in the data request frame, sending a data response frame carrying the read target data to the main control board through the LVDS bus, and sending an idle frame on the LVDS bus after sending the data response frame.
According to a fourth aspect of embodiments of the present application, there is provided a data transmission apparatus, the apparatus being applied to any line card board in a routing device, an LVDS bus being provided between the line card board and a main control board in the routing device, the apparatus including:
the transmission stopping module is used for stopping transmitting an idle frame when receiving a start frame transmitted by the main control board through the LVDS bus, wherein the start frame is transmitted by the main control board when detecting that the LVDS bus has the idle frame and the main control board needs to read/write target data on the line card board;
the receiving module is used for receiving a data request frame sent by the main control board through the LVDS bus, wherein the data request frame is sent by the main control board after the start frame is sent by the main control board through the LVDS bus;
the judging module is used for judging whether the operation type carried in the data request frame is a writing operation type or a reading operation type;
the data writing module is used for writing the target data carried in the data request frame into a storage space corresponding to a storage address carried in the data request frame when the judging result of the judging module is a writing operation type, and sending an idle frame on the LVDS bus after the target data is successfully written;
And the data reading module is used for reading target data from a storage space corresponding to a storage address carried in the data request frame when the judging result of the judging module is a read operation type, sending a data response frame carrying the read target data to the main control board through the LVDS bus, and sending an idle frame on the LVDS bus after sending the data response frame.
The technical scheme provided by the embodiment of the application can comprise the following beneficial effects:
in the embodiment of the application, the main control board in the routing equipment and any wire clamping board do not use the LocalBus bus to transmit data, but transmit read/write data through the LVDS bus, and the LVDS bus only has 6 wires, so that fewer pin resources can be occupied, and the PCB space is saved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description, serve to explain the principles of the application.
Fig. 1 is a schematic flow chart of a data transmission method according to an embodiment of the present application;
FIG. 2 is a second flow chart of a data transmission method according to the embodiment of the present application;
fig. 3 is a schematic structural diagram of a data transmission device according to an embodiment of the present application;
fig. 4 is a second schematic structural diagram of a data transmission device according to an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present application as detailed in the accompanying claims.
The terminology used in the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the present application. As used in this application and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any or all possible combinations of one or more of the associated listed items.
It should be understood that although the terms first, second, third, etc. may be used herein to describe various information, these information should not be limited by these terms. These terms are only used to distinguish one type of information from another. For example, a first message may also be referred to as a second message, and similarly, a second message may also be referred to as a first message, without departing from the scope of the present application. The word "if" as used herein may be interpreted as "at … …" or "at … …" or "responsive to a determination", depending on the context.
Next, embodiments of the present application will be described in detail.
The embodiment of the application provides a data transmission method, which is applied to a main control board in a routing device, wherein an LVDS bus is arranged between the main control board and any line card board in the routing device, as shown in fig. 1, the method can comprise the following steps:
and S11, when the idle frame exists in the LVDS bus and the target data needs to be read/written on any line card board, sending a starting frame to the line card board through the LVDS bus, so that the line card board stops sending the idle frame when receiving the starting frame.
S12, after a start frame is sent, a data request frame is sent to the line card board through the LVDS bus, so that the line card board judges whether an operation type carried in the data request frame is a write operation type or a read operation type after receiving the data request frame, when a judgment result is the write operation type, target data carried in the data request frame are written into a storage space corresponding to a storage address carried in the data request frame, and after the target data are successfully written, an idle frame is sent on the LVDS bus; and when the judgment result is the reading operation type, reading target data from a storage space corresponding to a storage address carried in the data request frame, sending a data response frame carrying the read target data to the main control board through the LVDS bus, and sending an idle frame on the LVDS bus after sending the data response frame.
It should be noted that, in this embodiment of the present application, in order to implement data transmission between the main control board and any line card board by using the corresponding LVDS bus, initially, the main control board and any line card board all transmit an idle frame on the LVDS bus disposed between the main control board and any line card board, and in this case, the bus states of the LVDS buses maintained by the main control board side and the line card board side are all idle states, that is, initially, the bus states of the LVDS buses maintained by the main control board side and the line card board side are all idle states.
Once the main control board detects that the LVDS bus has an idle frame and needs to read/write target data on the line card board, the main control board can send a start frame to the line card board through the LVDS bus, and the main control board can change the bus state of the local LVDS bus from the idle state to the execution state.
And when the subsequent line card board receives the initial frame, stopping sending an idle frame, waiting for receiving a data frame sent by the main control board, and changing the bus state of the local LVDS bus from the idle state to the waiting state.
Then, after sending the start frame to the line card board, the main control board will continue to send the data request frame to the line card board through the LVDS bus.
In one example, in the case that the operation type carried in the data request frame is a write operation type, the data request frame further carries target data (i.e., data to be written) and a storage address corresponding to the target data.
In this case, once the main control board sends the data request frame to the line card board through the LVDS bus, the data transmission of the data to be written is finished, at this time, the main control board sends an idle frame on the LVDS bus, so that the data to be read/written is continuously sent by using the LVDS bus, and the main control board also changes the bus state of the local LVDS bus from the execution state to the idle state.
Correspondingly, after the line card board receives the data request frame, the bus state of the local LVDS bus is changed from the waiting state to the executing state, and the line card board determines whether the operation type carried in the data request frame is a writing operation type or a reading operation type, and since the operation type carried in the data request frame in this case is a writing operation type, the determination result is a writing operation type, at this time, the line card board writes the target data carried in the data request frame into the storage space corresponding to the storage address carried in the data request frame, and after the target data is successfully written, the writing data operation is finished, at this time, the line card board sends an idle frame on the LVDS bus, so that the main control board can continue to use the LVDS bus to transmit the data to be read/written.
In the case that the operation type carried in the data request frame is the read operation type, the data request frame also carries a storage address corresponding to the target data (i.e., the data to be read).
In this case, after the main control board transmits the data request frame to the line card board through the LVDS bus, the main control board waits for receiving a data response frame for the data request frame transmitted by the line card board, and changes the bus state of the local LVDS bus from the execution state to the waiting state; if the data response frame sent by the line card board aiming at the data request frame is received within a set time length, the main control board can send an idle frame on the LVDS bus after receiving the data response frame, so that the data needing to be read/written can be sent continuously by using the LVDS bus, and the bus state of the local LVDS bus is changed from a waiting state to an idle state; if the data response frame sent by the line card board for the data request frame is not received within the set duration, the main control board also sends an idle frame on the LVDS bus to facilitate the subsequent continuous use of the LVDS bus to send data to be read/written, and the bus state of the local LVDS bus is changed from the waiting state to the idle state.
Here, the set duration may be set according to an actual network requirement of a network where the routing device to which the main control board belongs is located.
Correspondingly, after the line card board receives the data request frame, the bus state of the local LVDS bus is changed from the waiting state to the executing state, and the line card board determines whether the operation type carried in the data request frame is a writing operation type or a reading operation type, because the operation type carried in the data request frame in this case is a reading operation type, the determination result is a reading operation type, at this time, the line card board will read the target data from the storage space corresponding to the storage address carried in the data request frame, then send the data response frame carrying the read target data to the main control board through the LVDS bus, and after the data response frame is sent, this time, the line card board will send an idle frame on the LVDS bus, so that the subsequent main control board can continue to use the LVDS bus to send the data to be read/written, and the bus state of the local LVDS bus is changed from the executing state to the idle state.
In another example, in the case that the operation type carried in the data request frame is a write operation type, the data request frame further carries target data (i.e., data to be written), a storage address corresponding to the target data, and a cyclic redundancy check code (Cyclic Redundancy, CRC).
In this case, once the main control board sends the data request frame to the line card board through the LVDS bus, the data transmission of the data to be written is finished, at this time, the main control board sends an idle frame on the LVDS bus, so that the data to be read/written is continuously sent by using the LVDS bus, and the main control board also changes the bus state of the local LVDS bus from the execution state to the idle state.
Accordingly, after the line card receives the data request frame, the line card performs CRC check on the data request frame, and changes the bus state of the local LVDS bus from the waiting state to the check state.
And if the verification result is that the data request frame passes, the line card board changes the bus state of the local LVDS bus from the verification state to the execution state, and judges whether the operation type carried in the data request frame is a write operation type or a read operation type, and because the operation type carried in the data request frame in this case is a write operation type, the judgment result is a write operation type, at this time, the line card board writes the target data carried in the data request frame into a storage space corresponding to a storage address carried in the data request frame, and after the target data is successfully written, the writing data operation is finished this time, at this time, the line card board sends an idle frame on the LVDS bus so that the subsequent master control board can continue to use the LVDS bus to send data needing to be read/written, and the line card board also changes the bus state of the local LVDS bus from the execution state to the idle state.
If the verification result is that the data is not passed, the line card board changes the bus state of the local LVDS bus from the verification state to the waiting state, continues to wait for receiving the data request frame sent by the main control board through the LVDS bus until the set waiting time is reached, and sends an idle frame on the LVDS bus until the main control board does not receive the data request frame sent by the main control board through the LVDS bus, so that the follow-up main control board can continuously use the LVDS bus to send data to be read/written, and the bus state of the local LVDS bus is changed from the waiting state to the idle state.
Here, the waiting duration may also be set according to an actual network requirement of a network where the routing device to which the main control board belongs is located.
The same CRC calculation method and verification method are configured on the main control board and any one of the line cards in advance. In this way, when the line card board performs CRC check on the data request frame, the configured CRC calculation mode and the configured CRC check mode may be adopted to perform CRC check.
For example, assuming that the CRC carried in the data request frame is obtained by calculating the target data according to a preset checking algorithm by the main control board, when the line card board performs CRC checking on the data request frame after receiving the data request frame, the line card board calculates the target data carried in the data request frame according to the preset checking algorithm to obtain a CRC; then the line card board compares whether the CRC calculated by the line card board is consistent with the CRC carried in the data request frame; and when the comparison results are consistent, the line card plate judges that the verification result is passed, and when the comparison results are inconsistent, the line card plate judges that the verification result is not passed. In the case that the operation type carried in the data request frame is the read operation type, the data request frame also carries a storage address and a CRC corresponding to the target data (i.e., the data to be read).
In this case, the main control board waits to receive a data response frame for the data request frame transmitted by the line card board after transmitting the data request frame to the line card board through the LVDS bus, and changes the bus state of the local LVDS bus from the execution state to the waiting state.
If the data response frame sent by the line card board and aiming at the data request frame is received in the set time, the main control board performs CRC check on the data response frame and changes the bus state of the local LVDS bus from the waiting state to the check state. The specific process of CRC checking the data response frame by the main control board is similar to the above-mentioned process of CRC checking the data request frame by the line card board, which is not described in detail herein.
And if the verification result is that the read data operation is passed, the main control board sends an idle frame on the LVDS bus at the moment so as to facilitate the subsequent continuous use of the LVDS bus to send data to be read/written, and the bus state of the local LVDS bus is changed from the verification state to the idle state.
If the verification result is that the data does not pass, the main control board continues to wait to receive the data response frame sent by the line card board until the data response frame sent by the line card board is not received after the set time length is reached, and then sends an idle frame on the LVDS bus, so that the data needing to be read/written can be sent by using the LVDS bus continuously, and the bus state of the local LVDS bus is changed from the verification state to the idle state.
If the data response frame sent by the line card board for the data request frame is not received within the set time, the main control board also sends an idle frame on the LVDS bus to facilitate the subsequent continuous use of the LVDS bus to send data to be read/written, and the bus state of the local LVDS bus is changed from the waiting state to the idle state.
Accordingly, after the line card receives the data request frame, the line card performs CRC check on the data request frame, and changes the bus state of the local LVDS bus from the waiting state to the check state.
And if the verification result is that the data is passed, the line card board changes the bus state of the local LVDS bus from the verification state to the execution state, and the line card board judges whether the operation type carried in the data request frame is a write operation type or a read operation type, and since the operation type carried in the data request frame in this case is a read operation type, the judgment result is a read operation type, at this time, the line card board reads target data from a storage space corresponding to a storage address carried in the data request frame, then sends a data response frame carrying the read target data to the main control board through the LVDS bus, and after the data response frame is sent, the line card board sends an idle frame on the LVDS bus, so that the subsequent main control board can continue to use the LVDS bus to send data to be read/written, and the bus state of the local LVDS bus is changed from the execution state to the idle state.
If the verification result is that the data is not passed, the line card board changes the bus state of the local LVDS bus from the verification state to the waiting state, continues to wait for receiving the data request frame sent by the main control board through the LVDS bus until the preset waiting time is reached, and sends an idle frame on the LVDS bus, so that the subsequent main control board can continuously use the LVDS bus to send the data to be read/written, and the bus state of the local LVDS bus is changed from the waiting state to the idle state.
The embodiment of the application also provides a data transmission method, which is applied to any line card board in the routing equipment, wherein an LVDS bus is arranged between the line card board and a main control board in the routing equipment, as shown in fig. 2, the method can comprise the following steps:
s21, stopping sending the idle frame when receiving the initial frame sent by the main control board through the LVDS bus.
In this step, the start frame is sent by the main control board when it detects that the LVDS bus has an idle frame and it needs to read/write the target data on the line card board.
S22, receiving a data request frame sent by the main control board through the LVDS bus.
In this step, the data request frame is sent by the main control board after the start frame is sent through the LVDS bus.
S23, judging whether the operation type carried in the data request frame is a writing operation type or a reading operation type; when the judgment result is the writing operation type, executing step S24; when the determination result is the read operation type, step S25 is executed.
And S24, writing the target data carried in the data request frame into a storage space corresponding to a storage address carried in the data request frame, and after the target data is successfully written, transmitting an idle frame on the LVDS bus.
S25, reading target data from a storage space corresponding to a storage address carried in the data request frame, sending a data response frame carrying the read target data to the main control board through the LVDS bus, and sending an idle frame on the LVDS bus after sending the data response frame.
Specifically, in the step S22, a CRC may be carried in the data request frame.
In this case, the line card may further perform the following operations before performing the above step S23:
performing CRC on the data request frame;
when the verification result is passed, executing the step of judging whether the operation type carried in the data request frame is a writing operation type or a reading operation type;
And when the verification result is that the data request frame does not pass, continuing to wait for receiving the data request frame sent by the main control board through the LVDS bus until the set waiting time is reached, and sending an idle frame on the LVDS bus when the data request frame sent by the main control board through the LVDS bus is not received yet.
It should be noted that, the specific checking process of the line card board for performing CRC check on the data request frame has been described in detail when the station describes the data transmission method on the main control board side, and will not be described in detail here.
The waiting time can be set according to the actual network requirement of the network where the routing equipment of the main control board belongs.
It should be further noted that, in this embodiment of the present application, initially, the main control board and the line card board both send idle frames on the LVDS bus disposed between the main control board and the line card board, and the bus states of the LVDS bus maintained by the main control board side and the line card board side are all idle states. The change of the bus state of the latter two is described in detail when the data transmission method is described at the master control board side, and will not be described in detail here.
According to the technical scheme, in the embodiment of the application, the LocalBus bus is not used for data transmission between the main control board and any wire card board in the routing equipment, but the LVDS bus is used for data transmission in reading/writing, and as the LVDS bus has only 6 wires, fewer pin resources can be occupied, and therefore PCB space is saved.
Based on the same inventive concept, the application also provides a data transmission device, the device is applied to a main control board in a routing device, a Low Voltage Differential Signaling (LVDS) bus is arranged between the main control board and any one of the line cards in the routing device, and the structure schematic diagram is shown in fig. 3, and specifically comprises:
the first transmission module 31 is configured to send a start frame to a line card board through the LVDS bus when it is detected that an idle frame exists in the LVDS bus and target data needs to be read/written on any line card board, so that the line card board stops sending the idle frame when receiving the start frame;
the second transmission module 32 is configured to send a data request frame to the line card board through the LVDS bus after the first transmission module 31 sends the start frame, so that the line card board determines whether an operation type carried in the data request frame is a write operation type or a read operation type after receiving the data request frame, writes a target carried in the data request frame into a storage space corresponding to a storage address carried in the data request frame when the determination result is the write operation type, and sends an idle frame on the LVDS bus after successfully writing target data; and when the judgment result is the read operation type, reading target data from a storage space corresponding to a storage address carried in the data request frame, sending a data response frame carrying the read target data to the main control board through the LVDS bus, and sending an idle frame on the LVDS bus after sending the data response frame.
Preferably, the second transmission module 32 is further configured to:
when the operation type carried in the data request frame is a write operation type, after the data request frame is sent to the line card board through the LVDS bus, an idle frame is sent to the LVDS bus;
when the operation type carried in the data request frame is a read operation type, after the data request frame is sent to the line card board through the LVDS bus, if the data response frame is received within a set time length, an idle frame is sent on the LVDS bus after the data response frame is received; and if the data response frame is not received within the set time length, transmitting an idle frame on the LVDS bus.
Preferably, the apparatus further comprises:
a checking module (not shown in fig. 3) configured to, when the operation type carried in the data request frame is a read operation type and the data request frame also carries a CRC, perform a CRC check on the data response frame after receiving the data response frame; when the verification result is that the second transmission module 32 passes, triggering the second transmission module to execute the step of sending the idle frame on the LVDS bus; and when the verification result is that the data response frame does not pass, continuing to wait for receiving the data response frame sent by the line card board until the data response frame sent by the line card board is not received after the set time length is reached, and triggering the second transmission module 32 to execute the step of sending an idle frame on the LVDS bus.
The application also provides a data transmission device, the device is applied to any line card board in the routing equipment, an LVDS bus is arranged between the line card board and a main control board in the routing equipment, and the structure schematic diagram is shown in fig. 4, and specifically comprises:
a stop sending module 41, configured to stop sending an idle frame when receiving, through the LVDS bus, a start frame sent by the main control board, where the start frame is sent by the main control board when detecting that the LVDS bus has the idle frame and target data needs to be read/written on the line card;
the receiving module 42 is configured to receive a data request frame sent by the main control board through the LVDS bus, where the data request frame is sent by the main control board after the start frame is sent by the main control board through the LVDS bus;
a judging module 43, configured to judge whether the operation type carried in the data request frame is a write operation type or a read operation type;
the data writing module 44 is configured to write the target data carried in the data request frame into a storage space corresponding to a storage address carried in the data request frame when the determination result of the determination module is a write operation type, and send an idle frame on the LVDS bus after the target data is successfully written;
And the data reading module 45 is configured to read target data from a storage space corresponding to a storage address carried in the data request frame when the judgment result of the judgment module is a read operation type, send a data response frame carrying the read target data to the main control board through the LVDS bus, and send an idle frame on the LVDS bus after sending the data response frame.
Preferably, the apparatus further comprises:
a checking module (not shown in fig. 4) configured to, when the data request frame further carries a CRC, perform a CRC check on the data request frame before determining whether the operation type carried in the data request frame is a write operation type or a read operation type; when the verification result is passed, triggering the judging module 43 to execute the step of judging whether the operation type carried in the data request frame is a writing operation type or a reading operation type; and when the verification result is that the data request frame does not pass, continuing to wait for receiving the data request frame sent by the main control board through the LVDS bus until the set waiting time is reached, and sending an idle frame on the LVDS bus when the data request frame sent by the main control board through the LVDS bus is not received yet.
According to the technical scheme, in the embodiment of the application, the LocalBus bus is not used for data transmission between the main control board and any wire card board in the routing equipment, but the LVDS bus is used for data transmission in reading/writing, and as the LVDS bus has only 6 wires, fewer pin resources can be occupied, and therefore PCB space is saved.
The present embodiment also provides an electronic device, as shown in fig. 5, including a processor 51 and a machine-readable storage medium 52, the machine-readable storage medium 52 storing machine-executable instructions executable by the processor 51, the processor 51 being caused by the machine-executable instructions to: implementing any one of the above data transmission methods.
The machine-readable storage medium may include random access Memory (Random Access Memory, RAM) or Non-Volatile Memory (NVM), such as at least one magnetic disk Memory. In the alternative, the machine-readable storage medium may also be at least one memory device located remotely from the foregoing processor.
The processor may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU), a network processor (Network Processor, NP), etc.; but also digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), field programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
In yet another embodiment provided herein, there is also provided a computer readable storage medium having stored therein a computer program which when executed by a processor implements the steps of any of the data transmission methods described above.
The foregoing description of the preferred embodiments of the present invention is not intended to limit the invention to the precise form disclosed, and any modifications, equivalents, improvements and alternatives falling within the spirit and principles of the present invention are intended to be included within the scope of the present invention.

Claims (10)

1. The data transmission method is characterized by being applied to a main control board in routing equipment, wherein a Low Voltage Differential Signaling (LVDS) bus is arranged between the main control board and any one of the line cards in the routing equipment, and the method comprises the following steps:
when detecting that the LVDS bus has an idle frame and target data need to be read/written on any line card board, sending a starting frame to the line card board through the LVDS bus, so that the line card board stops sending the idle frame when receiving the starting frame;
after the initial frame is sent, a data request frame is sent to the line card board through the LVDS bus, so that the line card board judges whether the operation type carried in the data request frame is a writing operation type or a reading operation type after receiving the data request frame, when the judging result is the writing operation type, target data carried in the data request frame are written into a storage space corresponding to a storage address carried in the data request frame, and after the target data are successfully written, an idle frame is sent to the LVDS bus; and when the judgment result is the read operation type, reading target data from a storage space corresponding to a storage address carried in the data request frame, sending a data response frame carrying the read target data to the main control board through the LVDS bus, and sending an idle frame on the LVDS bus after sending the data response frame.
2. The method of claim 1, wherein when the type of operation carried in the data request frame is a write operation type, the method further comprises:
transmitting an idle frame on the LVDS bus after transmitting the data request frame to the line card board through the LVDS bus;
when the operation type carried in the data request frame is a read operation type, the method further comprises:
after the data request frame is sent to the line card board through the LVDS bus, if the data response frame is received within a set time length, an idle frame is sent on the LVDS bus after the data response frame is received; and if the data response frame is not received within the set time length, transmitting an idle frame on the LVDS bus.
3. The method of claim 2, wherein when the operation type carried in the data request frame is a read operation type and the data request frame further carries a Cyclic Redundancy Check (CRC), the method further comprises:
after receiving the data response frame, performing CRC (cyclic redundancy check) on the data response frame;
when the check result is passed, executing the step of transmitting an idle frame on the LVDS bus;
And when the verification result is that the data response frame does not pass, continuing to wait for receiving the data response frame sent by the line card board until the data response frame sent by the line card board is not received after the set time length is reached, and then executing the step of sending the idle frame on the LVDS bus.
4. The data transmission method is characterized in that the method is applied to any line card board in routing equipment, a Low Voltage Differential Signaling (LVDS) bus is arranged between the line card board and a main control board in the routing equipment, and the method comprises the following steps:
stopping sending an idle frame when receiving a start frame sent by the main control board through the LVDS bus, wherein the start frame is sent by the main control board when detecting that the LVDS bus has the idle frame and target data need to be read/written on the line card board;
receiving a data request frame sent by the main control board through the LVDS bus, wherein the data request frame is sent by the main control board after the initial frame is sent through the LVDS bus;
judging whether the operation type carried in the data request frame is a writing operation type or a reading operation type;
when the judgment result is the writing operation type, writing target data carried in the data request frame into a storage space corresponding to a storage address carried in the data request frame, and after the target data is successfully written, sending an idle frame on the LVDS bus;
And when the judgment result is the read operation type, reading target data from a storage space corresponding to a storage address carried in the data request frame, sending a data response frame carrying the read target data to the main control board through the LVDS bus, and sending an idle frame on the LVDS bus after sending the data response frame.
5. The method of claim 4, wherein the data request frame further carries a Cyclic Redundancy Check (CRC);
before determining whether the operation type carried in the data request frame is a write operation type or a read operation type, the method further includes:
performing CRC on the data request frame;
when the verification result is passed, executing the step of judging whether the operation type carried in the data request frame is a writing operation type or a reading operation type;
and when the verification result is that the data request frame does not pass, continuing to wait for receiving the data request frame sent by the main control board through the LVDS bus until the set waiting time is reached, and sending an idle frame on the LVDS bus when the data request frame sent by the main control board through the LVDS bus is not received yet.
6. The utility model provides a data transmission device, its characterized in that, the device is applied to the main control board in the routing equipment, be provided with low voltage differential signaling LVDS bus between main control board and any one of the line cardboard in the routing equipment, the device includes:
The first transmission module is used for sending a start frame to the line card board through the LVDS bus when the existence of an idle frame of the LVDS bus is detected and target data needs to be read/written on any line card board, so that the line card board stops sending the idle frame when receiving the start frame;
the second transmission module is used for sending a data request frame to the line card board through the LVDS bus after the first transmission module sends the initial frame, so that the line card board judges whether the operation type carried in the data request frame is a write operation type or a read operation type after receiving the data request frame, writes target data carried in the data request frame into a storage space corresponding to a storage address carried in the data request frame when the judging result is the write operation type, and sends an idle frame on the LVDS bus after the target data is successfully written; and when the judgment result is the read operation type, reading target data from a storage space corresponding to a storage address carried in the data request frame, sending a data response frame carrying the read target data to the main control board through the LVDS bus, and sending an idle frame on the LVDS bus after sending the data response frame.
7. The apparatus of claim 6, wherein the second transmission module is further configured to:
when the operation type carried in the data request frame is a write operation type, after the data request frame is sent to the line card board through the LVDS bus, an idle frame is sent to the LVDS bus;
when the operation type carried in the data request frame is a read operation type, after the data request frame is sent to the line card board through the LVDS bus, if the data response frame is received within a set time length, an idle frame is sent on the LVDS bus after the data response frame is received; and if the data response frame is not received within the set time length, transmitting an idle frame on the LVDS bus.
8. The apparatus of claim 7, wherein the apparatus further comprises:
the checking module is used for performing CRC check on the data response frame after the data response frame is received when the operation type carried in the data request frame is a read operation type and the data request frame also carries a CRC; when the verification result is that the idle frame passes, triggering the second transmission module to execute the step of sending the idle frame on the LVDS bus; and when the verification result is that the data response frame does not pass, continuing to wait for receiving the data response frame sent by the line card board until the data response frame sent by the line card board is not received after the set time length is reached, and triggering the second transmission module to execute the step of sending the idle frame on the LVDS bus.
9. The utility model provides a data transmission device, its characterized in that, the device is applied to any line cardboard in routing equipment, is provided with low voltage differential signaling LVDS bus between this line card board and the main control board in the routing equipment, and the device includes:
the transmission stopping module is used for stopping transmitting an idle frame when receiving a start frame transmitted by the main control board through the LVDS bus, wherein the start frame is transmitted by the main control board when detecting that the LVDS bus has the idle frame and the main control board needs to read/write target data on the line card board;
the receiving module is used for receiving a data request frame sent by the main control board through the LVDS bus, wherein the data request frame is sent by the main control board after the start frame is sent by the main control board through the LVDS bus;
the judging module is used for judging whether the operation type carried in the data request frame is a writing operation type or a reading operation type;
the data writing module is used for writing the target data carried in the data request frame into a storage space corresponding to a storage address carried in the data request frame when the judging result of the judging module is a writing operation type, and sending an idle frame on the LVDS bus after the target data is successfully written;
And the data reading module is used for reading target data from a storage space corresponding to a storage address carried in the data request frame when the judging result of the judging module is a read operation type, sending a data response frame carrying the read target data to the main control board through the LVDS bus, and sending an idle frame on the LVDS bus after sending the data response frame.
10. The apparatus of claim 9, wherein the apparatus further comprises:
the checking module is used for performing CRC check on the data request frame before judging whether the operation type carried in the data request frame is a write operation type or a read operation type when the data request frame also carries a CRC (cyclic redundancy check); when the verification result is passed, triggering the judging module to execute the step of judging whether the operation type carried in the data request frame is a writing operation type or a reading operation type; and when the verification result is that the data request frame does not pass, continuing to wait for receiving the data request frame sent by the main control board through the LVDS bus until the set waiting time is reached, and sending an idle frame on the LVDS bus when the data request frame sent by the main control board through the LVDS bus is not received yet.
CN202111444609.4A 2021-11-30 2021-11-30 Data transmission method and device Active CN114221903B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111444609.4A CN114221903B (en) 2021-11-30 2021-11-30 Data transmission method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111444609.4A CN114221903B (en) 2021-11-30 2021-11-30 Data transmission method and device

Publications (2)

Publication Number Publication Date
CN114221903A CN114221903A (en) 2022-03-22
CN114221903B true CN114221903B (en) 2024-03-12

Family

ID=80699075

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111444609.4A Active CN114221903B (en) 2021-11-30 2021-11-30 Data transmission method and device

Country Status (1)

Country Link
CN (1) CN114221903B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114760219B (en) * 2022-04-28 2023-04-14 深圳市晟瑞科技有限公司 Multi-terminal communication method and device, electronic equipment and storage medium
CN117648084B (en) * 2024-01-29 2024-04-30 井芯微电子技术(天津)有限公司 Method, device and readable medium for realizing I2C bottom layer driving

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4841475A (en) * 1985-10-01 1989-06-20 Hitachi, Ltd. Data transfer system and method for channels with serial transfer line
EP1715618A1 (en) * 2004-02-25 2006-10-25 Huawei Technologies Co., Ltd. A networking equipment of broadband accessing and method thereof
WO2016119525A1 (en) * 2015-01-26 2016-08-04 国电南瑞科技股份有限公司 Elastic data interaction integrated bus system
CN106993241A (en) * 2017-03-31 2017-07-28 新华三技术有限公司 A kind of master control borad, fan frame and the network equipment
CN108199941A (en) * 2017-12-29 2018-06-22 北京纳米维景科技有限公司 A kind of CAN bus communication means based on CAN2.0B
CN111200581A (en) * 2018-11-19 2020-05-26 北京华航无线电测量研究所 Data receiving and transmitting module based on LVDS bus
CN111464419A (en) * 2020-04-13 2020-07-28 中国人民解放军国防科技大学 Data transmission control method based on bus network communication
CN112463693A (en) * 2020-12-09 2021-03-09 华东计算技术研究所(中国电子科技集团公司第三十二研究所) Multi-board card communication system and method based on M-LVDS bus

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7243173B2 (en) * 2004-12-14 2007-07-10 Rockwell Automation Technologies, Inc. Low protocol, high speed serial transfer for intra-board or inter-board data communication

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4841475A (en) * 1985-10-01 1989-06-20 Hitachi, Ltd. Data transfer system and method for channels with serial transfer line
EP1715618A1 (en) * 2004-02-25 2006-10-25 Huawei Technologies Co., Ltd. A networking equipment of broadband accessing and method thereof
WO2016119525A1 (en) * 2015-01-26 2016-08-04 国电南瑞科技股份有限公司 Elastic data interaction integrated bus system
CN106993241A (en) * 2017-03-31 2017-07-28 新华三技术有限公司 A kind of master control borad, fan frame and the network equipment
CN108199941A (en) * 2017-12-29 2018-06-22 北京纳米维景科技有限公司 A kind of CAN bus communication means based on CAN2.0B
CN111200581A (en) * 2018-11-19 2020-05-26 北京华航无线电测量研究所 Data receiving and transmitting module based on LVDS bus
CN111464419A (en) * 2020-04-13 2020-07-28 中国人民解放军国防科技大学 Data transmission control method based on bus network communication
CN112463693A (en) * 2020-12-09 2021-03-09 华东计算技术研究所(中国电子科技集团公司第三十二研究所) Multi-board card communication system and method based on M-LVDS bus

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
I~2C总线原理在AM8EB057单片机中的实现;李严;张民;赵卫华;;自动化仪表(第04期);全文 *
low-cost and small footprint solution for testing low-voltage differential signal video displays;Daniel A 等;《IEEE instrumentation & measurement magazine》;全文 *

Also Published As

Publication number Publication date
CN114221903A (en) 2022-03-22

Similar Documents

Publication Publication Date Title
CN114221903B (en) Data transmission method and device
DE102010053281A1 (en) Method and system for error handling in a storage device
CN103631534B (en) Data storage system and managing method thereof
CN109726163A (en) A kind of communication system based on SPI, method, equipment and storage medium
CN110941578B (en) LIO design method and device with DMA function
CN105487937A (en) RDMA (Remote Direct Memory Access) implementation method and device
CN115202943A (en) Data accelerator card, chip test system, method and electronic equipment
JP4001511B2 (en) IC card and control method thereof
JP2007502480A (en) Read access applicable to cache and read allocation of storage circuit
CN111447121B (en) Test method, device, equipment and storage medium of PCIE controller
CN112422485B (en) Communication method and device of transmission control protocol
CN111949585A (en) Data conversion processing method and device
CN104484260A (en) Simulation monitoring circuit based on GJB289 bus interface SoC (system on a chip)
KR20170117326A (en) Direct memory access control device for at least one processing unit having a random access memory
CN102984138A (en) Method, device and system for obtaining object
CN109710187A (en) Read command accelerated method, device, computer equipment and the storage medium of NVMe SSD main control chip
WO2010050957A1 (en) Bit inversion for communication interface
CN113050976B (en) FPGA parallel upgrading method and device based on PCIe bus, medium and electronic equipment
CN108037942B (en) Adaptive data recovery and update method and device for embedded equipment
CN101821718B (en) Method for testing address bus in logic module
CN111371799A (en) Method, device and equipment for controlling data transmission and reception of MCTP (Multi-channel media processing protocol) controller
CN104636081B (en) Data-storage system and its management method
CN113835940B (en) Method, system, equipment and storage medium for setting serial interrupt mode
CN112612732B (en) Circuit device and electronic equipment
CN113839920B (en) Optimization method and system for efficient recognition of vehicle-mounted CarPlay

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
GR01 Patent grant
GR01 Patent grant