Byte Stuffing Circuit for Parallel Data Bus Width Constraints
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current byte stuffing methods for HDLC data in high-frequency Ethernet environments, when applied to parallel data, increase data size beyond the capacity of common FPGA or VLSI technologies, leading to operational frequency issues.
Innovation Solution
A byte stuffing circuit and method that includes an input gate, logic circuit, remnant register, and output gate, which generates a second data stream of 2N bytes by inserting stuffing bytes into specific positions of the first data stream, while maintaining the original bit-width, thereby preventing an increase in data size.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If byte stuffing is performed on parallel data by inserting stuffing bytes, then the HDLC data can be correctly formatted, but the data size increases beyond the capacity of common FPGA or VLSI technologies
Solution Approach 1:
The byte stuffing process is segmented into multiple stages corresponding to different byte positions. The logic circuit performs stuffing operations on specific byte positions (e.g., bytes 1-8 in one cycle, bytes 9-16 in the next cycle) rather than processing all bytes simultaneously. This segmentation allows the data to be processed in manageable chunks that fit within the fixed bit-width data bus capacity of FPGA/VLSI devices.
Solution Approach 2:
The data bus width is dynamically adjusted between parallel and serial modes. During parallel processing stages, the data bus operates at full width to process multiple bytes simultaneously. During stuffing operations, the effective data width is reduced to accommodate the inserted stuffing bytes without exceeding bus capacity. This dynamic adjustment allows the system to maintain both correct HDLC formatting and compatibility with fixed-capacity data buses.
2Reliability
If byte stuffing increases the data size, then the HDLC protocol requirements are met, but the operating frequency must be reduced to accommodate the larger data
Solution Approach 1:
The byte stuffing operation is performed periodically on specific byte positions rather than continuously on all bytes. The logic circuit identifies flag bytes at predetermined positions (e.g., every 8 bytes) and performs stuffing only at those periodic intervals. This periodic approach maintains HDLC protocol compliance while limiting the overall data size increase, thereby preserving higher operating frequencies.
Solution Approach 2:
The positions where byte stuffing will occur are predetermined and identified in advance by scanning for flag bytes at specific positions before the actual stuffing operation. This preliminary identification allows the system to prepare the data buffer in advance, performing stuffing only where necessary, thus minimizing the total data size increase and maintaining higher operating frequencies.
3Ease of manufacture
If the data bus capacity is fixed, then FPGA or VLSI technologies can be used, but byte stuffing cannot be performed on parallel data without exceeding bus capacity
Solution Approach 1:
The effective data width parameter is changed dynamically during the byte stuffing process. When a flag byte is detected at a specific position, the system adjusts the data width parameter to accommodate the inserted stuffing byte. For example, if a flag byte is found at position 5, the data width is temporarily reduced from 64 bits to 63 bits for that position, allowing the stuffing byte to be inserted without exceeding the fixed data bus capacity of standard FPGA/VLSI devices.
Data Source
AI summary
A byte stuffing circuit and a byte stuffing method are provided. The byte stuffing method includes: receiving a first data stream and generating a second data stream according to the first data stream, where a first size of the first data stream is N bytes, and a second size of the second data stream is 2N bytes; in response to an Xth byte of the second data stream matching a first flag byte, overwriting the Xth byte with a first stuffing byte, and inserting a second stuffing byte into an (X+1)th byte of the second data stream, where X is a positive integer between 1 and 2N−1; combining a remnant data stream and a first part of the second data stream to generate a third data stream, and configuring a second part of the second data stream as the remnant data stream; and outputting the third data stream.


