A pipeline-based data transmission control method, system and electronic device
By introducing a first-in-first-out (FIFO) memory into the pipeline design, parallel execution of conversion logic processing and write data transfer is achieved, solving the waiting time problem caused by conversion logic processing in the pipeline design and improving data transfer efficiency and system performance.
Patent Information
- Application Number
- CN202310601836.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-24
- Publication Date
- 2026-11-24
- Estimated Expiration
- 2043-05-24
AI Technical Summary
In data transmission systems that employ a pipeline design, the conversion logic processing flow adds more waiting time, leading to a decrease in system performance and an inability to operate at high clock frequencies.
By introducing a first-in-first-out (FIFO) memory between the conversion logic processing flow and the write data transmission, the parallel execution of data conversion logic processing and data write transmission can be achieved, avoiding the waiting time increased by the conversion logic processing.
It improves data transmission efficiency, optimizes data transmission system performance, and enables the system to operate at higher frequencies.
Smart Images

Figure CN116594930B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data transmission technology, and specifically to a pipeline-based data transmission control method, system, and electronic device. Background Technology
[0002] Pipelining is an effective method frequently used to improve the operating speed of a designed system. To ensure fast data transmission, the system must operate at the highest possible frequency. However, if the completion of certain complex logical functions requires a long delay, it becomes difficult for the system to operate at a high frequency. In such cases, pipelining can be used. This involves inserting flip-flops into long-delay logic function blocks, allowing complex logical operations to be completed step-by-step, reducing the delay of each part, and thus increasing the system's operating frequency.
[0003] The pipeline-based data transmission method allows for parallel processing of read and write data. While the current data is being written, the next data is being read synchronously within the same clock cycle. Therefore, completing the read and write of two data items requires at least three cycles. Compared to serial data transmission, the pipeline design effectively reduces latency in the data transmission process, allowing the entire data transmission process to operate at a high clock frequency. However, some practical applications require data conversion logic processing. Even with pipeline technology, it's unavoidable to increase waiting time, significantly increasing timing overhead and degrading the performance of the data transmission system. Summary of the Invention
[0004] In view of this, embodiments of this specification provide a pipeline-based data transmission control method, system, and electronic device, which can improve data transmission efficiency and optimize data transmission system performance.
[0005] In a first aspect, embodiments of this specification provide a pipeline-based data transmission control method, applied to a read / write transmission device, including a read transmission channel, a write transmission channel, and a conversion logic module, the method comprising:
[0006] In the first-stage pipeline, the read transfer channel performs read transfer for the current raw data;
[0007] In the second-stage pipeline, the conversion logic module acquires the current raw data and performs conversion logic on the current raw data to generate intermediate data, the intermediate data including at least one valid data bit;
[0008] During the execution of the conversion logic process, conversion data is selected from the intermediate data and written into the first-in-first-out memory;
[0009] In the third-stage pipeline, when the conversion logic module executes the conversion logic, the write transmission channel sequentially reads at least one valid piece of data from the first-in-first-out memory and performs write transmission.
[0010] This specification also provides a pipeline-based data transmission control system, which is applied to a read / write transmission device and includes a read transmission channel, a write transmission channel, and a conversion logic module. The system includes:
[0011] A read transfer unit is used in the first-stage pipeline to control the read transfer channel to perform read transfer of the current raw data;
[0012] A data conversion unit is used in the second-stage pipeline to control the conversion logic module to obtain the current raw data and perform conversion logic on the current raw data to generate intermediate data, wherein the intermediate data includes at least one valid data bit.
[0013] The data conversion unit is further configured to select converted data from the intermediate data and write it into the first-in-first-out memory during the execution of the conversion logic process; and
[0014] The write transfer unit is used in the third-stage pipeline to control the write transfer channel to sequentially read at least one valid piece of the conversion data from the first-in-first-out memory for write transfer when the conversion logic module executes the conversion logic.
[0015] This specification also provides a pipelined data transmission control electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the pipelined data transmission control method as described in the first aspect.
[0016] As can be seen from the above, the pipeline-based data transmission control method, system, and electronic device provided in the embodiments of this specification have the following beneficial technical effects:
[0017] By setting up a first-in-first-out (FIFO) memory between the conversion logic module of the second-stage pipeline and the write transmission channel of the third-stage pipeline, and using the FIFO memory as an effective data transfer intermediary after the conversion logic processing, it is possible to perform data write transmission operations simultaneously with the data conversion logic processing. This allows the conversion logic processing flow and the write data processing flow to run in parallel, avoiding the additional waiting time caused by the conversion logic processing flow, thereby improving data transmission efficiency and optimizing the performance of the data transmission system. Attached Figure Description
[0018] The features and advantages of the invention will be more clearly understood by referring to the accompanying drawings, which are schematic and should not be construed as limiting the invention in any way. In the drawings:
[0019] Figure 1 This diagram illustrates the timing sequence of serial data transmission in related technologies.
[0020] Figure 2 This diagram illustrates the data transmission timing using a pipeline design in related technologies.
[0021] Figure 3 A schematic diagram of data transmission timing after adding conversion logic to the processing flow in related technologies is shown;
[0022] Figure 4 This specification shows a schematic diagram of a pipeline-based data transmission control method provided by one or more optional embodiments;
[0023] Figure 5 This diagram illustrates a pipeline-based data transmission control method for converting current raw data into intermediate data, as provided in one or more optional embodiments of this specification.
[0024] Figure 6 This diagram illustrates the transmission timing of a pipeline-based data transmission control method provided by one or more optional embodiments of this specification.
[0025] Figure 7 This diagram illustrates a method for controlling a transition logic module using a state machine in a pipeline-based data transmission control method provided by one or more optional embodiments of this specification.
[0026] Figure 8 This illustration shows a state transition diagram of the state machine in a pipeline-based data transmission control method provided by one or more optional embodiments of this specification.
[0027] Figure 9 This diagram illustrates a method for maintaining valid signals and conversion completion signals using a counter in a pipeline-based data transmission control method provided by one or more optional embodiments of this specification.
[0028] Figure 10 This diagram illustrates the changes in valid signals and conversion completion signals in a pipeline-based data transmission control method provided by one or more optional embodiments of this specification.
[0029] Figure 11This diagram illustrates a method for selecting and writing converted data from intermediate data into a first-in-first-out (FIFO) memory in a pipeline-based data transmission control method provided by one or more optional embodiments of this specification.
[0030] Figure 12 This illustration shows the converted data and write transmission data generated by converting raw data with all lower 8 bits set to 1, according to one or more optional embodiments of this specification, based on a pipeline-based data transmission control method.
[0031] Figure 13 This illustration shows a pipeline-based data transmission control method provided by one or more optional embodiments of this specification, which generates converted data and write transmission data by converting only the original data with the lowest bit set to 1.
[0032] Figure 14 This specification shows a schematic diagram of a pipeline-based data transmission control system structure provided by one or more optional embodiments;
[0033] Figure 15 This specification illustrates a schematic diagram of a pipeline-based data transmission control electronic device provided by one or more alternative embodiments. Detailed Implementation
[0034] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0035] Pipelining is an effective method frequently used to improve the operating speed of a designed system. To ensure fast data transmission, the system must operate at the highest possible frequency. However, if the completion of certain complex logical functions requires a long delay, it becomes difficult for the system to operate at a high frequency. In such cases, pipelining can be used. This involves inserting flip-flops into long-delay logic function blocks, allowing complex logical operations to be completed step-by-step, reducing the delay of each part, and thus increasing the system's operating frequency.
[0036] like Figure 1As shown, some related technologies use serial data transmission, meaning that data transmission stops while read data is being transmitted, and vice versa. Therefore, completing the read and write transmission of two data items requires at least four clock cycles. This serial transmission method can only process one process within one clock cycle, resulting in poor system performance and an inability to operate at higher clock frequencies.
[0037] like Figure 2 As shown, the pipeline design allows for parallel processing of read and write data. While the current data is being written, the next data is being read synchronously within the current clock cycle. Therefore, completing the read and write of two data items requires at least three cycles. Compared to serial data transmission, the pipeline design effectively reduces latency in the data transmission process, enabling the entire data transmission process to operate at a high clock frequency.
[0038] However, in some real-world applications, data transformation logic needs to be performed. Even with pipeline technology, this inevitably increases waiting time, significantly increasing timing overhead and degrading data transmission system performance. For example... Figure 3 As shown, after adding a conversion logic processing flow within the read / write transmission process, the number of pipeline stages increases if a pipeline design is continued. While pipeline design can improve the system's operating frequency to some extent, the addition of conversion logic processing flows results in more waiting time, as the next processing flow must wait for the conversion logic flow to complete before proceeding. This leads to a corresponding increase in the timing delay of the entire processing flow, ultimately resulting in unsatisfactory overall system performance.
[0039] To address the aforementioned problems, the purpose of the embodiments in this specification is to propose a pipeline-based data transmission control method. This method employs a first-in-first-out (FIFO) memory for data transfer between the conversion logic processing flow and the write data transmission flow, enabling the conversion logic processing flow and the write data processing flow to run in parallel. This avoids the additional waiting time caused by the conversion logic processing flow, thereby improving data transmission efficiency and optimizing the performance of the data transmission system.
[0040] To achieve the above objectives, one aspect of this specification provides a pipeline-based data transmission control method.
[0041] like Figure 4As shown, one or more optional embodiments of this specification provide a pipelined data transmission control method applied to a read / write transmission device, including a read transmission channel, a write transmission channel, and a conversion logic module. The read transmission channel is used for reading target data, the write transmission channel is used for writing target data, and the conversion logic module is used to execute conversion logic processing for the data read by the read data channel. One memory's read channel can be selected as the read transmission channel, and another memory's write channel can be selected as the write transmission channel. Furthermore, the memory can employ a First-In-First-Out (FIFO) transmitter.
[0042] The method includes:
[0043] S1: In the first-stage pipeline, the read transmission channel performs read transmission for the current raw data.
[0044] During the first clock cycle (CLK), the current raw data (Data1) is read using the read transfer channel.
[0045] S2: In the second-stage pipeline, the conversion logic module obtains the current raw data and performs conversion logic on the current raw data to generate intermediate data, the intermediate data including at least one valid data bit.
[0046] After the current raw data is read through the read transmission channel, i.e., after the read transmission of the current raw data is completed, the conversion logic module Convert obtains the current raw data and executes the conversion logic within the second clock cycle (CLK).
[0047] In some optional real-time methods, the transformation logic module can perform the transformation logic processing flow on the current raw data in the following manner:
[0048] Step (a1): Perform placeholder conversion on the lower 8 bits of the current original data, converting them into 8 write data to form the intermediate data, such as... Figure 5 As shown, the encoding order of the lower 8 bits of the current original data corresponds to the encoding order of the 8 written data in the intermediate data.
[0049] The lower 8 bits of the original data are 01101110, and the 8 written data generated by the conversion are 01110110.
[0050] Step (a2): The lower 8 bits of the current original data are placed as 8 write data flag bits in the highest bit of the intermediate data; in the intermediate data, when the data of the flag bit is 1, the corresponding data bit is a valid data bit, and the write data in the valid data bit is valid data; when the data of the flag bit is 0, the corresponding data bit is an invalid data bit, and the write data in the invalid data bit is invalid data.
[0051] refer to Figure 5 The lower 8 bits of the current original data are used as flag bits for the 8 write data bits. A flag bit of 1 indicates valid data, and a flag bit of 0 indicates invalid data. In the 8 write data bits, bits 2 to 4 "111" and bits 6 and 7 "11" are valid data. Bits 2 to 4 and bits 6 and 7 are the valid data bits.
[0052] In the 8-bit write data, only the first consecutive valid data sequence is selected as the conversion data. This conversion data refers to the data that needs to be written and transferred after processing by the conversion logic. Combined with... Figure 5 In the example, the first consecutive valid data sequence is "111" in the 2nd to 4th positions.
[0053] S3: When executing the conversion logic process, select conversion data from the intermediate data and write it into the first-in-first-out memory.
[0054] While the conversion logic module executes the conversion logic, that is, within the second clock cycle (CLK), the converted data in the intermediate data is written to the first-in-first-out (FIFO) memory. It should be noted that the FIFO memory is different from the FIFO memory that may be selected for the read transfer channel and the write transfer channel.
[0055] When selecting the conversion data to write to the first-in-first-out (FIFO) memory, the data can be written to the FIFO memory immediately after each bit of conversion data is determined.
[0056] S4: In the third-stage pipeline, when the conversion logic module executes the conversion logic, the write transmission channel sequentially reads at least one valid data of the conversion data in the first-in-first-out memory for write transmission.
[0057] The write data module is used to read and transfer the data stored in the first-in-first-out (FIFO) memory. In some optional real-time modes, at least one valid piece of data in the converted data in the FIFO memory can be written and transferred using the following methods:
[0058] The data content in the first-in-first-out memory is monitored in real time to determine whether there is any written data in the first-in-first-out memory.
[0059] In response to the presence of at least one written data in the first-in-first-out memory, at least one written data in the first-in-first-out memory is read sequentially using the write transfer channel.
[0060] In this way, when the conversion logic module performs conversion logic processing, valid data is written into the first-in-first-out memory one by one. At the same time, whenever a valid data appears in the first-in-first-out memory, the write transmission channel immediately performs write transmission of the valid data, thereby realizing the parallel execution of data conversion logic processing and data write transmission.
[0061] refer to Figure 6 The diagram shown is a data transmission timing diagram corresponding to a pipeline-based data transmission control method provided in one or more embodiments of this specification. The read transmission timing, conversion logic timing, and write transmission timing correspond to the first-stage pipeline, the second-stage pipeline, and the third-stage pipeline, respectively. In the read transmission timing, "readA" indicates reading and transmitting the current original data A; in the conversion logic timing, "convert A" indicates performing conversion logic processing on the current original data A; and in the write transmission timing, "write A" indicates writing and transmitting the converted data corresponding to the current original data A.
[0062] The pipeline-based data transmission control method, by setting up a first-in-first-out (FIFO) memory between the conversion logic module of the second-level pipeline and the write transmission channel of the third-level pipeline, utilizes the FIFO memory as an effective data transfer intermediary after conversion logic processing. This enables data write transmission operations to be performed simultaneously with data conversion logic processing, allowing the conversion logic processing flow and the write data processing flow to run in parallel. This avoids additional waiting time caused by the conversion logic processing flow, thereby improving data transmission efficiency and optimizing the performance of the data transmission system.
[0063] In one or more optional embodiments of this specification, a pipeline-based data transmission control method is provided, wherein the read / write transmission device further includes a DFF register.
[0064] During the first clock cycle CLK, after the read transfer channel performs a read transfer of the current raw data, the current raw data is stored in the DFF register. During the second clock cycle, the conversion logic module reads the current raw data from the DFF register to perform conversion logic processing on the current raw data.
[0065] After the conversion logic module retrieves the current raw data from the DFF register, the DFF register is empty. At this time, the read transfer channel can immediately execute a read transfer operation for the next raw data item. When the next raw data item is obtained, it is also stored in the DFF register so that the conversion logic module can retrieve the raw data from the DFF register again to perform conversion logic processing.
[0066] The pipeline-based data transmission control method, by setting a DFF register between the read transmission channel of the first-stage pipeline and the conversion logic module of the second-stage pipeline, enables the read data transmission process and the conversion logic process to run in parallel, thereby improving data transmission efficiency and optimizing data transmission system performance.
[0067] like Figure 7 As shown, in one or more optional embodiments of this specification, a pipeline-based data transmission control method is provided, in which the read / write transmission device further includes a state machine, which is configured with an initial state and a transition state to control the transition logic module to execute transition logic.
[0068] The method further includes:
[0069] S201: Set the transition start signal and transition completion signal to control the state transition of the state machine.
[0070] S202: After the state machine detects that the transition start signal is valid, it enters the transition state from the initial state. In the transition state, the state machine controls the transition logic module to start executing the transition logic.
[0071] S203: After the state machine detects that the transition completion signal is valid, it enters the initial state from the transition state. In the initial state, the state machine controls the transition logic module to stop the transition logic action.
[0072] refer to Figure 8 The diagram shows the state transitions of the state machine. The state machine initially operates in the initial state. After the transition start signal is valid, the state machine transitions from the initial state to the transition state. In the transition state, the transition logic module begins the transition logic process, transforming the current raw data. After detecting that the transition completion signal is valid, the state machine returns to the initial state, controls the transition logic module to exit the transition state, and waits for the next raw data to be transformed.
[0073] like Figure 9 As shown, in one or more optional embodiments of the pipeline-based data transmission control method provided in this specification, the read / write transmission device further includes a counter, and the method further includes:
[0074] S301: When the conversion logic module executes the conversion logic, the counter is used to monitor and count the lower 8 bits of the intermediate data one by one.
[0075] The counter operates only when the state machine is in the transition state, monitoring and counting the intermediate data generated by the transition logic module. When the count reaches the maximum count threshold, the counter is reset to zero. When the state machine is in the initial state, the counter is reset to zero and stops counting.
[0076] The maximum counting threshold corresponding to the counter corresponds to the number of bits in the intermediate data, and its counting range can be set to, for example, 0 to 7.
[0077] S302: Generate a valid signal based on the lower 8 bits of the intermediate data. The high level in the valid signal corresponds to the data content 1 in the lower 8 bits of the data, and the low level in the valid signal corresponds to the data content 0 in the lower 8 bits of the data.
[0078] S303: Monitor the level state of the valid signal, and when the valid signal is detected to change from high level to low level, generate the conversion completion signal.
[0079] During data transmission, only the first consecutive valid data sequence is selected as the converted data, and this converted data is written and transmitted. A counter is used to generate a valid signal for the lower 8 bits of the intermediate data. Specifically, the 8 bits of the intermediate data are assigned to the valid signal according to the encoding order generated by the data conversion. A high level in the valid signal corresponds to a 1 in the lower 8 bits of the data, and a low level in the valid signal corresponds to a 0 in the lower 8 bits of the data.
[0080] Taking the lower 8 bits of the current original data as 01101110 as an example, the intermediate data generated after all conversions is 01110110. During the conversion logic module's conversion of the current original data, the changes between the valid signal generated by the counter and the conversion completion signal are as follows: Figure 10 As shown.
[0081] When the valid signal changes from high to low, it indicates that the first consecutive valid data sequence in the 8-bit intermediate data corresponding to the threshold has ended, and the subsequent part is all invalid content, which does not need to be transmitted. Therefore, when the valid signal changes from high to low, the conversion completion signal is generated, and the conversion completion signal is set from low to high, thereby controlling the state machine to perform state transitions.
[0082] After the state machine detects that the conversion completion signal is valid (i.e., it changes from low level to high level), it enters the initial state, thereby controlling the conversion logic module to exit the conversion state, stop converting the current raw data, complete the current conversion operation, and wait for the next raw data to be converted.
[0083] The pipeline-based data transmission control method employs a counter to sequentially detect and count the lower 8 bits of the generated intermediate data during the conversion operation of the conversion logic module on the current raw data. This effectively detects the first consecutive valid data sequence and generates a conversion completion signal upon the end of the first consecutive valid data sequence, thereby controlling the conversion logic module to stop the conversion operation. In this way, the conversion logic module does not need to convert all of the current raw data, but only converts and generates valid data. This significantly reduces the time occupied by the conversion operation, thereby saving the timing cycle of the conversion logic processing flow within the pipeline. It effectively mitigates the performance degradation caused by increased processing steps, ensuring the system can operate at a higher frequency.
[0084] like Figure 11 As shown, in one or more optional embodiments of this specification, a pipeline-based data transmission control method includes selecting conversion data from the intermediate data and writing it into a first-in-first-out memory during the execution of the conversion logic process, comprising:
[0085] S401: Determine the current state of the state machine and the level state of the valid signal;
[0086] S402: In response to the current state of the state machine being the transition state and the valid signal being at a high level, the data in the intermediate data that has been monitored and counted by the counter is written into the first-in-first-out memory.
[0087] As described above, in this approach, the conversion logic module does not need to convert all of the current original data; it only needs to convert and generate valid data. Correspondingly, when writing the converted data from the intermediate data into the FIFO memory, only the converted data portion of the valid data needs to be written. Whether or not the generated data needs to be written can be determined based on the current state of the state machine and the level of the valid signal maintained by the counter.
[0088] When the current state of the state machine is the transition state and the valid signal is at a high level, the corresponding write data in the intermediate data is valid data and belongs to the first consecutive valid data sequence. In this case, the data after being monitored and counted by the counter is written into the first-in-first-out memory.
[0089] When the state machine is in the initial state, it indicates that the replacement has been completed and no further data writing is needed to the FIFO memory. When the state machine is in a transition state, but the valid signal is low, it indicates that the data in the corresponding data bit of the intermediate data is invalid and does not need to be written to the FIFO memory.
[0090] In a pipeline-based data transmission control method provided in one or more optional embodiments of this specification, the timing period occupied by the conversion logic module in the second-level pipeline for performing conversion logic processing depends on the lower 8 bits of the current original data.
[0091] When the lower 8 bits of the original data are all 1, it indicates that the converted data is valid. Therefore, all 8 write data entries need to be written into the FIFO sequentially. Each write operation takes one clock cycle, meaning the conversion logic process takes 8 clock cycles. The diagram below illustrates the converted data and write transmission data generated from the conversion of the original data with all lower 8 bits set to 1. Figure 12 As shown.
[0092] When only the lowest bit of the lower 8 bits of the original data is valid, only one bit of the converted data is valid. Therefore, only this valid data needs to be written into the FIFO, while the other 7 invalid data bits are discarded. In the pipelined data transmission control method, the valid signal is obtained from the lower 8 bits of the original data. Therefore, the valid signal will only maintain a high level for one CLK, while the other 7 CLKs will be low. When the completion signal detects the change from high to low level of the valid signal, it is set to high level. At this time, the state machine will also jump from the conversion state to the initial state because the conversion completion signal is valid. The subsequent invalid data will also be discarded because the state machine enters the initial state. Therefore, only one CLK is needed to write the valid data into the FIFO, instead of an additional 7 CLKs to determine whether the 7 invalid data bits need to be written into the FIFO, thus saving time and improving system performance. The diagram of the converted data and the write transmission data generated by converting the original data with only the lowest bit set to 1 is shown below. Figure 13 As shown.
[0093] It should be noted that the methods of one or more embodiments of this specification can be executed by a single device, such as a computer or server. The methods of this embodiment can also be applied in a distributed scenario, where multiple devices cooperate to complete the task. In such a distributed scenario, one of these devices may execute only one or more steps of the methods of one or more embodiments of this specification, and the multiple devices will interact with each other to complete the method described.
[0094] It should be noted that the above description describes specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims may be performed in a different order than that shown in the embodiments and still achieve the desired results. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0095] Based on the same inventive concept, and corresponding to any of the above embodiments, this specification also provides a pipeline-based data transmission control system.
[0096] refer to Figure 14 The pipeline-based data transmission control system is applied to the read / write transmission device, and includes a read transmission channel, a write transmission channel, and a conversion logic module. The system includes:
[0097] A read transfer unit is used in the first-stage pipeline to control the read transfer channel to perform read transfer of the current raw data;
[0098] A data conversion unit is used in the second-stage pipeline to control the conversion logic module to obtain the current raw data and perform conversion logic on the current raw data to generate intermediate data, wherein the intermediate data includes at least one valid data bit.
[0099] The data conversion unit is further configured to select converted data from the intermediate data and write it into the first-in-first-out memory during the execution of the conversion logic process; and
[0100] The write transfer unit is used in the third-stage pipeline to control the write transfer channel to sequentially read at least one valid piece of the conversion data from the first-in-first-out memory for write transfer when the conversion logic module executes the conversion logic.
[0101] In a pipeline-based data transmission control system provided in one or more optional embodiments of this specification, the read / write transmission device further includes a DFF register. The read transmission unit is further configured to store the current original data in the DFF register after the read transmission channel performs a read transmission of the current original data; the data conversion unit is further configured to control the conversion logic module to read the current original data from the DFF register.
[0102] The read transfer unit is further configured to control the read transfer channel to read and transfer the next piece of original data after the conversion logic module reads the current original data from the DFF register, and store the next piece of original data in the DFF register.
[0103] In a pipeline-based data transmission control system provided in one or more optional embodiments of this specification, the data conversion unit is further configured to perform placeholder conversion on the lower 8 bits of the current original data, converting them into 8 write data to constitute the intermediate data. The encoding order of the lower 8 bits of the current original data corresponds to the encoding order of the 8 write data in the intermediate data. The lower 8 bits of the current original data are placed as flag bits of the 8 write data in the highest bit of the intermediate data. In the intermediate data, when the data of the flag bit is 1, the corresponding data bit is a valid data bit, and the write data in the valid data bit is valid data. When the data of the flag bit is 0, the corresponding data bit is an invalid data bit, and the write data in the invalid data bit is invalid data.
[0104] In a pipeline-based data transmission control system provided in one or more optional embodiments of this specification, the read / write transmission device further includes a state machine. The state machine has an initial state and a transition state, used to control the transition logic module to execute transition logic. The data conversion unit is further used to set a transition start signal and a transition completion signal to control the state transition of the state machine; after the state machine detects that the transition start signal is valid, it enters the transition state from the initial state; in the transition state, the state machine controls the transition logic module to start executing the transition logic; after the state machine detects that the transition completion signal is valid, it enters the initial state from the transition state; in the initial state, the state machine controls the transition logic module to stop the transition logic operation.
[0105] In a pipeline-based data transmission control system provided in one or more optional embodiments of this specification, the read / write transmission device further includes a counter. The data conversion unit is further configured to, when the conversion logic module executes the conversion logic, use the counter to monitor and count the lower 8 bits of the intermediate data one by one; generate a valid signal based on the lower 8 bits of the intermediate data, wherein a high level in the valid signal corresponds to data content 1 in the lower 8 bits, and a low level in the valid signal corresponds to data content 0 in the lower 8 bits; monitor the level state of the valid signal, and generate the conversion completion signal when the valid signal is detected to change from a high level to a low level.
[0106] In a pipeline-based data transmission control system provided in one or more optional embodiments of this specification, the data conversion unit is further configured to determine the current state of the state machine and the level state of the valid signal; when the current state of the state machine is the transition state and the valid signal is at a high level, the data in the intermediate data after being monitored and counted by the counter is written into the first-in-first-out memory.
[0107] In a pipeline-based data transmission control system provided in one or more optional embodiments of this specification, the data conversion unit is further configured to monitor the data content in the first-in-first-out (FIFO) memory in real time to determine whether there is written data in the FIFO memory; when there is at least one written data in the FIFO memory, the at least one written data in the FIFO memory is read sequentially using the write transmission channel.
[0108] In a pipeline-based data transmission control system provided in one or more optional embodiments of this specification, the data conversion unit is further configured to: control the counter to be cleared when the current state of the state machine is the initial state; control the counter to perform monitoring and counting when the current state of the state machine is the transition state; and control the counter to be cleared when the counter value reaches the maximum counting threshold.
[0109] For ease of description, the above system is described by dividing it into various functional units. Of course, when implementing one or more embodiments of this specification, the functions of each unit can be implemented in one or more software and / or hardware.
[0110] The system described above is used to implement the corresponding methods in the foregoing embodiments and has the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0111] Figure 15 This embodiment illustrates a more specific hardware structure of an electronic device, which may include a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040, and a bus 1050. The processor 1010, memory 1020, input / output interface 1030, and communication interface 1040 are interconnected internally via the bus 1050.
[0112] The processor 1010 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.
[0113] The memory 1020 can be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 1020 can store the operating system and other applications. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program code is stored in the memory 1020 and is called and executed by the processor 1010.
[0114] The input / output interface 1030 is used to connect input / output modules to realize information input and output. Input / output modules can be configured as components within the device (not shown in the figure) or externally connected to the device to provide corresponding functions. Input devices may include keyboards, mice, touchscreens, microphones, various sensors, etc., while output devices may include displays, speakers, vibrators, indicator lights, etc.
[0115] The communication interface 1040 is used to connect a communication module (not shown in the figure) to enable communication between this device and other devices. The communication module can communicate via wired means (such as USB, Ethernet cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).
[0116] Bus 1050 includes a pathway for transmitting information between various components of the device, such as processor 1010, memory 1020, input / output interface 1030, and communication interface 1040.
[0117] It should be noted that although the above-described device only shows the processor 1010, memory 1020, input / output interface 1030, communication interface 1040, and bus 1050, in specific implementations, the device may also include other components necessary for normal operation. Furthermore, those skilled in the art will understand that the above-described device may only include the components necessary for implementing the embodiments of this specification, and not necessarily all the components shown in the figures.
[0118] The electronic devices described above are used to implement the corresponding methods in the foregoing embodiments and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0119] Based on the same inventive concept, corresponding to the methods of any of the above embodiments, this disclosure also provides a non-transitory computer-readable storage medium that stores computer instructions for causing the computer to execute the pipeline-based data transmission control method as described in any of the above embodiments.
[0120] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transfer medium that can be used to store information accessible by a computing device.
[0121] The computer instructions stored in the storage medium of the above embodiments are used to cause the computer to execute the pipeline-based data transmission control method as described in any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0122] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the methods described above. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), random access memory (RAM), flash memory, hard disk drive (HDD), or solid-state drive (SSD), etc.; the storage medium can also include combinations of the above types of memory.
[0123] The systems, devices, modules, or units described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, a computer can be, for example, a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email device, game console, tablet computer, wearable device, or any combination of these devices.
[0124] For ease of description, the above devices are described separately by function as various units. Of course, in implementing this application, the functions of each unit can be implemented in one or more software and / or hardware.
[0125] Those skilled in the art will understand that embodiments of this specification can be provided as methods, systems, or computer program products. Therefore, this specification may take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this specification may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0126] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0127] This application can be described in the general context of computer-executable instructions, such as program modules, that are executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform a specific task or implement a specific abstract data type. This application can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.
[0128] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to interchangeably. Each embodiment focuses on describing the differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments.
[0129] Those skilled in the art should understand that the discussion of any of the above embodiments is merely exemplary and is not intended to imply that the scope of this disclosure (including the claims) is limited to these examples; within the framework of this disclosure, the technical features of the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other variations of different aspects of one or more embodiments of this specification as described above, which are not provided in detail for the sake of brevity.
[0130] Although this disclosure has been described in conjunction with specific embodiments thereof, many substitutions, modifications, and variations of these embodiments will be apparent to those skilled in the art from the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may be used with the embodiments discussed.
[0131] One or more embodiments of this specification are intended to cover all such substitutions, modifications, and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of one or more embodiments of this specification should be included within the scope of protection of this disclosure.
Claims
1. A method of controlling data transmission based on a pipeline, characterized by, The method is applied to a read / write transmission device, including a read transmission channel, a write transmission channel, and a conversion logic module. The method includes: In the first-stage pipeline, the read transfer channel performs read transfer for the current raw data; In the second-stage pipeline, the conversion logic module acquires the current raw data and performs conversion logic on the current raw data to generate intermediate data, the intermediate data including at least one valid data bit; During the conversion logic process, at least one valid bit of data is selected from the intermediate data and written as conversion data into the first-in-first-out memory; In the third-stage pipeline, when the conversion logic module executes the conversion logic, the write transmission channel sequentially reads at least one valid data of the conversion data in the first-in-first-out memory for write transmission. The conversion logic module obtains the current original data and performs conversion logic on the current original data to generate intermediate data, including: performing placeholder conversion on the lower 8 bits of the current original data to convert them into 8 write data to constitute the intermediate data, wherein the encoding order of the lower 8 bits of the current original data corresponds to the encoding order of the 8 write data in the intermediate data; placing the lower 8 bits of the current original data as flag bits of the 8 write data in the highest bit of the intermediate data; in the intermediate data, when the data of the flag bit is 1, the corresponding data bit is a valid data bit, and the write data in the valid data bit is valid data; when the data of the flag bit is 0, the corresponding data bit is an invalid data bit, and the write data in the invalid data bit is invalid data. The read / write transmission device further includes a counter, and the method further includes: when the conversion logic module executes the conversion logic, using the counter to monitor and count the lower 8 bits of the intermediate data one by one; generating a valid signal based on the content of the lower 8 bits of the intermediate data, wherein a high level in the valid signal corresponds to data content 1 in the lower 8 bits of the data, and a low level in the valid signal corresponds to data content 0 in the lower 8 bits of the data; monitoring the level state of the valid signal, and generating a conversion completion signal when the valid signal is detected to change from a high level to a low level; During the execution of the transition logic process, selecting transition data from the intermediate data and writing it into the first-in-first-out (FIFO) memory includes: determining the current state of the state machine and the level state of the valid signal; in response to the current state of the state machine being a transition state and the valid signal being at a high level, writing the data from the intermediate data after being monitored and counted by the counter into the FIFO memory.
2. The method of claim 1, wherein, The read / write transmission device further includes a DFF register, and the method further includes: After the read transfer channel performs a read transfer of the current raw data, the current raw data is stored in the DFF register; The conversion logic module obtains the current raw data, including reading the current raw data from the DFF register; After the conversion logic module reads the current raw data from the DFF register, the read transmission channel reads and transmits the next raw data item and stores the next raw data item in the DFF register.
3. The method of claim 1, wherein, The read / write transmission device further includes a state machine, which has an initial state and a transition state, used to control the transition logic module to execute transition logic; the method further includes: Set the transition start signal and transition completion signal to control the state transition of the state machine; After the state machine detects that the transition start signal is valid, it enters the transition state from the initial state. In the transition state, the state machine controls the transition logic module to start executing the transition logic. After the state machine detects that the transition completion signal is valid, it enters the initial state from the transition state. In the initial state, the state machine controls the transition logic module to stop the transition logic action.
4. The method according to claim 3, characterized in that, When the conversion logic module executes the conversion logic, the write transmission channel sequentially reads at least one valid piece of data from the first-in-first-out memory for write transmission, including: The data content in the first-in-first-out memory is monitored in real time to determine whether there is any written data in the first-in-first-out memory. In response to the presence of at least one written data in the first-in-first-out memory, at least one written data in the first-in-first-out memory is read sequentially using the write transfer channel.
5. The method according to claim 3, characterized in that, The lower 8 bits of the intermediate data are monitored and counted one by one using the counter, including: In response to the current state of the state machine being the initial state, the counter is cleared to zero; In response to the current state of the state machine being the transition state, the counter is controlled to perform monitoring and counting; When the counter value reaches the maximum counting threshold, the counter is reset to zero.
6. A pipeline-based data transmission control system, characterized in that, The system is applied to a read / write transmission device, including a read transmission channel, a write transmission channel, and a conversion logic module. The system includes: A read transfer unit is used in the first-stage pipeline to control the read transfer channel to perform read transfer of the current raw data; A data conversion unit is used in the second-stage pipeline to control the conversion logic module to obtain the current raw data and perform conversion logic on the current raw data to generate intermediate data, wherein the intermediate data includes at least one valid data bit. The data conversion unit is further configured to select converted data from the intermediate data and write it into the first-in-first-out memory during the execution of the conversion logic process; and The write transfer unit is used in the third-stage pipeline to control the write transfer channel to sequentially read at least one valid data of the conversion data in the first-in-first-out memory for write transfer when the conversion logic module executes the conversion logic. The data conversion unit is further configured to perform placeholder conversion on the lower 8 bits of the current original data, converting them into 8 write data to constitute the intermediate data. The encoding order of the lower 8 bits of the current original data corresponds to the encoding order of the 8 write data in the intermediate data. The lower 8 bits of the current original data are placed as flag bits for the 8 write data in the highest bit of the intermediate data. In the intermediate data, when the flag bit is 1, the corresponding data bit is a valid data bit, and the write data in the valid data bit is valid data. When the flag bit is 0, the corresponding data bit is an invalid data bit, and the write data in the invalid data bit is invalid data. The read / write transmission device further includes a counter; the data conversion unit is also used to monitor and count the lower 8 bits of the intermediate data one by one when the conversion logic module executes the conversion logic; generate a valid signal based on the lower 8 bits of the intermediate data, wherein a high level in the valid signal corresponds to data content 1 in the lower 8 bits of the data, and a low level in the valid signal corresponds to data content 0 in the lower 8 bits of the data; monitor the level state of the valid signal, and generate a conversion completion signal when the valid signal is detected to change from a high level to a low level; The data conversion unit is also used to determine the current state of the state machine and the level state of the valid signal; when the current state of the state machine is a transition state and the valid signal is at a high level, the data in the intermediate data after being monitored and counted by the counter is written into the first-in-first-out memory.
7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the method as described in any one of claims 1 to 5.
Citation Information
Patent Citations
"Butterfly" transmission method for assembly line between cascaded boards
CN107844451A
FIFO data transmission method and FIFO storage device
CN111832240A
