• 沒有找到結果。

里德所羅門碼 里德所羅門碼 里德所羅門碼 里德所羅門碼於 於 於 於 Labview FPGA 設計之附件 設計之附件 設計之附件 設計之附件

4.3 里德所羅門解碼設計與實作 里德所羅門解碼設計與實作 里德所羅門解碼設計與實作 里德所羅門解碼設計與實作

4.3.6 里德所羅門碼 里德所羅門碼 里德所羅門碼 里德所羅門碼於 於 於 於 Labview FPGA 設計之附件 設計之附件 設計之附件 設計之附件

1. Encoder

i. The system diagram of Encoder (RS Encoder)

ii. Encoder IP specification

Implements Reed Solomon code (255, 239) on GF(28)

Code word length (n)= 255 symbols

Data word length (k)= 239 s

ymbols

Field generator polynomial p(x) =

x8+ x4+ x3+ x2+ 1

Code generator polynomial g(x) = (x +

a0) (x + a1) (x + a2)…(x + a15)

 Supports code shortening

Maximum clock rate = 90.26 MHz

Onboard Maximum clock rate = 281.29 MHz Supports data rates up to maximum clock rate

Device utilization summary :

Number of RAMB16s 0 out of 244 0%

Number of SLICEs 517 out of 14720 3.5%

iii. The detail Encoder IP Core description 1. Hierarchy

2. Detail description

A. Data type (Input / Output)

setting : 設定 RS 編碼器定義的 n 值與 k 值。

Symbol in : 資料輸入接腳,可視為 8 bits 的位元。

input valid : 由輸入端控制輸入是否為有效的位元,True 即為有效,

反之無效。

ready for output : 用來控制輸出端是否繼續輸出或暫停,True 即為繼

續輸出,反之則暫停。

Reset : 當每次使用這支 vi 時必須先重置,意即若在迴圈中使用,第 一次迴圈需設為 True,第二圈及之後保持 False。

Symbol out : 資料輸出接腳,可視為 8 bits 的位元。

output valid : 若為 True 則表示目前輸出為有效位元,反之則無效。

ready for input : 用來控制輸入端是否可以繼續輸入或暫停,True 即為 繼續輸入,反之則暫停。

此元件為長除法,用於 encode 中的 mod 運算 input array : 輸入要與 generator 相除取餘數的陣列

index in : 輸入 input array 有效值的起始位置 例: 001011 起始位置為 3

feedback array : 輸出與 generator 相除一次的餘式,顯示值為 α 的次 方,用於長除法遞回運算

Encode array : 輸出與 generator 相除一次的餘式,顯示值即為數值,

當做完長除法其值即為 parity bits

NumericOut : 於長除法後,輸出下一次遞回運算的有效值起始位置

此元件為計算 array 的有效值起始位置 Array : 輸入要計算的陣列

IndexIn : 輸入目前 Array 所保持的有效值起始位置

NumericOut : 輸出經計算後此 Array 新的有效值起始位置

此元件用來判斷是否偵測到有效位元

ContinuedIn : 輸入若為 True 則表示還未偵測到有效位元,反之則已 找到 (註: 起始判斷需預設為 True)

x : 輸入需要判斷的位元 (1 or 0)

NumericIn : 輸入目前所保持的有效起始位置值

ContinuedOut : 輸出若為 True 則表示還未偵測到有效位元,反之則已 找到

NumericOut : 輸出經計算後新的有效值起始位置 (無效加 1,有效加 0)

B. Pseudo code

2. Decoder

i. The system diagram of Decoder (RS Decoder)

ii. Decoder IP specification

Implements Reed Solomon code (255, 239) on GF(28)

Code word length (n)= 255 symbols

Data word length (k)= 239 symbols

Field generator polynomial p(x) =

x8+ x4+ x3+ x2+ 1

Code generator polynomial g(x) = (x +

a0) (x + a1) (x + a2)…(x + a15)

Supports code shortening

Maximum clock rate = 94.79 MHz

Onboard Maximum clock rate = 292.40 MHz Supports data rates up to maximum clock rate Device utilization summary :

Number of RAMB16s 0 out of 244 0.0%

Number of SLICEs 563 out of 14720 3.8%

iii. The detail Decoder IP Core description 1. Hierarchy

2. Detail description

A. Data type (Input / Output)

(n, k) setting : 設定 RS 編碼器定義的 n 值與 k 值。

symbol in : 資料輸入接腳,可視為 8 bits 的位元。

input valid : 由輸入端控制輸入是否為有效的位元,True 即為有效,

反之無效。

ready for output : 用來控制輸出端是否繼續輸出或暫停,True 即為繼 續輸出,反之則暫停。

Reset : 當每次使用這支 vi 時必須先重置,意即若在迴圈中使用,第

一次迴圈需設為 True,第二圈及之後保持 False。

Symbol out : 資料輸出接腳,可視為 8 bits 的位元。

output valid : 若為 True 則表示目前輸出為有效位元,反之則無效。

ready for input : 用來控制輸入端是否可以繼續輸入或暫停,True 即為 繼續輸入,反之則暫停。

此元件用於計算 syndrome

generator start α : 設定 generator start root

symbol in : 資料輸入接腳,可視為 8 bits 的位元。

syndrome Array : 每輸入一個 symbol 時,由 syndrome array out 拿取資 料當輸入,預設值為 16 個 255 值得陣列。

syndrome array out : 每輸入一個 symbol 時,給 syndrome array 值,當 收完最後一個 symbol 時,為正確的 syndrome 陣 列。

此元件用於計算 ∆k,位於 BMA. VI 內部

k in : 疊代計算的 k 值。

syndrome array : 將 syndrome. vi 的結果輸入。

Λ(0) Array : 將 BMA 輸出的 Λ(0) Array 輸入,預設值為 8 個 255 值 得陣列。

k : 輸出 k 值的結果。

此元件用於 BMA 計算,需疊代 k 次(parity 數目) syndrome Array : 將計算好的 syndrome array 由此輸入

Λ(0) Array in : 預設輸入為[255,255,255,255,255,255,255,255]陣列,需與Λ (0) Array out 相接,最後一次的疊代輸出為結果

L in : 用於內部控制數值更新與否,需與 L out 相接進行疊代

K in : 用於計算疊代次數,起始為 1

T Array in : 預設輸入為[0,255,255,255,255,255,255,255]陣列,需與 T Array out 相接,最後一次的疊代輸出為結果

Λ(0) Array out : 需與Λ(0) Array in 相接,用於疊代更新

L out : 需與 L in 相接,用於內部控制數值更新與否

T array out : 需與 T Array in 相接,用於疊代更新

此元件用於找尋 symbol 的錯誤位置 Λ(x) Array in : 由 BMA 計算的結果輸入此接腳

location : 輸入目前需要判斷的位置(0 ~ -255),預設為 0,需與 location out 相接

x = 0? : 若輸出為 True 則表示目前輸入的位置為錯誤,False 則表示正確

location out : 將 location 輸入的值減 1 輸出,用於計算下一次的錯誤位置

此元件用於計算在錯誤位置上需要修正的錯誤值 Λ(x) : 由 BMA 計算的結果輸入此接腳

S (x) : 由 syndrome 計算的結果輸入此接腳

error location input : 將 chien’s search 計算結果為 0 的 location 於此輸入

E(X) output : 計算輸入的 location 需要修正的 error magnitude

此元件用於 Forney Algorithm 內,計算 S (x)、Λ(x)相乘之結果

S (x) in : 由 syndrome 計算的結果輸入此接腳

Λ(x) in : 由 BMA 計算的結果輸入此接腳

S(x)‧Λ(x) output : 計算 S (x)、Λ(x)相乘之結果

此元件用於計算αi‧αi的結果是否超過α255

x : 用於計算 GF(2m)中αi相乘的結果是否超過α255,若超過則進行修正

out : 將修正過後的αi輸出

此元件用於 error location 計算錯誤位置αi當中的 i 值是否小於 0

Numeric : 用於計算 error location 中所代入的αi相乘的結果是否為α-i,若 小於 0 則進行修正

s? t:f : 將修正過後的αi輸出 B. Pseudo code