Dual-path collaborative processing method and device based on 10BASE-T1L and electronic equipment
By employing a dual-path collaborative processing method, parallel processing of delimiter detection and data recovery at the receiver of the 10BASE-T1L physical coding sublayer was achieved, resolving timing conflict issues and improving communication real-time performance and link reliability.
Patent Information
- Application Number
- CN202611369918.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-04
- Publication Date
- 2026-11-27
AI Technical Summary
The 10BASE-T1L physical coding sublayer receiver has a timing conflict between step-by-step delimiter verification and real-time data recovery, resulting in processing delays and link instability, making it difficult to meet the low latency requirements of industrial scenarios.
A dual-path collaborative processing method is adopted, which uses a code group control path and a delay recovery path to process in parallel. The code group control path is used for delay-free delimiter detection and state transition control, while the delay recovery path decodes and recovers historical code groups, ensuring the real-time performance of delimiter detection and the accuracy of data recovery.
It resolves the timing conflict between delimiter detection and data recovery, reduces hardware resource overhead and timing control complexity, and improves communication real-time performance and link reliability.
Smart Images

Figure CN123184789A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communication technology, and in particular to a dual-path collaborative processing method, apparatus and electronic device based on 10BASE-T1L. Background Technology
[0002] 10BASE-T1L is a long-distance single-pair Ethernet physical layer technology defined by the IEEE 802.3cg standard. It adopts three-level pulse amplitude modulation and 4B3T encoding, and can achieve full-duplex communication at a rate of 10Mbps on a single pair of balanced twisted-pair cables. The maximum transmission distance is up to 1000 meters. It is widely used in industrial automation, process control and other scenarios with high requirements for communication reliability and transmission distance.
[0003] The Physical Coding Sublayer (PCS) is the core logic module of the 10BASE-T1L physical layer receiver. In the receiving direction, it receives the symbol-by-symbol reception results from the Physical Medium Attachment (PMA) sublayer, combines every three consecutive three-level received symbols into a received code group, and then completes frame delimiter identification, 4B3T inverse mapping, descrambling, operation deviation maintenance, and medium-independent interface (MII) data output.
[0004] In the 10BASE-T1L protocol specification, both the start-of-frame delimiter and the end-of-frame delimiter are composed of multiple sets of specific code groups arranged in a preset order. The receiver must perform step-by-step matching and verification of each set of code groups contained in the delimiter in order to confirm the start and end of a frame of data. However, data recovery operations such as 4B3T inverse mapping and descrambling need to be processed synchronously with code group reception. This creates an inherent timing conflict between the requirement for step-by-step verification of the delimiter and the requirement for real-time data recovery output.
[0005] Currently, PCS receivers generally adopt a single-path serial processing architecture, which executes delimiter detection and data decoding and recovery sequentially. If this architecture waits for a complete delimiter verification before initiating data output, it introduces additional processing latency, making it difficult to meet the low-latency requirements of industrial scenarios. If data is output synchronously during delimiter detection, and subsequent step-by-step verification fails, the already output invalid preamble or frame data cannot be recalled, leading to the upper-layer media access control layer receiving erroneous frames and triggering unnecessary retransmissions. Furthermore, some solutions using external buffers temporarily store data while waiting for delimiter verification results, which not only increases hardware resource overhead and timing control complexity but also easily leads to timing mismatches between the descrambling sequence and the received code group, reducing the stability of the receiving link. Summary of the Invention
[0006] This application provides a dual-path collaborative processing method, apparatus, and electronic device based on 10BASE-T1L, to at least solve the timing conflict problem between step-by-step verification of the delimiter at the receiving end of the 10BASE-T1L physical coding sublayer and real-time data recovery in related technologies.
[0007] This application provides a dual-path collaborative processing method based on 10BASE-T1L, applied at the receiving end, including: In response to the code group synchronization enable signal, the current state of the current received code group and the receiver state machine of the physical coding sublayer of the receiver is obtained, and the current received code group is simultaneously and in parallel input to the code group control path and the delay recovery path; the delay recovery path includes a delay chain for delaying the current received code group; Based on the current state, the corresponding expected code group is determined, and the code group control path is used to compare the current received code group with the expected code group to obtain a matching result. Based on the matching result, the target state is determined, and the receiving state machine is controlled to transition from the current state to the target state. The historical code group and the corresponding descrambled sequence after being delayed by the delay chain are decoded and recovered using the delay recovery path, and the recovered data corresponding to the historical code group is output.
[0008] This application also provides a dual-path collaborative processing device based on 10BASE-T1L, including: The acquisition unit is configured to, in response to a code group synchronization enable signal, acquire the current state of the currently received code group and the receiver state machine of the physical coding sublayer of the receiver, and simultaneously input the current received code group into the code group control path and the delay recovery path in parallel; the delay recovery path includes a delay chain for delaying the current received code group. The processing unit is configured to determine the corresponding expected code group based on the current state, and use the code group control path to compare the current received code group with the expected code group to obtain a matching result, and determine the target state based on the matching result, and control the receiving state machine to transition from the current state to the target state. The processing unit is further configured to use the delay recovery path to decode and recover the historical code group after the delay chain and the descrambling sequence corresponding to the historical code group, and output the recovered data corresponding to the historical code group.
[0009] This application also provides an electronic device, including: a memory for storing a computer program; and a processor for implementing the steps of any of the above-described dual-path collaborative processing methods based on 10BASE-T1L when executing the computer program.
[0010] This application also provides a computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, it implements the steps of any of the above-described dual-path collaborative processing methods based on 10BASE-T1L.
[0011] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of any of the above-described dual-path collaborative processing methods based on 10BASE-T1L.
[0012] This application adopts a dual-path collaborative processing architecture with parallel code group control and delay recovery paths. In response to the code group synchronization enable signal, the currently received code group is simultaneously split into two paths. The code group control path, based on the current received code group without delay and combined with the current state of the receiving state machine, completes the desired code group matching and state transition control, ensuring the real-time performance of delimiter detection. The delay recovery path performs decoding recovery and output on the historical code group and its corresponding descrambling sequence after being buffered by the delay chain, forming a fixed timing difference of state determination first and data output later. This fundamentally solves the inherent time conflict between step-by-step delimiter verification and data decoding recovery. It avoids the additional processing delay introduced by waiting for complete delimiter verification before starting output in traditional single-path architectures, and prevents the false preamble problem caused by partial delimiter matching and data output. Furthermore, the overall processing logic is clear, requiring no additional random access storage medium to buffer data, reducing hardware resource overhead and timing control complexity, and improving the real-time communication performance and link reliability of the 10BASE-T1L physical coding sublayer receiver. Attached Figure Description
[0013] To more clearly illustrate the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0014] Figure 1 A schematic diagram of the physical layer architecture of the receiver in a dual-path collaborative processing method based on 10BASE-T1L provided in an embodiment of this application; Figure 2 A flowchart illustrating a dual-path collaborative processing method based on 10BASE-T1L provided for an embodiment of this application; Figure 3 A schematic diagram of a dual-link collaborative architecture for a dual-path collaborative processing method based on 10BASE-T1L provided for embodiments of this application; Figure 4A system architecture diagram corresponding to a dual-path collaborative processing method based on 10BASE-T1L provided in this application embodiment; Figure 5 This is a schematic diagram of the structure of the dual-path collaborative processing device based on 10BASE-T1L provided in the embodiments of this application. Detailed Implementation
[0015] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of this application.
[0016] It should be noted that, in the description of this application, 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. The terms "first," "second," etc., in this application are used to distinguish similar objects and are not used to describe a specific order or sequence.
[0017] To enable those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0018] This application relates to dual-path collaborative processing of the receiver in a 10BASE-T1L Physical Coding Sublayer (PCS), and is applied to Ethernet communication scenarios between the transmitter and receiver connected by a single pair of balanced twisted-pair cables.
[0019] 10BASE-T1L is a single-pair Ethernet physical layer technology defined by the IEEE 802.3cg standard. It adopts three-level pulse amplitude modulation (PAM3) and 4B3T encoding. This encoding method maps every 4 bits of binary data into 3 consecutive three-level transmission symbols. It dynamically maintains the DC component balance of the line through a built-in operation deviation control mechanism, while reducing the line symbol rate to 7.5MBaud. This effectively reduces the high-frequency transmission attenuation of a single pair of twisted pairs, achieving 10Mbps full-duplex communication on a single pair of twisted pairs. The transmission distance can reach up to 1000 meters, and it is mainly aimed at long-distance, high-reliability scenarios such as industrial automation and process control.
[0020] Reference Figure 1The diagram shown illustrates a physical layer architecture for a receiver according to an embodiment of this application. It includes a transmitter 11, a receiver 12, and an Ethernet MAC layer. The receiver 12 includes a Physical Medium Attachment (PMA) sublayer 121 and a Physical Coding (PCS) sublayer 122. According to the IEEE 802.3cg physical layer layering definition, the functional link in the receiving direction, from the media interface to the data interface, sequentially includes a Physical Medium Attachment (PMA), a Physical Coding (PCS) sublayer, and a Medium Independent Interface (MII). The PMA sublayer is connected to the twisted-pair cable via the MDI interface and is responsible for receiving three-level analog signals from the twisted-pair cable, which are then transmitted to the PCS sublayer in three-level symbol form after symbol decision.
[0021] The PCS sublayer receives the three-level symbol stream from the PMA sublayer 121, assembles every three consecutive symbols into a six-bit parallel data block, i.e., the current received code group, and generates a code group synchronization enable signal (Receive Symbol Triplet Conversion Done, RSTCD) upon completion of assembly, serving as a unified timing reference for all subsequent code group-level processing. This current received code group is simultaneously and in parallel input to two independent processing paths through the same fan-out node: the current code group control path and the delay recovery path.
[0022] The current code group control path is positioned before the received code group delay register chain. It performs step-by-step delimiter checks on the undelayed current received code group and controls the receive state machine for state transitions. The delay recovery path is used to decode and recover the current received code group and its corresponding descrambling sequence after a fixed-number-beat delay, and outputs the recovered data through the MII interface. Both paths share the same code group synchronization enable signal, allowing delimiter checks and data recovery to be performed in parallel without blocking each other.
[0023] It should be noted that code group boundary synchronization must be completed before the PCS sublayer begins code group assembly. Since the PMA sublayer transmits three-level symbols to the PCS symbol by symbol, and each code group consists of three consecutive symbols, the receiver cannot know the starting position of the packet at the transmitter in the early stage of link establishment. Therefore, there are three possible code group boundary phases.
[0024] During the link training phase, the PCS sublayer uses a synchronization auxiliary circuit to determine and lock three candidate phases: if a non-all-zero candidate code group appears first under a certain candidate group phase, and then an illegal training code group consisting of three zero symbols (4B3T) appears, then the phase is marked as invalid; when two different candidate phases are successively marked as invalid, the remaining candidate phase is locked as the correct code group boundary, and a code group synchronization establishment pulse is generated at the same time.
[0025] After code group synchronization is established, the PCS sublayer, according to the locked phase, forms a current received code group and generates an RSTCD pulse every three symbols received. The dual-path collaborative processing of this application starts execution after the code group synchronization establishment pulse arrives, and its implementation process does not depend on the specific phase determination structure used by the preceding synchronization circuit.
[0026] Before code group synchronization is established, the receiver-sidestream descrambler advances every three recovery symbol clock cycles according to the local modulo-3 symbol phase counter; after code group synchronization is established, it advances according to the RSTCD. The receiver-sidestream descrambler adopts a 33-bit linear feedback shift register structure. When the receiver is the master device, the feedback value is obtained by XORing the register bits at index 19 and index 32; when the receiver is the slave device, the feedback value is obtained by XORing the register bits at index 12 and index 32. During each advance, the next state is generated from the current 33-bit state, and then a five-bit descrambling sequence word is generated by combining the fixed taps of the next state. Two five-bit retiming registers are used to compensate for the fixed beat position between the generation of the descrambling sequence and the formation of the current received code group, so that the descrambling sequence word sent into the descrambling sequence delay register chain matches the timing of the current received code group corresponding to the same RSTCD. The code group synchronization establishment pulse initializes the PCS receiver state context and the two delay register chains, but does not clear the continuously running 33-bit linear feedback shift register.
[0027] The following section, based on the above architecture, details the specific implementation steps of the dual-path collaborative processing method of this application.
[0028] Reference Figure 2 As shown, the specific steps provided for this application include the following: S21. In response to the code group synchronization enable signal, obtain the current state of the current received code group and the receiving state machine of the physical coding sublayer of the receiving end, and simultaneously input the current received code group into the code group control path and the delay recovery path in parallel.
[0029] The delay recovery path includes a delay chain for delaying the currently received code group.
[0030] Specifically, the code group synchronization enable signal RSTCD is a single-cycle pulse generated by the PCS sublayer when it completes the assembly of each received code group, serving as a unified timing reference for all code group-level operations; it is transmitted by the PMA sublayer to the PCS sublayer in symbol-by-symbol form after receiving a three-level analog signal from the twisted pair; every time the PCS sublayer receives three consecutive three-level received symbols, it assembles them into a six-bit parallel data block, which is the current received code group, and at the same time generates the code group synchronization enable signal.
[0031] In response to the enable signal, this step will acquire the currently received code group, that is, the code group data that has just been assembled within the current code group period; at the same time, it will acquire the current state of the receiving state machine, that is, the state in which the state machine is in the current code group period, such as idle state, data receiving state, or delimiter checking state at each level.
[0032] By obtaining the current state, a basis is provided for determining the expected code group in subsequent steps, that is, the same code group will be interpreted as different roles in different states.
[0033] Furthermore, the currently received code group is simultaneously input into two independent processing paths in parallel: the code group control path and the delay recovery path.
[0034] It should be noted that this simultaneous parallel input is the physical basis of the "dual-path collaborative" architecture. It can be understood as the same code group being acquired by two separate paths within the same code group period, and then processed independently without blocking each other.
[0035] The delay recovery path includes a delay chain for delaying the currently received code group. This delay chain is a fixed-depth register chain; in digital circuit implementation, depth refers to the number of register stages cascaded in the register chain. Each stage of register latches and passes data forward under the drive of a code group synchronization enable signal, and the depth is numerically equal to the number of delay cycles. Its depth is the same as the number of code groups contained in the delimiter (both are four cycles), that is, the delay chain contains 4 stages of cascaded registers, and a code group needs to go through 4 code group cycles to reach the 4th stage (the last stage) from the 1st stage. The delay chain ensures that the currently received code group is not immediately decoded and recovered, but is shifted step by step in the delay chain, reaching the last stage for decoding and output only after a fixed number of cycles, thus decoupling the entry delimiter check from the exit data recovery in time.
[0036] It should be noted that the delay recovery path includes a receive code group delay register chain and a descrambling sequence delay register chain. The two delay register chains have the same number of stages and are driven by the same code group synchronization enable signal for synchronous shifting.
[0037] The receiver code group delay register chain buffers the currently received code group, allowing it to be output as a historical code group from the final stage after a fixed number of clock cycles. The descrambling sequence delay register chain buffers the descrambling sequence word corresponding to the timing of the currently received code group, allowing it to be output from the final stage after the same number of clock cycles. Because the two chains shift synchronously, the historical code group output from the final stage and the descrambling sequence word output from the final stage always maintain a one-to-one timing correspondence; that is, both belong to the same code group period that entered the receiver and its corresponding descrambling sequence.
[0038] The aforementioned structure of synchronous shifting of the dual-delay register chain is the hardware foundation for the correct decoding and recovery of the delay recovery path. Subsequent 4B3T inverse mapping and descrambling operations require strict timing alignment between the code group and the corresponding descrambling sequence; if the descrambling sequence only advances according to the local clock and does not undergo synchronous delay along with the code group through the delay link, a timing mismatch will occur, directly leading to an incorrect descrambling result.
[0039] This step establishes two equal-length, same-frequency delay register chains in stage S21, ensuring the timing consistency of the code group and descrambling sequence in subsequent processing paths from a hardware perspective. The subsequent 4B3T inverse mapping and descrambling operations require strict timing alignment between the code group and the corresponding descrambling sequence, step-by-step. If the descrambling sequence only advances according to the local clock and does not undergo synchronous delay along with the code group via the delay link, a step mismatch will occur, directly leading to incorrect descrambling results.
[0040] Specifically, the current received code group is simultaneously input into the code group control path and the delay recovery path in parallel: On the delay recovery path side, the current received code group is written into the first stage of the received code group delay register chain, and simultaneously, the descrambling sequence word corresponding to the timing of the current received code group is written into the first stage of the descrambling sequence delay register chain; the two write operations are completed synchronously under the drive of the same code group synchronization enable signal. The two delay register chains have the same number of stages (fixed to four stages) and are synchronously shifted by the same code group synchronization enable signal, that is, in each code group cycle, both chains advance one stage backward as a whole. This synchronous shift mechanism ensures that the historical code groups of the delay output and the corresponding descrambling sequences always maintain a one-to-one timing correspondence: when a code group reaches the last stage of the received code group delay chain, the descrambling sequence word that entered the system in the same code group cycle also happens to reach the last stage of the descrambling sequence delay chain, and the two are synchronously sent to the 4B3T inverse mapping and descrambling combination logic for processing, without the need for additional phase alignment logic.
[0041] Furthermore, the fixed delay count of the receive code group delay register chain is not arbitrarily set, but is configured to be the same as the number of expected code groups contained in each of the start and end delimiters. In the 10BASE-T1L protocol, both the start and end delimiters are composed of four expected code groups in sequence, therefore the fixed count is set to four counts. This matching relationship has the following dual timing significance: At the beginning, the four code groups of the start delimiter arrive at the code group control path for inspection frame by frame, and are simultaneously written to the receive code group delay register chain frame by frame. When the fourth start code group (SSD4) arrives at the end of the delay chain after a four-frame delay, the code group control path has just completed the inspection of all four start code groups and confirmed the complete start delimiter. At this time, the SSD4 output from the end of the delay chain is used to reset the receive operation deviation, so that the preamble reconstruction, deviation reset, and recovery of the subsequent first data code group are in a definite frame position relationship.
[0042] At the termination end, when the code group control path identifies the first code group of the termination delimiter in the data reception state, the receive code group delay register chain contains exactly four unoutputted frame tail history code groups, located in the registers of levels 1 to 4 of the delay chain, respectively. In the following four code group cycles, the ingress checks the second, third, and fourth code groups of the termination delimiter level by level, and the egress synchronously outputs the frame tail history code group of the last level of the delay chain, beat by beat. When the ingress completes its check on the fourth termination code group and confirms the end of the frame in the fourth beat, the egress has also just finished outputting the last frame tail history code group in the delay chain. The checking and clearing are completed synchronously, eliminating the need to retrieve historical code groups after delimiter confirmation and preventing premature termination from truncating frame tail data.
[0043] In summary, the matching relationship between the fixed number of beats and the number of delimiter code groups ensures a one-to-one temporal correspondence between the number of historical code groups in the delay chain and the number of delimiter code groups to be checked. This correspondence persists throughout the entire process of initial identification, data reception, and final clearing, guaranteeing that the receiver has a definite beat position relationship and predictable temporal behavior at the beginning, middle, and end stages of each frame.
[0044] S22. Determine the corresponding expected code group based on the current state, and use the code group control path to compare the current received code group with the expected code group to obtain a matching result. Determine the target state based on the matching result and control the receiving state machine to transition from the current state to the target state.
[0045] It should be noted that the expected code group includes a set of code groups corresponding to the delimiter; the delimiter includes a start delimiter and a stop delimiter; wherein the start delimiter and the stop delimiter are each composed of multiple expected code groups arranged in a preset order.
[0046] In the 10BASE-T1L protocol, the start delimiter and end delimiter are not composed of single code groups, but rather of multiple code groups with a defined order arranged in a preset sequence. The start delimiter (SSD) consists of four code groups: two COMMA code groups, one DISPRESET3 code group, and one SSD4 code group. The end delimiter (ESD) consists of four code groups: two COMMA code groups, one DISPRESET3 code group, and one ESD4 code group or ESD_ERR4 code group. Therefore, the receiver cannot confirm the complete delimiter based on the matching result of a single code group; it must check multiple code groups sequentially. Each level of check corresponds to a check state, and each check state corresponds to a desired code group; that is, the currently received code group should match the desired code group in the check state the state machine is in.
[0047] The code group control path is positioned before the delay chain and operates directly on the currently received code group without any delay. The path contains multiple code group set comparators; for example, it includes five parallel code group set comparators, corresponding to the COMMA code group, DISPRESET3 code group set, SSD4 code group set, ESD4 code group set, and ESD_ERR4 code group set, respectively. Each comparator is composed of fixed-size combinational logic, simultaneously generating five matching results within the same code group period, eliminating the need for sequential comparisons.
[0048] Before comparison, this step first determines the corresponding expected code group based on the current state of the receiver state machine obtained in S21. Based on the aforementioned delimiter structure, each check state uniquely corresponds to one expected code group. For example, in the start delimiter second code group check state, the expected code group is the COMMA code group; in the start delimiter DISPRESET3 check state, the expected code group is the DISPRESET3 code group; and in the end delimiter fourth code group check state, the expected code group is the ESD4 code group or the ESD_ERR4 code group. The current state is obtained in S21, and this step determines which expected code group should be matched at the current time.
[0049] Based on this, the code group control path compares the currently received code group with the determined expected code group to obtain a matching result, i.e., a binary determination of match or non-match. If the currently received code group matches the expected code group, the target state is determined as the next check state, and the receiving state machine is controlled to advance from the current state to the target state; if the currently received code group does not match the expected code group, the target state is determined as the corresponding abnormal handling state, such as the bad start delimiter state or the bad end delimiter state, and the receiving state machine is controlled to jump to the target state.
[0050] By combining the current state to determine the desired code group, comparing and transitioning states, this step achieves step-by-step checking of multi-code group delimiters. One comparison and one state transition decision are completed within each code group cycle; multiple code group cycles, when chained together, complete the identification of the complete delimiter. The current code group control path is set before the delay chain, and its comparison operation for the currently received code group is physically separated from the data recovery operation in the delay recovery path and decoupled in time. The combinational logic depth is only the gate-level delay of the code group comparator, and the state machine decision can be completed within the current RSTCD cycle, unaffected by the timing of the complex combinational logic in the delay recovery path.
[0051] S23. The historical code group and the descrambled sequence corresponding to the historical code group are decoded and recovered using the delay recovery path and the historical code group is delayed by the delay chain, and the recovered data corresponding to the historical code group is output.
[0052] Specifically, the delay recovery path is connected to the final stage of the received code group delay register chain and the descrambling sequence delay register chain. As mentioned earlier, the current received code group is written into the first stage of the received code group delay register chain at the same time as the input code group control path, and the corresponding descrambling sequence word is synchronously written into the first stage of the descrambling sequence delay register chain; the two register chains are synchronously shifted by the same code group synchronization enable signal, so that the historical code group output by the final stage and the corresponding descrambling sequence always maintain a one-to-one timing correspondence.
[0053] The historical code group mentioned in this step refers to the code group output from the final stage after being delayed by the delay register chain, corresponding to the code group data that entered the receiver several code group cycles ago. Since the fixed delay of the delay chain is four cycles, the code group control path processes the new code group input in the current cycle in real time in S22, while the delay recovery path processes the historical code group input four cycles ago in this step; there is a fixed four-cycle timing offset between the two, but they are both driven by the same code group synchronization enable signal, ensuring the timing synchronization of the entire processing pipeline.
[0054] This step performs the following decoding and recovery operations on the historical codegroups: First, the historical code group is reverse mapped using 4B3T, which converts the 6-bit historical code group (3 three-level symbols) into 4-bit intermediate data and generates a reverse mapping validity flag.
[0055] Then, a descrambling operation is performed, which involves using the delayed descrambling sequence word that arrives synchronously at the final stage to perform a bitwise XOR operation on the inverse mapping result, eliminating the scrambling code sequence superimposed when the transmitter scrambles, and obtaining the recovered 4-bit data.
[0056] Finally, operational deviation processing is performed: First, a desired code group is generated based on the 4B3T inverse mapping result of historical code groups and the current receive operational deviation. The desired code group is compared with the actual historical code group to generate a deviation error. If the historical code group belongs to the valid 4B3T data code group set, the difference between the number of positive and negative symbols is calculated to obtain the deviation change. This deviation change is added to the current receive operational deviation, and after being limited to between 1 and 4 by range protection logic, it is written back to the receive operational deviation register. If it does not belong to the valid set, the current receive operational deviation remains unchanged, and the receive error signal is set. The deviation error is accumulated in the holding register within the current frame until it is cleared upon normal termination, error termination, link failure, or reinitialization of the receive context.
[0057] The decoded and recovered data, along with the received data valid signal (RX_DV) and the received error signal (RX_ER), are latched into the Media Independent Interface (MII) output register group and the recovered data is output.
[0058] In this step, the delayed recovery path does not distinguish between the service attributes of the code group. Regardless of whether it is a start delimiter code group, a normal data code group, or a stop delimiter code group, the same inverse mapping, descrambling, and operation deviation operations are performed. Whether the recovered data is allowed to be output to the MII interface is controlled uniformly by the receiving state machine through the received data valid signal and the received error signal. This design of decoupling data recovery from output control allows the delayed recovery path to maintain a simple linear processing logic.
[0059] Through the coordinated operation of the three steps S21 to S23, S21 establishes a dual-path parallel processing architecture, S22 completes real-time delimiter verification and state decision-making in the control path, and S23 completes data decoding and recovery in the delay path. This realizes parallel processing of delimiter checking and data recovery, solves the problems of frame mismatch and false preamble output from an architectural perspective, and lays the timing foundation for the frame end clearing mechanism and abnormal emptying processing in the subsequent termination stage.
[0060] For example, refer to Figure 3 The diagram shown illustrates the architecture principle of the dual-path collaborative processing in this application. After the current received code group Rxn is split by the same fan-out node, one path is sent to the code group control path 31, and the other path is sent to the first stage of the received code group delay register chain in the delay recovery path 32; the descrambling sequence word Sn corresponding to the timing of the current received code group Rxn is synchronously sent to the first stage of the descrambling sequence delay register chain in the delay recovery path 32.
[0061] The code group control path 31 is equipped with a delimiter step-by-step verification module 311 and a state transition module 312. The delimiter step-by-step verification module 311 compares the current received code group with the expected code group of the corresponding state, and outputs the matching result to the state transition module 312. The state transition module 312 generates the target state and outputs it to the receiving state machine, controlling the state machine to complete the state transition.
[0062] The received code group delay register chain and the descrambling sequence delay register chain in the delay recovery path 32 are both four-level cascaded structures, driven by the same code group synchronization enable signal to ensure that the code groups and descrambling sequence words input at the same time in the two chains maintain a one-to-one timing correspondence; the last stage of the two register chains outputs the historical code group Rxn-4 and the corresponding delayed descrambling sequence word Sn-4 respectively, which are synchronously sent to the data recovery module 321 to perform decoding recovery processing. The recovered data is finally output to the upper media access control (MAC) layer through the medium-independent interface (MII).
[0063] This application adopts a dual-path collaborative processing architecture with parallel code group control and delay recovery paths. In response to the code group synchronization enable signal, the currently received code group is simultaneously split into two paths. The code group control path, based on the current received code group without delay and combined with the current state of the receiving state machine, completes the desired code group matching and state transition control, ensuring the real-time performance of delimiter detection. The delay recovery path performs decoding recovery and output on the historical code group and its corresponding descrambling sequence after being buffered by the delay chain, forming a fixed timing difference of state determination first and data output later. This fundamentally solves the inherent time conflict between step-by-step delimiter verification and data decoding recovery. It avoids the additional processing delay introduced by waiting for complete delimiter verification before starting output in the traditional single-path architecture, and also prevents the false preamble problem caused by partial delimiter matching and data output. Furthermore, the overall processing logic is clear, requiring no additional random access storage medium to buffer data, reducing hardware resource overhead and timing control complexity, and improving the real-time communication performance and link reliability of the 10BASE-T1L physical coding sublayer receiver.
[0064] As an extension and refinement of the above embodiments, the termination delimiter sequentially includes a first termination code group, a second termination code group, a third termination code group, and a fourth termination code group. As mentioned above, the termination delimiter sequentially includes a first termination code group (COMMA1), a second termination code group (COMMA2), a third termination code group (DISPRESET3), and a fourth termination code group (ESD4 or ESD_ERR4).
[0065] When the receiving state machine is in the data receiving state, the code group control path continuously identifies the currently received code group. When the currently received code group is identified as a COMMA code group, it is determined to be the first stop code group, and the state machine enters the stop delimiter second stop code group check state, initiating the step-by-step check process for the stop delimiter.
[0066] Based on this, the method provided in this application also includes the following steps: When the receiving state machine is in the data receiving state, when the code group control path identifies the first termination code group, it controls the delay recovery path to output the historical code groups cached in the delay chain as frame tail data frame by frame during the step-by-step checking period of the second termination code group, the third termination code group, and the fourth termination code group.
[0067] Understandably, when the first stop code group is identified, the delay chain contains exactly four frame tail history code groups belonging to the current frame (i.e., the last four valid data code groups of the current frame). This step controls the delay recovery path to output the cached history code groups in the delay chain as frame tail data frame by frame during the three code group cycles of subsequently checking the second, third, and fourth stop code groups. Together with the frame that was already output when the first stop code group was identified, a total of four code group cycles are used to complete the output of the four frame tail history code groups.
[0068] Through the above control, the step-by-step checking of the inlet delimiter and the output of the frame tail data at the outlet are precisely aligned in time. When all four stop code groups have been checked and the end of the frame is confirmed, all four frame tail history code groups in the delay chain have also been output. This alignment effect is due to the fact that the delay chain has the same number of delay cycles as the number of delimiter code groups, which allows the checking and tail clearing to be completed synchronously. There is no need to retrieve the history code groups after the delimiter is confirmed, and the frame tail data will not be truncated due to premature termination.
[0069] When the step-by-step check of the termination delimiter fails at any stage, the number of remaining historical code groups to be output in the delay chain is determined according to the stage at which the check fails, and the number of empty frames is set according to the number of remaining historical code groups to be output; within the code group period corresponding to the number of empty frames, the delay recovery path is controlled to output the remaining frame tail data frame by frame, and the reception error indication is kept valid; after all the remaining frame tail data in the delay chain has been output frame by frame, the receiving state machine is controlled to enter the bad termination delimiter state.
[0070] Specifically, when the step-by-step check of the termination delimiter fails at any stage, this step adopts a differentiated emptying strategy because the number of historical code groups that have been output and the number of remaining code groups to be output in the delay chain are different at different failure stages.
[0071] When the second termination code group check fails, the first frame end historical code group has been output in the previous code group period, and three historical code groups remain to be output in the delay chain. Therefore, the number of empty frames is determined to be three frames.
[0072] When the third termination code group check fails, two frame tail history code groups have been output within the first two code group periods, and two history code groups remain to be output in the delay chain. Therefore, the number of empty frames is determined to be two frames.
[0073] When the fourth stop code group is matched, differential processing is performed according to the code group category: If the fourth termination code group belongs to the ESD4 code group set, the received error signal is determined by the previously accumulated deviation error, the current delay code group deviation check result, and the legality of the inverse mapping. After outputting the last frame tail data code group, it returns to the idle state normally.
[0074] If the fourth termination code group belongs to the ESD_ERR4 code group set, output the last frame tail data code group and force the receive error signal to be set, and then return to the idle state.
[0075] If the fourth termination code group does not belong to either the ESD4 code group set or the ESD_ERR4 code group set, the receive error signal is set at the same time as the last frame tail data code group is output. No additional emptying is performed, and it directly enters the bad termination delimiter state. At this time, three frame tail history code groups have been output in the first three code group periods. The fourth code group period itself is the output period of the last frame tail history code group, and no additional emptying is required.
[0076] Within the code group period corresponding to the number of empty frames, the delay recovery path continues to output the remaining frame tail history code groups in the delay chain frame by frame, while keeping the receive error indication valid so that the upper layer can be aware that there is an error in the current frame. After all the remaining frame tail data in the delay chain has been output frame by frame, the control receiver state machine enters the bad termination delimiter state.
[0077] Through the coordinated operation of the normal and abnormal paths described above, this step ensures that regardless of whether the termination delimiter check passes or fails, the cached frame tail history code group in the delay chain can be output completely, without being truncated due to premature termination or contaminating the data of subsequent frames due to delay residue. At the same time, the timing of abnormal exit is precisely matched with the amount of remaining data in the delay chain.
[0078] The two paths mentioned above, namely normal termination and abnormal emptying, together constitute the complete process of the termination delimiter processing stage. Together with the dual-path parallel architecture and delimiter checking mechanism described in S21 to S23, they constitute the end-to-end deterministic control of the receiver from frame start identification to frame end clearing.
[0079] This application embodiment achieves precise synchronization between step-by-step checking of the termination delimiter and step-by-step output of frame tail data by matching the fixed delay number of delay chains with the number of termination delimiter code groups. At the end of a normal frame, the completion of delimiter verification and frame tail data clearing are synchronized, eliminating the need for additional historical code group retrieval and data rearrangement control. Simultaneously, through a phased, differentiated anomaly clearing mechanism, it ensures that even if the termination delimiter verification fails at any stage, the frame tail data buffered within the delay chain can still be output completely step-by-step. This prevents premature termination from truncating the valid data of the current frame and avoids residual data from contaminating the reception and processing of subsequent frames. Furthermore, the entire clearing process maintains effective reception error indication, ensuring that the upper layer can accurately perceive frame anomalies and improving the determinism and reliability of frame termination processing at the 10BASE-T1L physical coding sublayer receiver.
[0080] As an extension and refinement of the above embodiments, the receiving state machine returns to the idle state after a reliable idle detection in the bad termination delimiter state; the idle state is used to indicate the standby working state where there is no valid data frame transmission on the link and the receiving end is waiting to identify the start delimiter.
[0081] The bad termination delimiter state is an abnormal handling state of the receiver state machine. When the step-by-step check of the termination delimiter fails at the second, third, or fourth termination code group stage, and all frame tail history code groups in the delay chain have been emptied and output, the receiver state machine enters the bad termination delimiter state. In this state, the valid received data signal is withdrawn, while the received error signal remains valid, indicating that the current frame has abnormally ended due to the failure of the delimiter check.
[0082] The state cannot be directly switched from the bad termination delimiter state to the idle state. This is because the idle condition of a single code group may be temporary and sporadic. For example, line noise may cause a code group to happen to present the pattern of an idle code group. If the state is allowed to return based on only a single match, the state machine may prematurely exit the abnormal state before the link has truly entered the idle state, thereby incorrectly starting the receive waiting process for the next frame and causing subsequent data reception errors.
[0083] In the idle state, the receiver state machine continuously waits to detect the first code group of the start delimiter; once the COMMA code group is detected, it leaves the idle state and enters the start delimiter check process to start the reception processing of the next frame.
[0084] Through the aforementioned reliable idle detection mechanism, state recovery under the bad termination delimiter state has clear and verifiable judgment conditions. It is not based on a single, accidental code group match, but rather on the cumulative confirmation of multiple consecutive valid idle matches. This mechanism avoids erroneous state switching caused by occasional code pattern misjudgments, ensuring the reliability and determinism of abnormal state convergence. This reliable idle detection mechanism is also applicable to state recovery processing under the bad start delimiter state.
[0085] Specifically, the reliable idle detection includes the following steps 1-4: Step 1: Periodically determine whether the currently received code group meets the valid idle condition.
[0086] Within each code group period, the receiver state machine performs a valid idle condition check on the current received code group. The valid idle condition includes both code group legality and descrambling phase matching: the current received code group belongs to the valid 4B3T data code group set, that is, there is a valid mapping in the 4B3T encoding table and it does not belong to an illegal code type; and specific bits (usually the lower two bits) of the inverse mapping result of the current received code group are consistent with the corresponding bits in the descrambling sequence word generated by the local sidestream descrambler, such as index 2 and index 0, in a predetermined order, that is, the decoding result matches the current descrambling phase.
[0087] A valid idle match is determined if both of the above conditions are met simultaneously; if only the code combination property is met but the descrambling phase matching is not met, it is not considered a valid idle match.
[0088] Step 2: If satisfied, increment the consecutive idle count by one.
[0089] If the currently received code group meets the valid idle condition, it means that a valid idle match has been detected within the current code group period. At this time, the continuous idle counter is incremented by 1 to accumulate the number of code group periods that meet the condition consecutively, which serves as the basis for determining the subsequent state switch.
[0090] Step 3: If the condition is not met, the continuous idle count will be reset to zero.
[0091] If the currently received code group does not meet the valid idle condition, that is, the code group itself is an illegal code pattern, or the decoding result does not match the current descrambling phase, it means that the continuous valid idle link has been interrupted. At this time, the continuous idle count is cleared to zero and accumulation starts again.
[0092] This linkage mechanism of incrementing and resetting is key to reliable idle detection in distinguishing between occasional code pattern matches and genuine link idleness. This is because the genuine link idle state is continuous; during the idle period, each code group cycle will meet the valid idle condition, and the count will continue to increment until it reaches the preset number. In contrast, single matches caused by line noise or transient interference are not continuous and will be reset to zero in the next code group cycle because the condition is not met, thus failing to reach the trigger threshold for state switching.
[0093] Step 4: When the continuous idle count reaches a preset number, a reliable idle detection result is generated, and the receiving state machine is controlled to switch from the bad termination delimiter state to the idle state.
[0094] When the continuous idle count accumulates to a preset number, such as three times, it indicates that the receiver has detected a valid idle match for multiple consecutive code group cycles, confirming that the link has truly entered an idle state. At this time, a reliable idle detection result is generated, and the receiver state machine is controlled to return from the bad termination delimiter state to the idle state, preparing for the reception and processing of the next frame.
[0095] Through the aforementioned multi-step decision-making mechanism executed in a loop, state recovery under the bad termination delimiter state has clear and verifiable decision conditions. The cumulative decision based on multiple consecutive confirmations replaces the immediate response of a single match, thus preventing erroneous state switching caused by occasional interference. This mechanism also applies to state recovery under the bad start delimiter state, effectively ensuring the reliability and determinism of abnormal state convergence.
[0096] For ease of understanding, the decision logic for reliable idle detection can be shown in Table 1 below: Table 1
[0097] In the example above, the preset number of attempts is three. If the condition is not met at any time, the count is reset to zero, and the condition needs to be met three consecutive times before a reliable idle detection result can be triggered again. This mechanism ensures that the state machine will not prematurely exit the abnormal state due to a single or occasional match before the link is truly idle.
[0098] The reliable idle detection mechanism of this application uses a dual verification standard of code combination sanity and descrambling phase matching, combined with a linkage judgment logic of continuous accumulation and clearing if the condition is not met. This can effectively distinguish between occasional code pattern matching caused by line noise and transient interference and the real link idle state. The mechanism avoids state machine error switching and subsequent data reception disorder caused by a single misjudgment. This mechanism can simultaneously adapt to convergence scenarios of two types of abnormal states: bad termination delimiter and bad start delimiter. It improves the anti-interference capability and operational robustness of the receiving state machine and further ensures the transmission reliability and stability of the 10BASE-T1L long-distance industrial Ethernet link.
[0099] As an extension and refinement of the above embodiments, the start delimiter sequentially includes a first start code group, a second start code group, a third start code group, and a fourth start code group; the method further includes the following steps: Step 1: In the idle state, when the code group control path recognizes the first starting code group, it controls the receiving state machine to enter the start delimiter check state.
[0100] It should be noted that the idle state is a standby operating state in which the receiving state machine waits to detect the start boundary of the next frame. In this state, the valid data reception signal remains invalid, and there is no valid data frame transmission on the link. When the code group control path identifies the current received code group as a COMMA code group, this code group is determined to be the first start code group. However, since the start delimiter is composed of four code groups in a preset order, the receiving end cannot confirm the complete frame start boundary based on a single COMMA code group. Therefore, the state machine does not directly enter the data reception state, but instead enters the start delimiter check state, initiating a step-by-step check process for subsequent code groups.
[0101] Step 2: In the start delimiter check state, the currently received code group is matched and verified with the second start code group, the third start code group, and the fourth start code group in sequence.
[0102] In the start delimiter check state, the receiver state machine performs matching and verification step by step according to the code group arrangement order of the start delimiters, using code group periods as the unit. Specifically, the state machine first enters the second start code group check state, matching the current received code group with the second start code group (COMMA code group): if they match, it enters the third start code group check state; if they do not match, the start delimiter check is deemed to have failed, and it enters the bad start delimiter state. In the third start code group check state, the current received code group is matched with the third start code group (DISPRESET3 code group): if they match, it enters the fourth start code group check state; if they do not match, it enters the bad start delimiter state. Through this step-by-step matching, the state machine only advances to the next check state after the current level of matching is successful, thus ensuring the sequentiality and reliability of the start boundary determination. It is important to emphasize that the valid received data signal remains invalid until all four start code groups have been successfully matched, to prevent incomplete start delimiters from generating false preambles.
[0103] Step 3: When the fourth start code group is successfully matched, the complete identification start delimiter is confirmed, and the receiving state machine is controlled to enter the preamble output state, and a predetermined number of reconstructed preamble code groups are output sequentially.
[0104] When the fourth start code group (SSD4 code group) matches successfully, it indicates that all four code groups of the start delimiter have been matched in a preset order, and the receiver confirms that a complete and valid frame start boundary has been detected. At this time, the state machine enters the preamble output state, sequentially outputting a predetermined number of reconstructed preamble code groups. The reconstructed preamble code groups are fixed code patterns specified by the protocol (such as each preamble code group outputting a half-byte value of 0101), used to synchronize the downstream MAC's receive clock before data output, ensuring data reception timing alignment between the receiver and the MAC. During the preamble output, the receive data valid signal is set to valid, instructing the MII interface to start outputting valid data.
[0105] Step 4: In the output cycle of the last reconstructed preamble group, reset the receive operation deviation value based on the fourth start code group output at the end of the delay chain.
[0106] The operating deviation is a state variable used in 4B3T coding to maintain the DC balance of the line. The receiver needs to reset it to the correct initial value during the frame start phase. Because the delay chain delays the current received code group by a fixed number of cycles (four cycles), the fourth start code group is output from the end of the delay chain after a four-cycle delay. This output moment corresponds precisely to the output cycle of the last reconstructed preamble code group; at this point, all four code groups of the start delimiter have been checked, the preamble code group is about to be output, and the data reception phase is about to begin.
[0107] At this moment, the SSD4 code group output from the final stage of the delay chain carries the transmitter's operational deviation information for that code group. The receiver resets the received operational deviation to the corresponding initial value (such as 2 or 3, depending on the actual code pattern of the SSD4 code group) based on this SSD4 code group. This beat alignment relationship ensures that the start delimiter check, preamble reconstruction, operational deviation reset, and recovery of the first subsequent data code group are all within a defined beat alignment, guaranteeing that the received operational deviation is in the correct initial state at the start of the data reception phase.
[0108] Through steps one through four described above, this application achieves a complete identification and processing flow for the start delimiter. Step one triggers the start check, step two completes the step-by-step matching verification, step three confirms the start boundary and outputs the preamble, and step four resets the running deviation at the determined beat position. The above steps work in conjunction with the dual-path parallel architecture described in S21 to S23. The code group control path is responsible for delimiter identification and state decision-making, while the delay recovery path is responsible for the preamble code group output and the delayed output of SSD4. The two paths work in parallel under the same code group synchronization enable signal, jointly establishing the correct start state for the subsequent data reception stage.
[0109] It should be noted that this application embodiment also introduces a receive watchdog mechanism to prevent the receive state machine from residing in the receive class state indefinitely under abnormal circumstances.
[0110] When the receiver state machine is in a receive-type state, the receive watchdog counter increments with the code group synchronization enable signal, and the receive watchdog counter maintains continuous counting as the receiver state machine transitions between various receive sub-states. When the count value of the receive watchdog counter reaches a preset threshold, the receiver state machine is forcibly transitioned to a link failure state.
[0111] Specifically, the receive watchdog counter starts counting when the receive state machine is in a receive-type state. Receive-type states refer to various states of the receive state machine related to data frame reception, including but not limited to: start delimiter check state, preamble reconstruction state, data reception state, end delimiter check state, error clearing state, bad start delimiter state, and bad end delimiter state. All of these states indicate that a frame of data is being processed or that the process is in the frame processing flow, distinguishing them from non-receive states such as idle state, waiting for synchronization state, and link failure state.
[0112] When the receiver state machine is in the receive state, the receiver watchdog counter increments with each code group synchronization enable signal, that is, the count increases by one every time a frame is processed. This counter continuously measures the total dwell time of the receiver state machine in the current frame processing flow.
[0113] When the receiving state machine transitions between receiving sub-states, the receiving watchdog counter remains continuously counted, without being cleared or reset. This means that from the start delimiter check, through preamble reconstruction, data reception, end delimiter check, and even error clearing and bad delimiter states, the time taken for the entire receiving process is continuously accumulated and counted, rather than being timed separately for each sub-state; thus ensuring the integrity and accuracy of timeout determination and preventing timeout detection from being circumvented due to state segmentation.
[0114] When the count value of the receive watchdog counter reaches a preset threshold, it indicates that the total dwell time of the receive state machine in the receive state has exceeded the maximum allowed value. Possible reasons include: the peer of the link sending an incomplete frame (lacking a termination delimiter), deterioration of the link signal quality leading to delimiter loss, or the receive state machine getting stuck in a certain receive sub-state due to an anomaly. At this time, the watchdog counter triggers a timeout protection action: forcibly controlling the receive state machine to transition to the link failure state and exiting the current receive process.
[0115] Link failure is one of the error states of the receiver state machine. Upon entering this state, the valid data reception signal is revoked, the reception error signal is set, and the watchdog counter is reset to zero. The receiver process resumes only after the link is restored. This threshold is typically set to 10,000 code period, which corresponds to approximately 4ms when the nominal frequency of the recovery symbol clock is 7.5MHz. This is sufficient to cover the maximum transmission time of one frame of normal data and can trigger protection promptly in abnormal situations.
[0116] The receive watchdog mechanism described in this step complements the aforementioned reliable idle detection mechanism. Reliable idle detection prevents premature exit from abnormal states, thus avoiding false recovery caused by false idle; the receive watchdog prevents abnormal states from persisting indefinitely, thus avoiding state machine deadlock caused by true deadlock. Together, they form a complete convergence system for the receiving state machine under abnormal paths, ensuring that the receiving state machine can eventually return to a deterministic state under any circumstances.
[0117] In some embodiments, the physical coding sublayer receiving state machine includes three main categories of working states: Standby states: waiting for synchronization, waiting for scrambling code synchronization, and idle state.
[0118] Receiver status: Start delimiter check status, first to fourth preamble reconstruction status, data reception status, end delimiter check status, error clearing status, bad start delimiter status, bad end delimiter status.
[0119] Fault status: Link failure status.
[0120] When the code group synchronization establishment pulse arrives, the state machine first enters the waiting scrambling code synchronization state, and at the same time completes state initialization: setting the receive operation deviation to 2, clearing the receive watchdog count, deviation error status, error clearance count, and reliable idle count to zero, and canceling the receive data valid signal and the receive error signal, without directly entering the idle state. The state machine only enters the idle state when all four conditions are met simultaneously: RSTCD is valid, the scrambling code synchronization state is normal, the link state is normal, and the local receiver state is normal.
[0121] Abnormal transitions caused by link state anomalies, local receiver state anomalies, or receiver watchdog timeouts have higher priority than all regular state transitions. When the receiver state machine is in any receiver-type state, if any of the above abnormal conditions occur, the state machine will be directly forced to transition to the link failure state.
[0122] The link failure state exits under subsequent RSTCDs according to the following conditions: if the link state or the local receiver state is still abnormal, it enters the waiting scrambling code synchronization state; if both are restored, it enters the idle state. If the scrambling code synchronization state has not yet been restored, the idle state will transition to the waiting scrambling code synchronization state in the next RSTCD.
[0123] In conjunction with the above embodiments, refer to Figure 4As shown, this application also provides a system architecture diagram corresponding to the dual-path collaborative processing method based on 10BASE-T1L. The architecture includes: a three-symbol code group formation and code group clock generation module 41, a code group checking module 421, a PCS receive state control module 422, a receive state access and reliable idle detection module 423, an error clearing control module 424, a code group and descrambling sequence parallel delay module 431, a delayed data recovery module 432, an operation deviation processing module 433, and an MII output module 434.
[0124] The three-symbol code group formation and code group clock generation module 41 receives three-level received symbols from the PMA sublayer, assembles every three consecutive symbols into a six-bit parallel data block, i.e., the current received code group, and generates a code group synchronization enable signal (RSTCD) upon completion of assembly, which serves as a unified timing reference for all subsequent code group-level processing. This current received code group is sent to the code group checking module 421 and the code group and descrambling sequence parallel delay module 431 via the same fan-out node.
[0125] The code group checking module 421 is located before the received code group delay register chain and is used to perform step-by-step checks on the delimiters of the current received code group without delay, compare the current received code group with the expected code group corresponding to the current checking state, and obtain a matching result. The PCS receiving state control module 422 is used to determine the target state based on the matching result and control the receiving state machine to transition from the current state to the target state.
[0126] The receive state access and reliable idle detection module 423 is used to generate a reliable idle detection result by repeatedly determining whether the current received code group meets the valid idle condition in the bad delimiter state, and control the receive state machine to return to the idle state. The error clearing control module 424 is used to determine the number of clearing frames according to the failure stage when the step-by-step check of the termination delimiter fails, and control the delay recovery path to output the remaining frame tail data in the delay chain frame by frame.
[0127] The parallel delay module 431 for code groups and descrambling sequences includes a receiving code group delay register chain and a descrambling sequence delay register chain of the same number of stages. Both chains are synchronously shifted by the same code group synchronization enable signal. The delayed data recovery module 432 is connected to the last stage of the two delay register chains and is used to perform 4B3T inverse mapping on the delayed historical code groups, and to perform descrambling using the delayed descrambling sequence word that arrives synchronously at the last stage. The operation deviation processing module 433 is used to perform operation deviation checks and updates on the delayed historical code groups. The MII output module 434, under the control of the PCS receive status control module 422, latches and outputs the recovered data, the received data valid signal, and the received error signal.
[0128] The above modules work together to form a dual-path collaborative processing system based on 10BASE-T1L, which is used to execute the steps described in the above method embodiments.
[0129] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method.
[0130] The embodiments of this application also provide a dual-path collaborative processing device based on 10BASE-T1L, which corresponds one-to-one with the method claims. Figure 5 This is a schematic diagram of the structure of the dual-path collaborative processing device 500 based on 10BASE-T1L provided in this disclosure, as shown below. Figure 5 As shown, the device 500 of this embodiment includes: The acquisition unit 51 is configured to, in response to the code group synchronization enable signal, acquire the current state of the current received code group and the receiving state machine of the physical coding sublayer of the receiving end, and simultaneously input the current received code group into the code group control path and the delay recovery path in parallel; the delay recovery path includes a delay chain for delaying the current received code group. The processing unit 52 is configured to determine the corresponding expected code group according to the current state, and use the code group control path to compare the current received code group with the expected code group to obtain a matching result, and determine the target state according to the matching result, and control the receiving state machine to transition from the current state to the target state. The processing unit 52 is further configured to use the delay recovery path to decode and recover the historical code group after the delay chain and the descrambling sequence corresponding to the historical code group, and output the recovered data corresponding to the historical code group.
[0131] As an optional implementation of this application, the expected code group includes a set of code groups corresponding to delimiters; the delimiters include a start delimiter and a stop delimiter; wherein the start delimiter and the stop delimiter are each composed of a plurality of expected code groups arranged in a preset order.
[0132] As an optional implementation of this application, the delay recovery path includes a received code group delay register chain and a descrambling sequence delay register chain; the processing unit 52 is further configured to write the current received code group into the received code group delay register chain and write the descrambling sequence word corresponding to the timing of the current received code group into the descrambling sequence delay register chain; wherein, the two delay register chains are synchronously shifted by the same code group synchronization enable signal, so that the historical code group of the delay output and the corresponding descrambling sequence maintain a one-to-one timing correspondence.
[0133] As an optional implementation of this application, the received code group delay register chain delays the current received code group by a fixed number of beats, the fixed number of beats being the same as the number of expected code groups contained in each of the start delimiter and the end delimiter.
[0134] As an optional implementation of this application, the termination delimiter sequentially includes a first termination code group, a second termination code group, a third termination code group, and a fourth termination code group; the processing unit 52 is further configured to, when the receiving state machine is in the data receiving state, when the code group control path identifies the first termination code group, control the delay recovery path to output the historical code groups buffered in the delay chain as frame tail data step by step during the step-by-step checking period of the second, third, and fourth termination code groups; when the step-by-step checking of the termination delimiter fails at any stage, determine the number of remaining historical code groups to be output in the delay chain according to the stage where the check fails, and set the number of empty steps according to the number of remaining historical code groups to be output; within the code group period corresponding to the number of empty steps, control the delay recovery path to output the remaining frame tail data step by step, and keep the receiving error indication valid; after all the remaining frame tail data in the delay chain has been output step by step, control the receiving state machine to enter the bad termination delimiter state.
[0135] As an optional implementation of this application, the receiving state machine returns to the idle state after a reliable idle detection in the bad termination delimiter state; the idle state is used to indicate a standby working state where there is no valid data frame transmission on the link and the receiving end is waiting to identify the start delimiter; the reliable idle detection includes: periodically determining whether the current received code group meets the valid idle condition on a code group-by-code group basis; if it meets the condition, the continuous idle count is incremented by one; if it does not meet the condition, the continuous idle count is cleared to zero; when the continuous idle count reaches a preset number of times, a reliable idle detection result is generated, and the receiving state machine is controlled to return to the idle state from the bad termination delimiter state.
[0136] As an optional implementation of this application, the start delimiter sequentially includes a first start code group, a second start code group, a third start code group, and a fourth start code group; the processing unit 52 is further configured to, in an idle state, when the code group control path identifies the first start code group, control the receiving state machine to enter the start delimiter check state; in the start delimiter check state, sequentially perform matching verification between the current received code group and the second start code group, the third start code group, and the fourth start code group; when the fourth start code group matches successfully, confirm that the start delimiter has been completely identified, control the receiving state machine to enter the preamble output state, and sequentially output a predetermined number of reconstructed preamble code groups; in the output cycle of the last reconstructed preamble code group, reset the receiving operation deviation value based on the fourth start code group output at the end of the delay chain.
[0137] As an optional implementation of this application, the processing unit 52 is further configured to, when the receiving state machine is in a receiving state, increment the receiving watchdog counter with the code group synchronization enable signal, and keep the receiving watchdog counter counting continuously when the receiving state machine transitions between various receiving sub-states; and when the count value of the receiving watchdog counter reaches a preset threshold, forcibly control the receiving state machine to transition to a link failure state.
[0138] For a description of the features in the embodiment of the dual-path collaborative processing device based on 10BASE-T1L, please refer to the relevant description of the embodiment of the dual-path collaborative processing method based on 10BASE-T1L, which will not be repeated here.
[0139] Embodiments of this application also provide an electronic device, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the embodiments of the 10BASE-T1L-based dual-path collaborative processing method described above.
[0140] Embodiments of this application also provide a computer-readable storage medium storing a computer program, wherein the computer program is configured to execute the steps in any of the embodiments of the 10BASE-T1L-based dual-path collaborative processing method described above when running.
[0141] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard disk, magnetic disk, or optical disk.
[0142] The embodiments of this application also provide a computer program product, which includes a computer program that, when executed by a processor, implements the steps in any of the embodiments of the dual-path collaborative processing method based on 10BASE-T1L.
[0143] Embodiments of this application also provide another computer program product, including a non-volatile computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps in any of the embodiments of the 10BASE-T1L-based dual-path collaborative processing method described above.
[0144] Any of the components, modules, units, parts, methods, and operations described herein can be implemented using software, firmware, hardware (e.g., fixed logic circuitry), manual processing, or any combination thereof. Alternatively or additionally, any functionality described herein can be executed at least in part by one or more hardware logic components, such as, but not limited to, a central processing unit (CPU), a field-programmable gate array (FPGA), an application-specific integrated circuit (ASIC), an application-specific standard product (ASSP), a system-on-a-chip (SoC), a complex programmable logic device (CPLD), a microprocessor (MCU), etc. The terms "system," "computing device," or "apparatus" as used herein encompass various means, devices, and machines for processing data, including, for example, one or more programmable processors, computers, SoCs, or combinations thereof. The apparatus may also include code that creates an execution environment for the computer program in question, such as code constituting processor firmware, a protocol stack, a database management system, an operating system, a cross-platform runtime environment, a virtual machine, or one or more combinations thereof. The aforementioned computer program (also known as a program, software, software application, app, script, or code) can be written in any form of programming language, including compiled or interpreted languages, declarative or procedural languages, and can be deployed in any form, including as a standalone program or as a module, component, subroutine, object, or other unit suitable for a computing environment.
[0145] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for various specific applications, but such implementations should not be considered beyond the scope of this application.
[0146] The foregoing has provided a detailed description of a dual-path collaborative processing method, apparatus, and electronic device based on 10BASE-T1L provided in this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are merely for the purpose of helping to understand the method and its core ideas. It should be noted that those skilled in the art can make various improvements and modifications to this application without departing from its principles, and these improvements and modifications also fall within the protection scope of the claims of this application.
Claims
1. A dual-pathway collaborative processing method based on 10BASE-T1L, characterized in that, Applied to the receiving end, including: In response to the code group synchronization enable signal, the current state of the current received code group and the receiver state machine of the physical coding sublayer of the receiver is obtained, and the current received code group is simultaneously and in parallel input to the code group control path and the delay recovery path; the delay recovery path includes a delay chain for delaying the current received code group; Based on the current state, the corresponding expected code group is determined, and the code group control path is used to compare the current received code group with the expected code group to obtain a matching result. Based on the matching result, the target state is determined, and the receiving state machine is controlled to transition from the current state to the target state. The historical code group and the corresponding descrambled sequence after being delayed by the delay chain are decoded and recovered using the delay recovery path, and the recovered data corresponding to the historical code group is output.
2. The method according to claim 1, characterized in that, The expected code group includes a set of code groups corresponding to delimiters; the delimiters include a start delimiter and a stop delimiter. The start delimiter and the end delimiter are each composed of multiple expected code groups arranged in a preset order.
3. The method according to claim 1, characterized in that, The delay recovery path includes a received code group delay register chain and a descrambling sequence delay register chain; After obtaining the current received code group, the method further includes: Write the current received code group into the received code group delay register chain, and write the descrambling sequence word corresponding to the timing of the current received code group into the descrambling sequence delay register chain; Among them, the two delay register chains are driven by the same code group synchronization enable signal to synchronously shift, so that the historical code group of the delayed output and the corresponding descrambling sequence maintain a one-to-one timing correspondence.
4. The method according to claim 3, characterized in that, The received code group delay register chain delays the current received code group by a fixed number of beats, the fixed number of beats being the same as the number of expected code groups contained in each of the start delimiter and the end delimiter.
5. The method according to claim 2, characterized in that, The termination delimiter includes, in sequence, a first termination code group, a second termination code group, a third termination code group, and a fourth termination code group; When the receiving state machine is in the data receiving state, when the code group control path identifies the first termination code group, it controls the delay recovery path to output the historical code groups cached in the delay chain as frame tail data frame by frame during the step-by-step checking period of the second termination code group, the third termination code group, and the fourth termination code group. When the step-by-step check of the termination delimiter fails at any stage, the number of remaining historical code groups to be output in the delay chain is determined according to the stage at which the check fails, and the number of empty frames is set according to the number of remaining historical code groups to be output; within the code group period corresponding to the number of empty frames, the delay recovery path is controlled to output the remaining frame tail data frame by frame, and the reception error indication is kept valid; after all the remaining frame tail data in the delay chain has been output frame by frame, the receiving state machine is controlled to enter the bad termination delimiter state.
6. The method according to claim 5, characterized in that, The receiving state machine returns to the idle state after a reliable idle detection in the bad termination delimiter state; The idle state is used to indicate a standby working state where there is no valid data frame transmission on the link and the receiving end is waiting to identify the start delimiter; The reliable idle detection includes: Periodically determine whether the currently received code group meets the valid idle condition; If satisfied, increment the consecutive idle count by one; If the condition is not met, the continuous idle count will be reset to zero. When the continuous idle count reaches a preset number, a reliable idle detection result is generated, and the receiving state machine is controlled to return from the bad termination delimiter state to the idle state.
7. The method according to claim 2, characterized in that, The starting delimiter sequentially includes a first starting code group, a second starting code group, a third starting code group, and a fourth starting code group; the method further includes: In the idle state, when the code group control path recognizes the first starting code group, it controls the receiving state machine to enter the start delimiter check state. In the start delimiter check state, the currently received code group is sequentially matched and verified with the second start code group, the third start code group, and the fourth start code group; When the fourth start code group is matched, the complete identification start delimiter is confirmed, and the receiving state machine is controlled to enter the preamble output state, and a predetermined number of reconstructed preamble code groups are output sequentially. In the output cycle of the last reconstructed preamble group, the receive operation deviation value is reset based on the fourth start code group output at the end of the delay chain.
8. The method according to claim 1, characterized in that, The method further includes: When the receiving state machine is in the receiving state, the receiving watchdog counter increments with the code group synchronization enable signal, and the receiving watchdog counter keeps counting continuously when the receiving state machine transitions between each receiving sub-state. When the count value of the receive watchdog counter reaches a preset threshold, the receive state machine is forcibly controlled to transition to a link failure state.
9. A dual-path collaborative processing device based on 10BASE-T1L, characterized in that, include: The acquisition unit is configured to, in response to a code group synchronization enable signal, acquire the current state of the currently received code group and the receiver state machine of the physical coding sublayer of the receiver, and simultaneously input the current received code group into the code group control path and the delay recovery path in parallel; the delay recovery path includes a delay chain for delaying the current received code group. The processing unit is configured to determine the corresponding expected code group based on the current state, and use the code group control path to compare the current received code group with the expected code group to obtain a matching result, and determine the target state based on the matching result, and control the receiving state machine to transition from the current state to the target state. The processing unit is further configured to use the delay recovery path to decode and recover the historical code group after the delay chain and the descrambling sequence corresponding to the historical code group, and output the recovered data corresponding to the historical code group.
10. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor, configured to implement the steps of the 10BASE-T1L-based dual-path collaborative processing method as described in any one of claims 1 to 8 when executing the computer program.
