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.
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.
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.