Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:compute_error_locator_polynomial

Proto:static int compute_error_locator_polynomial(struct bch_control *bch, const unsigned int *syn)

Type:int

Parameter:

TypeParameterName
struct bch_control *bch
const unsigned int *syn
389  t = GF_T(bch)
390  n = GF_N(bch)
391  pd = 1 , d = syn[0]
392  elp = elp
393  pelp = poly_2t[0]
394  elp_copy = poly_2t[1]
395  pp = -1
397  memset(pelp, 0, given its degree, compute a polynomial size in bytes (2 * t))
398  memset(elp, 0, given its degree, compute a polynomial size in bytes (2 * t))
400  polynomial degree = 0
401  polynomial terms [0] = 1
402  polynomial degree = 0
403  polynomial terms [0] = 1
406  When i < t && polynomial degree <= t cycle
407  If d Then
408  k = 2 * i - pp
411  tmp = a_log(bch, d) + n - a_log(bch, pd)
412  When j <= polynomial degree cycle
413  If polynomial terms [j] Then
415  polynomial terms [j + k] ^= a_pow(bch, tmp + l)
420  If tmp > polynomial degree Then
423  pd = d
424  pp = 2 * i
428  If i < t - 1 Then
429  d = syn[2 * i + 2]
434  dbg("elp=%s\n", gf_poly_str(elp))
435  Return If polynomial degree > t Then -1 Else polynomial degree
Caller
NameDescribe
decode_bchdecode_bch - decode received codeword and find bit error locations*@bch: BCH control structure*@data: received data, ignored if @calc_ecc is provided*@len: data length in bytes, must always be provided*@recv_ecc: received ecc, if NULL then assume it was