The project aims to make DE1-SoC board a music player, which can play music from an SD card using the onboard WM8731 chip.
For more detailed information, check FPGA 开发笔记:DE1-SoC 音乐播放器的实现 - Nativus' Space (naiv.fun)(in Chinese | 中文文档).
Tested on the following platform/software:
- Quartus Prime 18.0 on Windows 10
- Intel SoC FPGA Embedded Development Suite Standard 18.0 on Windows 10
- Ubuntu 14.04 LTS for DE1-SoC provided by Terasic's website
- FFmpeg
Before you give these codes a try, make sure you have the operating system and all the software installed correctly. Besides, please refer to DE1-SoC User Manual for setting up board to run Linux.
To build sof file:
- Open the
soc_system.qpf
with Quartus. - Click
Compile Design
to build sof file. - Use Programmer in Quartus to program the FPGA.
Note: if any change is made to Qsys design, the C header file must be regenerated. The software should also be re-compiled with the newly generated header so that it can work properly.
The hardware part only establishes a base to play sounds with DE1-SoC, and the software is here to process the music data and configure the SoC to play correctly.
To build and run the software:
- Open the SoC EDS Command Shell.
- Change directory to the
software
folder, for example,cd ~/DE1-SoC-MyPlayer/software
. - Type
make clean
to remove files generated by earlier builds, then typemake
. - If the building is successful, you can find
MyPlayer
binary file in the folder. Download it to the board. - Use
chmod +x ./MyPlayer
on board to give the binary permission to execute. - Type
./Myplayer filename
to run the program.filename
should be replaced with your own music filename.
These codes still contain minor unresolved bugs, such as having noise when playing some music with a specific frequency.
Cited resources:
- Terasic VIP Demo:Terasic - DE Boards - Cyclone - DE1-SoC Board
- bsteinsbo/DE1-SoC-Sound (github.com)
- ffxx283/WM8731_Audio: FPGA Control WM8731 Audio codec (github.com)
And special thanks to my two workmates on this project.