User Tools

Site Tools


2014:fpga_guitar

This is an old revision of the document!


Abstract

For our final project in Computer Architecture we decided to build an FPGA Guitar. We used 8 switches on the FPGA, and defined the first seven as notes, each one corresponding to different frequencies, and the eighth button being the “strum” button, that triggers the corresponding notes one want to play. The frequencies varied from approximately 200Hz to 440Hz (note “A”).

Manual Guitar

We created a controlSignalGen() module that determined the control signals generated. We followed a one-hot-encoding pattern, where the inputControl switches are 7-bit numbers that is given by the orientation of the swithces. This 7 bit number determined the 3-bit ControlSignal which is inputted to the frequency Generator. The frequency generator takes in the 3 bit ControlSignal and matches up the one of the notes (A, B, C, D, E, F, G)that the switches corresponds to. In order to create the frequency for A (440Hz) from the FPGA clock cycle, we can use a counter to count a certain clock cycle to create our desired frequency. For the note A, the counter will equal 50000000/440/2. We define a variable called clkDivider that counts the number of positive edges for which the amplitude of the new signal will remain high. Therefore, we create the desired frequency signals of the notes we want to play, depending on what the ControlSignals say.

Song Generator Guns and Roses!!

We have two different modes on the FPGA guitar. One mode for manually changing the note and strumming, and another for playing a preset song. We decided to make a finite state machine for the intro of Guns and Roses Oh Sweet Child of Mine. We created a separate frequency generator that took in clkDivider an input and produced the correct frequency for the output. We created this module we wanted the frequency generator to be dynamic instead of only being able to produce 7 different sounds depending on what the ContorlSignals say.

2014/fpga_guitar.1418715702.txt.gz · Last modified: 2014/12/16 02:41 by flymperopoulos