Synchronous protocol encoding and decoding method
AssigneeMotorola, Inc.
InventorsPatrick J. Quirk, John C. Richards
Life of this patent
Estimating the term…
Abstract
A method to encode and to decode frames of data used in synchronous protocols, including HDLC and SDLC. The invention operates on blocks of data, such as data bytes or data words, in a parallel rather than a bit serial manner. The invention compares an aligned block of data with reference bit sequences for flag or abort signal detection, for zero detection, for zero deletion, for detection of consecutive one bits, and for zero insertion following a stream of consecutive one bits, for encoding and decoding according to various protocols. The invention also maintains proper data alignment following such zero insertions or deletions, and provides encoding and decoding under both data overrun and data underrun conditions.
Claims14
A method of decoding a data stream, said data stream having a frame, said frame having a first predetermined bit sequence at its beginning, said frame having a second predetermined bit sequence at its end, said frame further having encoded data between said first and second predetermined bit sequences, said method comprising:
- (a) locating said first predetermined bit sequence;
- (b) aligning said encoded data into a plurality of aligned encoded blocks based on said location of said first predetermined bit sequence;
- (c) performing a first comparison of at least one of said aligned encoded blocks with a plurality of reference bit sequences based on adjacent aligned encoded blocks;
- and
- (d) performing a second comparison of said at least one aligned encoded block with a second plurality of reference bit sequences based on a singular aligned encoded block;
- and
- (e) providing a decoded block as a result of said first and second comparisons;
- and
- (f) repeating steps (b), (c), (d) and (e) until said second predetermined bit sequence is located.
A method of decoding a stream of HDLC protocol encoded data, said stream having a frame, said frame having a first predetermined bit sequence at its beginning, said frame having a second predetermined bit sequence at its end, said frame further having encoded data between said first and second predetermined bit sequences, said method comprising:
- (a) forming said stream of HDLC protocol encoded data into a plurality of blocks;
- (b) locating said first predetermined bit sequence by performing a first comparison of at least one of said blocks with a plurality of reference bit sequences which indicate a possible occurrence of said first predetermined bit sequence, and detecting said first predetermined bit sequence as a result of said first comparison;
- (c) aligning said encoded data into a plurality of aligned encoded blocks, based on said location of said first predetermined bit sequence, by setting a shift index;
- (d) detecting a possible occurrence of an inserted zero bit in at least one of said aligned encoded blocks by
- a second comparison of said aligned encoded block with a plurality of reference bit sequences to determine said possible occurrence of an inserted zero bit, said second comparison based on adjacent aligned encoded blocks of data, and
- a third comparison of said aligned encoded block with a second plurality of reference bit sequences to determine said possible occurrence of an inserted zero bit, said third comparison based on a singular aligned encoded block;
- (e) upon detection of said inserted zero bit, deleting said occurring inserted zero bit to form a zero deleted block and shifting at least one bit from an adjacent aligned encoded block into said zero deleted block;
- (f) providing a decoded block of data;
- (g) maintaining alignment of aligned encoded blocks following said zero deletion by modifying said shift index as a result of said zero deletion;
- (h) detecting the occurrence of a data underrun, and upon said detection of a data underrun, idling until another encoded block of data is shifted for decoding;
- and
- (i) repeating steps (c) through (h) until said second predetermined bit sequence is located.
A method of decoding a plurality of aligned encoded blocks of data, the method comprising:
- performing a first comparison of each aligned encoded block of data with a first plurality of reference bit sequences to detect the presence of an inserted zero bit in the aligned encoded block of data, the first comparison based on adjacent aligned encoded blocks of data;
- performing a second comparison of each aligned encoded block of data with a second plurality of reference bit sequences to detect the presence of an inserted zero bit in the aligned encoded block of data, the second comparison based on a singular aligned encoded block of data;
- and
- decoding each of the aligned encoded blocks of data based on the first and second comparisons.
Dependencies are inferred from the claim text.