1. 程式人生 > >【 FPGA 】FIR 濾波器之濾波器的係數資料(Filter Coefficient Data)

【 FPGA 】FIR 濾波器之濾波器的係數資料(Filter Coefficient Data)

Filter Coefficient Data

濾波器係數使用副檔名為.coe的係數檔案提供給FIR編譯器。 這是一個ASCII文字檔案,帶有單行標題,用於定義用於係數資料的數字表示的基數,後跟係數值本身。 對於N抽頭濾波器,如圖3-36所示。

濾波器係數可以以整數的形式提供,可以是基-10、基-16或基-2表示。係數為10,係數為16,係數為2。這句話的英文原版更好:

The filter coefficients can be supplied as integers in either base-10, base-16, or base-2 representation. This corresponds to coefficient_radix=10, coefficient_radix=16, and coefficient_radix=2 respectively. 

覺得原滋原味的英文也挺美。

係數值也可以放在一行上,如圖3-37所示。

If you enter signed negative symmetric hexadecimal coefficients, each value should be sign-extended to the boundary of the most significant nibble or hex character. This ensures that coefficient structure inference can be performed correctly (this includes Hilbert transform filter types, which are also negative symmetric).

下面還有一段話,不是很理解,大家一起參考:

Alternatively, the coefficients can be entered as real numbers (specified to a minimum of one decimal place) in base-10 only. If you enter signed negative symmetric hexadecimal coefficients, each value should be sign-extended to the boundary of the most significant nibble or hex character. This ensures that coefficient structure inference can be performed correctly (this includes Hilbert transform filter types, which are also negative symmetric).

或者,係數可以僅作為基數10的實數(指定為最小一位小數)輸入。 如果輸入有符號的負對稱十六進位制係數,則應將每個值符號擴充套件到最高有效半位元組或十六進位制字元的邊界。 這確保了可以正確地執行係數結構推斷(這包括希爾伯特變換濾波器型別,其也是負對稱的)。

下篇博文預告:

分別介紹下面這些濾波器的係數資料問題