Example Design - 2.1 English

Lossless Compression LogiCORE IP Product Guide (PG387)

Document ID
PG387
Release Date
2022-11-18
Version
2.1 English

The following figures show the block diagrams of the example design for this core in Compression Mode and Decompression Mode.

Compression Mode

The example design in Compression Mode has a block memory to store the decompressed data. Once the reset is released for the example design, the control logic sends the decompressed data on the AXI4-Stream interface to the core in Compression mode whose output is decompressed using the core in decompression mode. The control logic takes the decompressed data from the DUT and compares it with the data present in the block memory. The self-checking logic in the control logic block flags the Data Mismatch error port coming from the example design.

Figure 1. Block Diagram of the Example Design in Compression Mode

Decompression Mode

The example design in Decompression Mode has two sets of block memories, one to store the compressed data and the other to store the decompressed data. Once the reset is released for the example design, the control logic sends the compressed data on the AXI4-Stream interface to the DUT. The control logic takes the decompressed data from the DUT and compares it with the data present in the block memory. The self-checking logic in the control logic block flags the Data Mismatch error port coming from the example design.

Figure 2. Block Diagram of the Image in Decompression Mode

The block memories are filled with the required data using the MEM files. The MEM files corresponding to a sample compressed and a decompressed file are given along with the example design. There are different MEM files for different configurations of the core. For example, there is one MEM file for a 128-bit Input Data Width configuration and another for a 256-bit Input Data Width configuration.

Using the parameters in the example design top file, a custom file can also be given in the form of MEM files. In the example design, <component_name>_exdes.v is the top file. Compressed size and decompressed size for the custom file can be modified using the COMP_SIZE and DECOMP_SIZE parameters present in the example design top file. The custom compressed data and decompressed data MEM files can be put in the COMP_MEM and DECOMP_MEM parameters present in the example design top file.

The format of a MEM file compared to the hexdump of the file should look like the following figure.

Note: The number of bytes present in each line of the MEM file should depend on the data width of the AXI4-Streams used in the design. For example, if the core is generated with an input data width of 128-bit, each line in the MEM file for the compressed data should contain 16 bytes. If the Output Data Width for the core is fixed to 256-bit, each line in the MEM file for the decompressed data should contain 32 bytes of data.
Figure 3. Format Difference between MEM file and Hexdump of Some Data