CRC

source

CRC(
   block_size: int = 40, type: SCHEMA = None, debug: Debug = Debug.DEPLOY
)

EDAC System to deal with data that needs CRC

Args

  • debug (Debug, optional) : Debug level. Defualts to Deploy.
  • kwargs (optional) : The keyword argument passed from EDAC Factory. Defualts to None. should contian key schema
  • schema (SCHEMA) : The schema of CRC you chose to use, defaults to CRC_8_ATM

Methods:

._decode

source

._decode(
   data: int
)

Decode the given data

Args

  • data (int) : the target data to decode

Returns

  • tuple : the results of the decode see more

._devide

source

._devide(
   data: int
)

Devide in GF() of given generator

Args

  • data (int) : the given data

Returns

  • int : the result

._encode

source

._encode(
   data: int
)

Encode the given data

Args

  • data (int) : the data in integer

Returns

  • int : the syndrome in interger