# HG changeset patch # User rlm # Date 1271185710 14400 # Node ID 6d1ff93e3afab2d18b03ff9caa8d3f1abf5754f2 [svn r1] This is the current draft of out project diff -r 000000000000 -r 6d1ff93e3afa documents/000402.png Binary file documents/000402.png has changed diff -r 000000000000 -r 6d1ff93e3afa documents/AudioProcessing.lyx --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/documents/AudioProcessing.lyx Tue Apr 13 15:08:30 2010 -0400 @@ -0,0 +1,160 @@ +#LyX 1.6.4 created this file. For more info see http://www.lyx.org/ +\lyxformat 345 +\begin_document +\begin_header +\textclass article +\use_default_options true +\language english +\inputencoding auto +\font_roman default +\font_sans default +\font_typewriter default +\font_default_family default +\font_sc false +\font_osf false +\font_sf_scale 100 +\font_tt_scale 100 + +\graphics default +\paperfontsize default +\use_hyperref false +\papersize default +\use_geometry false +\use_amsmath 1 +\use_esint 1 +\cite_engine basic +\use_bibtopic false +\paperorientation portrait +\secnumdepth 3 +\tocdepth 3 +\paragraph_separation indent +\defskip medskip +\quotes_language english +\papercolumns 1 +\papersides 1 +\paperpagestyle default +\tracking_changes false +\output_changes false +\author "" +\end_header + +\begin_body + +\begin_layout Title +Multi-Voice Audio Playback +\end_layout + +\begin_layout Author +Laurel Pardue, Robert McIntyre +\end_layout + +\begin_layout Section* +Micro-Architecture +\end_layout + +\begin_layout Subsection* +A quick summary of our system +\end_layout + +\begin_layout Standard +The audio data ( +\begin_inset Quotes eld +\end_inset + +samples +\begin_inset Quotes erd +\end_inset + +) start in the memory, but are soon pulled into action by the DMA (direct + memory access). + The DMA sends the samples to a chain of 0 or more +\emph on +soft-cores +\emph default +, where they are transformed according to the soft-cores' algorithms. + After running the gauntlet of soft-cores, the samples flow first to a buffering + FIFO, and finally to a +\emph on +mixer +\emph default +, which sends the samples off to be played by speakers of stored in a file. +\end_layout + +\begin_layout Subsection* +A more detailed look a our system +\end_layout + +\begin_layout Standard +Our audio pipeline starts its life with whatever music we want to play already + in memory. + The music has multiple tracks, or +\begin_inset Quotes eld +\end_inset + +voices, +\begin_inset Quotes erd +\end_inset + + which we arrange on the memory in contiguous sequences. + Therefore, each voice starts at its own start-address, and continues on + for as long as it needs. + We cap each voice with an end-of-file marker. + We make every voice the same length to simplify timing issues, even though + that might mean that there is a lot of wasted space in the form of dead + areas with no sound. +\end_layout + +\begin_layout Standard +When the processing starts, the DMA reads in each voice and sends the audio + data ( +\begin_inset Quotes eld +\end_inset + +samples +\begin_inset Quotes erd +\end_inset + +) off to a chain of soft-cores. + The DMA knows to which chain the samples should be forwarded by looking + up the samples' voice in a hash table read at startup. + Once the samples enter the soft-core chain, the first soft-core in line + takes the samples and performs some sort of audio operation, producing + modified audio samples. + These samples feed into the next soft-core which performs a different algorithm. + As condition for functional correctness, we require the algorithm that + each soft-core contains to be able to produce audio samples at the desired + 44khz rate, but we allow an arbitrary setup time for the soft-core to get + ready. + That way, a pipelined processor can take its time and fill up its pipeline + completely with no worries. + Once the soft-core starts producing samples, it must produce them at a + rate of at least 44khz forever. + If every soft-core in the chain obeys this timing condition, then the whole + chain will as well, so the entire chain of soft-cores can be treated as + a single big soft-core for timing purposes. + Our soft-cores are just Lab 5 processors preloaded with specific audio + processing algorithms. +\end_layout + +\begin_layout Standard +Eventually, the samples make their way to the end of the chain of soft-cores. + Every chain of soft-cores ends in a FIFO. + For this project, we will have 12 separate voices. + Therefore, there will be 12 soft-core chains, each with a FIFO at its end, + one for each voice. + Each of the 12 FIFOs leads to the mixer, which only begins operation once + all 12 FIFOs are full. + Because of the timing constraints we impose on our soft-cores, once every + FIFO has at least one sample, all 12 will forever more be able to supply + samples at 44khz. + The mixer therefore waits until all 12 FIFOs have elements and then reads + samples from all FIFOS at a rate of 44khz. + The mixer combines the samples through simple addition and scaling, creating + a single stream of sample data, which is sent back from the FPGA to the + host computer where we play the stream and/or save it to a file. + The mixer ensures that it outputs samples at a rate of 44khz by running + everything through its own internal buffer FIFO clocked at 44khz. +\end_layout + +\end_body +\end_document diff -r 000000000000 -r 6d1ff93e3afa documents/AudioProcessing.pdf Binary file documents/AudioProcessing.pdf has changed