Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\bch.c Create Date:2022-07-28 07:00:00
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:mpute generator polynomial remainder tables for fast encoding

Proto:static void build_mod8_tables(struct bch_control *bch, const uint32_t *g)

Type:void

Parameter:

TypeParameterName
struct bch_control *bch
const uint32_t *g
1093  l = BCH_ECC_WORDS(bch)
1094  plen = DIV_ROUND_UP(ecc_bits + 1, 32)
1095  ecclen = DIV_ROUND_UP(ecc_bits, 32)
1097  memset(mod8_tab, 0, 4 * 256 * l * size of mod8_tab )
1099  When i < 256 cycle
1101  When b < 4 cycle
1103  tab = mod8_tab + ( b * 256 + i) * l
1104  data = i << 8 * b
1105  When data cycle
1106  d = deg(data)
1108  data ^= g[0] >> 31 - d
1109  When j < ecclen cycle
1110  hi = If d < 31 Then g[j] << d + 1 Else 0
1111  lo = If j + 1 < plen Then g[j + 1] >> 31 - d Else 0
1113  tab[j] ^= hi | lo
Caller
NameDescribe
init_bch_bch - initialize a BCH encoder/decoder*@m: Galois field order, should be in the range 5-15*@t: maximum error correction capability, in bits*@prim_poly: user-provided primitive polynomial (or 0 to use default)* Returns:* a newly allocated BCH control