This project involves the Nexys4DDR, which processes data from a built-in microphone using Pulse Density Modulation (PDM). It includes digital filtering for decimation and resolution enhancement, as well as audio data reverberation. Additionally, it performs Fast Fourier Transform (FFT) computations over the Ethernet interface using the 100-base-T standard. The packets are captured on the host machine using RAW_SOCKETS
and processed using various signal processing algorithms.
- PDM microphone
- 10/100 Ethernet PHY
The Nexys4DDR acquires PDM data from the built-in microphone, applies digital filtering for decimation and resolution (16-bit, 48KSPS), and subsequently adds audio reverberation before outputting it through the built-in Audio Out interface. Following this, the machine computes the Fast Fourier Transform (FFT) of the time-domain signal and transmits it over the Ethernet. On the host side, we capture the packets using RAW_SOCKETS
and display the real-time Fourier spectrum or play back the recorded audio signal.
- Nexys 4 DDR FPGA board
- Micro-USB cable
- Ethernet cable
- Vivado Design Suite 2021.1+ (Procedure may vary with other versions)
- Python (latest version)
- Wireshark
-
Clone the Repository
git clone https://github.com/the-pinbo/ddfpga-project.git
-
Generate the Project
- Open Vivado.
- Click
Run Tcl Script
in the tools window. - Navigate to
ddfpga-project/project
and selectefsm.tcl
. - Upgrade IPs if necessary via
Reports > Report IP Status
. - Note: Change MAC address before generating the bitstream.
- Linux: Use
ifconfig -a
in terminal. - Windows: Use
ipconfig /all
in Command Prompt.
- Linux: Use
-
Build the Project
-
Program the Board
-
Capture Packets
- Connect Ethernet from FPGA to computer.
- Use Wireshark for packet analysis.
- Save packets as
.pcap
for processing.
-
Setting Up a Virtual Environment
-
Linux
python3 -m venv venv source venv/bin/activate pip install -r requirements.txt
-
Windows
python -m venv venv .\venv\Scripts\activate pip install -r requirements.txt
-
-
Packet Defragmentation and Audio Generation
This process involves defragmenting packets and performing signal processing to generate an audio file from the captured data.
- Generating Audio Using Wireshark Analysis Run python\wireshark_analysis.ipynb to analyze the data and generate an audio file in .wav format.
- Generating Audio Directly (Linux Only)
Note: This method requires sudo access.
- Open
python\receive_wav.py
and configure the Ethernet interface and destination MAC address. - Run the
receive_wav.py
file.
- Open
-
Play Back Audio
- Enjoy the processed voice through the microphone.
For detailed implementation, see Implementation Details.