I built a digital voice recorder as the final project in ENGS 31, Digital
Electronics at Dartmouth. This class taught the basics of digital design, as
well as how to program FPGAs (field programmable gate arrays) using VHDL. For
the final project, we worked in pairs to develop a device that used an FPGA to
accomplish a task.
We chose to design a voice recorder that allows a user to record themselves
using an onboard microphone and then play the recording back. The recording is
saved to an SD card.
We broke the design down into a number of subsystems, each of which is largely
independent and contains its own state machine. The project was developed in
stages, initially only storing the recorded audio in RAM, and then adding SD
The core of the system is the audio
controller, which is responsible for reading samples from the A/D convertor
connected to the microphone, and writing to the D/A convertor connected to the
speaker. Both of these peripherals communicate over SPI. Samples are written
and read to a dual port RAM block used as a circular buffer. The SD card
controller also reads or writes into the RAM, depending on whether recording or
playback is occurring. The SD card controller uses SPI rather than the native SD
protocol, because it is simpler and fast enough for the purposes of the project.
The SD controller is implemented entirely in VHDL without any kind of soft
processor. The controller supports plain SD cards, as well as SDHC and SDXC
The system is capable of recording many hours of 44.1 KHz audio at 16 bit
resolution (although the A/D and D/A convertors used are only 12 bit). We also
wrote a Python program that makes it possible to write audio to the SD card to
be played back by the recorder.
More detailed design information and the VHDL code for this project can be
found in the project report.