This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

LP-AM263P: Doubts in sdl/mcrc .c files

Part Number: LP-AM263P

Tool/software:

Hi Team,

In the API guide, the information regarding parameters used in the header (.h) files is available. However, there is no corresponding documentation explaining the intent and usage of certain parameters within the source (.c) files.

In order to derive the final input parameters to the APIs, we need to understand the intent of intermediate parameters as well. It would be helpful if flowcharts or pseudo-code were provided for these .c files to explain the logic and parameter flow.

I'm listing a few parameter-related doubts based on the example project located at:
mcu_plus_sdk_am263px_10_01_00_34/examples/sdl/mcrc/full_cpu_mode

  1. What is the difference between pattern size, sector size, and pattern count? How are these values affected by the selected CRC polynomial type?




2. How the value of dataBitSie of SDL_MCRC_Config_s structure should be considered based on the selection of crc polynomial type and input data length.

3. In the code (mcu_plus_sdk_am263px_10_01_00_34/examples/sdl/mcrc/full_cpu_mode), it is unclear why 4 bytes are grouped into 1 word? Does this logic vary depending on the CRC data length selection, CRC polynomial type, or pattern size?


  • Hi Sravya,

    What is the difference between pattern size, sector size, and pattern count? How are these values affected by the selected CRC polynomial type?

    Pattern Count: The number of data patterns in one sector to be compressed before a CRC is performed.

    Sector size: The number of sectors in one block of memory.

    Pattern Size: Each pattern size will be defined here.

    This means, the block of memory which you want to do CRC compression can be divided into several sectors. And each sector with some patterns, so that you can generate the CRC for each sector. 

    And this pattern count, and sector size will only be helpful in semi-CPU and Auto modes only. In full CPU mode the CPU will manually write the frame by frame to generate the CRC right, so in this case we don't need to configure the sector count and pattern counts, instead of we can just configure 0 pattern count and 1 sector only. However, these parameters will play key role in the Semi CPU mode or Auto modes, because here CPU just need to do initial configurations and rest of the things should perform automatically.

     For example, assume that i have 1 sector of data with 100 pattern count is there for CRC compression, now in semi-CPU mode the CPU will configure this sector, and pattern counts to their respective registers, and CPU will also configure these parameters to the DMA to automate the signature generation process. So once DMA configured, CPU enable the DMA and go for other tasks, and then after DMA will write frame by frame to the signature compression registers and once all the configured patterns completed then an interrupt will get generated to the CPU. After this interrupt CPU can compare the generated CRC with reference CRC. In Auto mode this verification will also happen automatically, there is no CPU involvement needed. 

    For more details refer the available examples once.

    2. How the value of dataBitSie of SDL_MCRC_Config_s structure should be considered based on the selection of crc polynomial type and input data length.

    You need to select this dataBitSize value based on the input data length only.

    I mean as mentioned here:

    Based on your input data size, you need to choose appropriate enum value. For example, if you want to do the data compression for 64-bit data size at a time then you need to choose SDL_MCRC_DATA_64_BIT and so on.

    3. In the code (mcu_plus_sdk_am263px_10_01_00_34/examples/sdl/mcrc/full_cpu_mode), it is unclear why 4 bytes are grouped into 1 word? Does this logic vary depending on the CRC data length selection, CRC polynomial type, or pattern size?

    No, this logic doesn't depend on data length selection, CRC polynomial type or pattern size.

    Here they just took input data independently which is 32-bit size of each frame, and this same data used for all the use cases like 64-bit, 32-bit and 16-bit.

    You will get more clear understanding if you refer below FAQ that i recently created, how this same input data is used in different use cases in detailed:

    (25) [FAQ] AM2634: AM263X: MCRC generation procedure using external tool - Arm-based microcontrollers forum - Arm-based microcontrollers - TI E2E support forums

    --
    Thanks & regards,
    Jagadish.