Byte stuffing circuit and byte stuffing method
AssigneeUfi Space co., Ltd.
InventorYu-Min Wang
Life of this patent
Estimating the term…
Abstract
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.
Claims10
A byte stuffing circuit, comprising:
- an input gate, receiving a first data stream and generating a second data stream according to the first data stream, wherein a first size of the first data stream is N bytes, and a second size of the second data stream is 2N bytes, wherein N is a positive integer;
- a logic circuit, coupled to the input gate, comprising:
- an Xth stage logic gate, overwriting the Xth byte with a first stuffing byte in response to the Xth byte of the second data stream matching a first flag byte and inserting a second stuffing byte into an (X+1)th byte of the second data stream, wherein X is a positive integer between 1 and 2N−1;
- a remnant register, storing a remnant data stream;
- a remnant gate, coupled to the logic circuit and the remnant register, wherein the remnant gate combines the remnant data stream and a first part of the second data stream to generate a third data stream and configures a second part of the second data stream as the remnant data stream;
- and
- an output gate, coupled to the remnant gate, outputting the third data stream.
A byte stuffing method, comprising:
- receiving a first data stream and generating a second data stream according to the first data stream, wherein a first size of the first data stream is N bytes, and a second size of the second data stream is 2N bytes, wherein N is a positive integer;
- overwriting the Xth byte with a first stuffing byte in response to an Xth byte of the second data stream matching a first flag byte and inserting a second stuffing byte into an (X+1)th byte of the second data stream, wherein 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.
Dependencies are inferred from the claim text.