Chargement…
Chargement…
The module computes the discrete convolution of signed samples i_sample with a fixed 5-coefficient set (low-pass triangular window 1, 2, 4, 2, 1).
Required structure: direct form:
A new sample is consumed on each i_valid='1' pulse. Output o_sample is valid with o_valid='1' one cycle later. Synchronous active-high reset.
Generics:
g_DATA_WIDTH : positive (default 16) - signed sample widthg_COEF_WIDTH : positive (default 4) - signed coefficient widthg_OUT_WIDTH : positive (default 24) - signed output widthPorts:
| Signal | Direction | Width | Description |
|---|---|---|---|
i_clk | Input | 1 bit | System clock |
i_rst | Input | 1 bit | Synchronous active-high reset |
i_sample | Input | g_DATA_WIDTH | Signed input sample |
i_valid | Input | 1 bit | Validity pulse for i_sample |
o_sample | Output | g_OUT_WIDTH | Signed filtered output |
o_valid | Output | 1 bit | Validity pulse for o_sample |
The 5 coefficients are defined in the fir_coef_pkg package (read-only):
c_COEFS = (1, 2, 4, 2, 1)
This is a centred triangular window producing a low-pass FIR filter with DC gain = 10.