the wrap systolic pipe for sliding window compression
play

The "Wrap" Systolic Pipe for Sliding Window Compression - PowerPoint PPT Presentation

The "Wrap" Systolic Pipe for Sliding Window Compression input: a stream of uncompressed characters latch char[1] char[1] char[1] char[0] char[0] char[0] BestLength BestLength BestLength (0,0) BestDisp BestDisp BestDisp


  1. The "Wrap" Systolic Pipe for Sliding Window Compression input: a stream of uncompressed characters latch char[1] char[1] char[1] char[0] char[0] char[0] BestLength BestLength BestLength (0,0) BestDisp BestDisp BestDisp Length[1] Length[1] Length[1] combiner Length[0] Length[0] Length[0] 1 n / 2 n / 2 - 1 n / n / 2 output: a stream of (displacement,length) pairs Idea: For a window of length n , characters flow from Processor n/2 to 1 and then back from Processor 1 to n. A s each character goes from processor n/2 to processor 1 , it passes by the n characters that precede it in the input stream. - 1 -

  2. Length Variables: Each processor uses a variable Length to keep track of a run of single character matches and characters carry along with them BestLength and BestDisp for the longest match seen thus far. The latch processor: In the naive implementation described above, a character goes from the input stream to the combiner and only looks at matches that have odd displacements (but misses matches that have even displacements because the bottom row of characters shifts left at the same time that the top row shifts right). We fix this by on even steps having the bottom row shift left (and the leftmost character in Processor 1 goes into the latch) and on odd steps the top row shifts right (and the character in the latch goes into Processor 1); matches discovered at even steps are accumulated in Length[0] and matches discovered at odd steps are accumulated in Length[1]. Latch algorithm: If parity=0 then receive a character; otherwise output a character. Combiner algorithm: The combiner throws out pointers that point to a prefix of a longer match. Each time a displacement, length pair (x,y) is received from processor 1; output it only if the following pair is not (x,y+1) . - 2 -

  3. Processor Initialization: Each processor initializes all local variables to 0. Processor algorithm for each time step: SHIFT char[parity] if parity=0 then SHIFT BestLength and BestIndex if char[0] = char[1] then increment length[parity] else length[parity] = 0 if length[parity] > BestLength then begin BestLength := length[parity] BestDisp := index+parity end complement parity - 3 -

Recommend


More recommend