邓计才 尹红霞
摘 要: miniLZO解压缩算法是一种轻量级的无损解压缩算法,广泛应用于网络传输中。为提高解压速度,降低传输延迟,该文充分利用FPGA的并行性,设计高速缓存方案和基于状态机的解压缩方案,实现了miniLZO的硬件解压缩算法。该硬件解压缩算法在Xilinx公司XC7K325T FPGA芯片上进行了工程实现,测试结果显示,最高吞吐率可达到164 MB/s。该硬件解压缩方案速度快、功能完备、便于移植,具有较强的工程实用性。
关键词: miniLZO; FPGA; 解压缩算法; 网络传输; 高速缓存; 状态机
中图分类号: TN919?34 文献标识码: A 文章编号: 1004?373X(2018)22?0106?04
Abstract: The miniLZO decompression algorithm is a lightweight lossless decompression algorithm, which is widely used in network transmission. The high?speed cache scheme and the decompression scheme based on the state machine are designed in this paper by making full use of the parallelism of the FPGA to implement the miniLZO hardware decompression algorithm, so as to improve the decompression speed and reduce transmission delay. Engineering implementation of the hardware decompression algorithm is performed on the XC7K325T FPGA chip of Xilinx Company. The test results show that the maximum throughput of the algorithm can reach 164 MB/s, and the hardware decompression scheme has fast speed, complete function, and is easy to be transplanted, which has a strong engineering practicability.
Keywords: miniLZO; FPGA; decompression algorithm; network transmission; high?speed cache; state machine
LZO是一个开源的无损压缩C语言库,是致力于解压速度的一种数据压缩算法,其程序是线性安全的,LZO压缩和解压缩因其比较迅速且占用内存小等特点,广泛应用于网络传输中。miniLZO是一种轻量级的压缩和解压缩库,它是基于LZO压缩和解压缩算法实现的。LZO虽然功能强大,但是编译后的库文件较大,而miniLZO编译后的库则小于5 Kbit,因此miniLZO是为那些仅需要简单压缩和解压缩功能的程序而设计。
FPGA采用流水线与并行运算,在数据处理中具有高效灵活的特点,适用于硬件的解压缩的实现[1?2]。基于FPGA的硬件解压缩方案具有速度快、处理能力强的优点,因此得到了人们的重视。本文首先对miniLZO算法进行简单分析,然后根据解压缩算法原理设计出可移植的FPGA电路,并进行测试与验证,最后对全文进行总结。
LZO压缩算法在压缩过程中会采用特定的算法判断当前字符串是否会在历史字符串(已经处理过的字符串)中出现过,如果出现过(定义为重复字符),则计算重复字符串的长度和指回距离,采用(重复长度,指回距离)代替当前的重复字符串。……