Lumina Blocks
Data Compression
Preview · v0.1.0

LM-LZS-E

LZ4/Snappy Data Compressor

  • Standards-compliant framing emitted by the core
  • Configurable search window
  • Stored-block fallback
  • Portable to any FPGA

LM-LZS-E is a lossless compression IP core for FPGA and SoC designs.

The engine compresses data to LZ4 or Snappy in hardware, emitting standards-compliant framing directly from the core — an LZ4 frame with its checksums, a Snappy raw stream, or the Snappy framing format with a masked CRC-32C per chunk. The search window is configurable across the range the formats allow, and a block that does not compress is emitted uncompressed rather than expanded.

The core is delivered as vendor-neutral SystemVerilog and builds from one source on AMD, Altera and Efinix devices. It includes AMBA AXI interfaces and a register map, and ANSI C drivers are provided for fast integration into the target platform.

Measured FPGA results

Product top, out of context, constrained at the target clock. AMD and Efinix report LUTs, Altera reports ALMs; the two are never combined.

DeviceConfigurationLogicFFMemoryDSPFmax
Altera Agilex 3A3CW135BM16AE6S · quartus-pro 26.1.1HIST_B=128, LZ4_EN=1, SNAPPY_EN=1, STORED_EN=11,327 ALM1,534392 Kb M20K2208.5 MHztarget 205
AMD Kintex UltraScale+xcku3p-ffva676-1-e · vivado 2026.1HIST_B=128, LZ4_EN=1, SNAPPY_EN=1, STORED_EN=11,829 LUT1,08813 BRAM3311.4 MHztarget 300
AMD Kintex UltraScale+xcku3p-ffva676-1-e · vivado 2026.1HIST_B=128, LZ4_EN=1, SNAPPY_EN=1, SNAPPY_FRAMING_EN=1, STORED_EN=12,059 LUT1,22113 BRAM3316.7 MHztarget 300
Efinix Titanium Ti375Ti375N1156 · efinity 2026.1HIST_B=128, LZ4_EN=1, SNAPPY_EN=1, STORED_EN=19,840 LUT6,72749 RAM3216.1 MHztarget 205

Features

Formats

  • LZ4 frame format, complete: magic, descriptor, block headers, EndMark
  • Snappy raw stream format
  • Snappy framing format: stream identifier, one chunk per block, masked CRC-32C
  • Format selected at run time

Compression

  • Configurable search window from 128 bytes to 32 kB
  • Configurable maximum block size
  • Stored-block fallback — a block that does not compress is emitted uncompressed, so output never exceeds input by more than framing
  • xxHash-32 checksums for the LZ4 frame: header, per block and content

Reliability

  • Optional SECDED error correction on the search memory
  • A non-correctable error abandons the stream rather than emitting corrupt output

Integration

  • AMBA AXI4-Lite control, AXI4-Stream in and out
  • Independent input and output widths
  • Two delivery tops: complete AXI product, or bare compressor for a custom fabric
  • ANSI C driver, UVM RAL, IP-XACT, SystemRDL register description

Applications

  • Storage and filesystem compression offload
  • Network and RPC payload compression
  • Log and telemetry reduction at the source
  • Database page and column compression
  • Firmware and configuration image packing

Block diagram


Interfaces

InterfaceTypeWidthCarries
s_axilAXI4-Lite slave32-bitcapability, control, command, status, error pair, counters, stream_len
s_axisAXI4-Stream sinkIN_W, tkeep, tlastthe uncompressed stream
m_axisAXI4-Stream sourceOUT_W, tkeep, tlastthe compressed stream
irqlevel1-bitcompletion and error events

Snappy requires the uncompressed length before the first byte. That format's preamble is a varint carrying the length and is emitted ahead of any compressed data, so stream_len is written before the stream starts. LZ4 does not need it — its frame carries sizes after the fact.


Throughput

This core has one block engine, and its measured steady-state rate is published with the measured results on this page. The architecture's ceiling is below one input byte per clock and the reason is structural rather than a tuning matter: a scan position and a verified byte each cost a clock and they are different clocks, so a byte that is scanned and then extended through is paid for twice.

An integrator whose budget needs more throughput instantiates more than one engine, with an input scheduler and in-order output reassembly above them. The measured clock census behind the figure — the proportion of cycles spent in extension, scan, sequence handover and bank refusal — is published alongside it, so the ceiling can be checked rather than taken on trust.

cnt_in, cnt_out and cnt_cycles let a host measure the achieved rate on its own traffic.


Compression ratio

The ratio is not a register. It is cnt_in divided by cnt_out, computed by the driver over whatever window matters. A ratio reported by hardware is a number rounded at a moment the hardware chose.

Ratios measured against the reference software encoders at their default settings, on named corpora, are published with the measured results with the corpus, the window and the block size stated.


Configuration

ParameterTypeEffect
HIST_Belaborationsearch window in bytes, 128 to 32768 — the parameter that moves area most
MAX_BLOCKelaborationmaximum block size
IN_W, OUT_Welaborationstream widths, independent
LZ4_EN, SNAPPY_EN, STORED_ENelaborationformats and the stored-block path
SNAPPY_FRAMING_ENelaborationthe Snappy framing layer
CHECKSUM_EN, ECC_ENelaborationxxHash-32 checksums, search-memory SECDED
format selectrun timeLZ4 or Snappy

Resources and performance

Resource utilisation and maximum clock frequency for each target device are measured out of context and published per target in the measured results on this page, across the window ladder so the area cost of a larger window is visible. AMD and Efinix rows report LUTs; Altera rows report ALMs, and the two are never combined.


Deliverables

ItemContents
RTLparameterised SystemVerilog, vendor-neutral
Modelbit-accurate C++ model — and the specification of the encoding
RegistersSystemRDL source plus six generated exports
VerificationUVM RAL, formal property wrappers, corpus and vector drivers
SoftwareANSI C reference driver with generated header and JSON
PackagingIP-XACT, IEEE 1685-2022
Implementationrunnable flow script per FPGA vendor, file list, SDC
Documentationintegration guide

Privacy settings

Choose what this site may use. You can change your mind at any time from the Privacy settings link at the bottom of every page.

What the site needs to work, and the record of the choice you make here, kept in your browser. No cookies are set.

Always on

Would let us count visits and see which pages are useful, without advertising or cross-site tracking. We do not use any analytics today, so nothing is loaded whichever you choose.

Cookie policy · Privacy policy