https://github.com/samiyaalizaidi/fir-filter
Implementation of a low-pass FIR filter in Verilog HDL.
https://github.com/samiyaalizaidi/fir-filter
digital-signal-processing digital-system-design digital-systems-design fir-filters low-pass-filters matlab verilog-hdl
Last synced: 3 months ago
JSON representation
Implementation of a low-pass FIR filter in Verilog HDL.
- Host: GitHub
- URL: https://github.com/samiyaalizaidi/fir-filter
- Owner: samiyaalizaidi
- License: bsd-2-clause
- Created: 2024-03-01T09:27:19.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-04-12T15:41:38.000Z (about 1 year ago)
- Last Synced: 2025-01-16T16:41:45.633Z (5 months ago)
- Topics: digital-signal-processing, digital-system-design, digital-systems-design, fir-filters, low-pass-filters, matlab, verilog-hdl
- Language: Verilog
- Homepage:
- Size: 249 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Low-Pass FIR Filter
Designing a system that acts as a low-pass filter in Verilog.
## Tools Used
- Filter Design & Analysis Tool (``FDATool``) in ``MATLAB 2023a``.
- ``Xilinx Vivado v2020.1`` for designing and synthesizing the system.## Code
### Designing the Low-Pass Filter
To obtain the filter coefficients, MATLAB's FDATool was used. These were the design parameters:
![]()
Along with this, I applied some other preprocessing steps before using these values;
1. Replace all negative values with zeros.
2. Scale all numbers by a factor of ``255``. This number was chosen because all coefficients had to be represented in 8 bits according to the specifications
3. Round all numbers to the nearest integer.
### Convolution
To apply the filter, the input signal was simply shifted after every multiplication and accumulation operation.## Input Signals & Results
The input signals for this task were obtained from the output of a [Direct Digital Synthesizer](https://github.com/samiyaalizaidi/Direct-Digital-Synthesizer).The input signals along with their filtered output are shown below. According to the parameters, all frequencies below 50KHz should be allowed to pass, and all frequencies above 110Khz should be completely blocked.
For 10KHz:
![]()
For 40Khz:
![]()
For 125Khz:
![]()
For 250Khz:
![]()
---
**Contributions**: All of the code in this repository is written by [Samiya Ali Zaidi](https://github.com/samiyaalizaidi).