######################
# README
######################


The GRSCRUB uses a customized solution for computing CRC32 codes, which might not match with other CRC32 calculators.

Additionally, the codes are generated based on the FPGA mask data as well.

One should use the Golden CRC mode in GRSCRUB for the codes generation. This Python3 script can be used if one cannot use the GRSCRUB's Golden CRC mode.

The grscrub_crc32_main.py is the main file. In this file there is a description on how to use it.

Usage:

    python3 grscrub_crc32_main.py -f <files_format> <bit_file> <mask_file>

    <files_format>: txt - the input files are in text with hexa words  
                          (format 0x00000000), a 32-bit word per line.
                    bin/bit - the input files are binary (.bin, .bit, .msk)
    <bit_file>: bitstream file 
                if txt format: one word per line (format 0x00000000).
                if binary format: original bitstream file without modification.
    <mask_file>: mask file
                if txt format: one word per line (format 0x00000000).
                if binary format: original mask file without modification.
    Note that the bitstream and mask file must be synchronized and with  
    header (as provided by the synthesis tool).

The output file with the CRC32 codes is grscrub_crc32_codes.txt. This data should be saved to the Golden memory that GRSCRUB will access.
