diff documents/AudioProcessing.lyx @ 0:6d1ff93e3afa pygar svn.1

[svn r1] This is the current draft of out project
author rlm
date Tue, 13 Apr 2010 15:08:30 -0400
parents
children
line wrap: on
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/documents/AudioProcessing.lyx	Tue Apr 13 15:08:30 2010 -0400
     1.3 @@ -0,0 +1,160 @@
     1.4 +#LyX 1.6.4 created this file. For more info see http://www.lyx.org/
     1.5 +\lyxformat 345
     1.6 +\begin_document
     1.7 +\begin_header
     1.8 +\textclass article
     1.9 +\use_default_options true
    1.10 +\language english
    1.11 +\inputencoding auto
    1.12 +\font_roman default
    1.13 +\font_sans default
    1.14 +\font_typewriter default
    1.15 +\font_default_family default
    1.16 +\font_sc false
    1.17 +\font_osf false
    1.18 +\font_sf_scale 100
    1.19 +\font_tt_scale 100
    1.20 +
    1.21 +\graphics default
    1.22 +\paperfontsize default
    1.23 +\use_hyperref false
    1.24 +\papersize default
    1.25 +\use_geometry false
    1.26 +\use_amsmath 1
    1.27 +\use_esint 1
    1.28 +\cite_engine basic
    1.29 +\use_bibtopic false
    1.30 +\paperorientation portrait
    1.31 +\secnumdepth 3
    1.32 +\tocdepth 3
    1.33 +\paragraph_separation indent
    1.34 +\defskip medskip
    1.35 +\quotes_language english
    1.36 +\papercolumns 1
    1.37 +\papersides 1
    1.38 +\paperpagestyle default
    1.39 +\tracking_changes false
    1.40 +\output_changes false
    1.41 +\author "" 
    1.42 +\end_header
    1.43 +
    1.44 +\begin_body
    1.45 +
    1.46 +\begin_layout Title
    1.47 +Multi-Voice Audio Playback
    1.48 +\end_layout
    1.49 +
    1.50 +\begin_layout Author
    1.51 +Laurel Pardue, Robert McIntyre
    1.52 +\end_layout
    1.53 +
    1.54 +\begin_layout Section*
    1.55 +Micro-Architecture
    1.56 +\end_layout
    1.57 +
    1.58 +\begin_layout Subsection*
    1.59 +A quick summary of our system
    1.60 +\end_layout
    1.61 +
    1.62 +\begin_layout Standard
    1.63 +The audio data (
    1.64 +\begin_inset Quotes eld
    1.65 +\end_inset
    1.66 +
    1.67 +samples
    1.68 +\begin_inset Quotes erd
    1.69 +\end_inset
    1.70 +
    1.71 +) start in the memory, but are soon pulled into action by the DMA (direct
    1.72 + memory access).
    1.73 + The DMA sends the samples to a chain of 0 or more 
    1.74 +\emph on
    1.75 +soft-cores
    1.76 +\emph default
    1.77 +, where they are transformed according to the soft-cores' algorithms.
    1.78 + After running the gauntlet of soft-cores, the samples flow first to a buffering
    1.79 + FIFO, and finally to a 
    1.80 +\emph on
    1.81 +mixer
    1.82 +\emph default
    1.83 +, which sends the samples off to be played by speakers of stored in a file.
    1.84 +\end_layout
    1.85 +
    1.86 +\begin_layout Subsection*
    1.87 +A more detailed look a our system
    1.88 +\end_layout
    1.89 +
    1.90 +\begin_layout Standard
    1.91 +Our audio pipeline starts its life with whatever music we want to play already
    1.92 + in memory.
    1.93 + The music has multiple tracks, or 
    1.94 +\begin_inset Quotes eld
    1.95 +\end_inset
    1.96 +
    1.97 +voices,
    1.98 +\begin_inset Quotes erd
    1.99 +\end_inset
   1.100 +
   1.101 + which we arrange on the memory in contiguous sequences.
   1.102 + Therefore, each voice starts at its own start-address, and continues on
   1.103 + for as long as it needs.
   1.104 + We cap each voice with an end-of-file marker.
   1.105 + We make every voice the same length to simplify timing issues, even though
   1.106 + that might mean that there is a lot of wasted space in the form of dead
   1.107 + areas with no sound.
   1.108 +\end_layout
   1.109 +
   1.110 +\begin_layout Standard
   1.111 +When the processing starts, the DMA reads in each voice and sends the audio
   1.112 + data (
   1.113 +\begin_inset Quotes eld
   1.114 +\end_inset
   1.115 +
   1.116 +samples
   1.117 +\begin_inset Quotes erd
   1.118 +\end_inset
   1.119 +
   1.120 +) off to a chain of soft-cores.
   1.121 + The DMA knows to which chain the samples should be forwarded by looking
   1.122 + up the samples' voice in a hash table read at startup.
   1.123 + Once the samples enter the soft-core chain, the first soft-core in line
   1.124 + takes the samples and performs some sort of audio operation, producing
   1.125 + modified audio samples.
   1.126 + These samples feed into the next soft-core which performs a different algorithm.
   1.127 + As condition for functional correctness, we require the algorithm that
   1.128 + each soft-core contains to be able to produce audio samples at the desired
   1.129 + 44khz rate, but we allow an arbitrary setup time for the soft-core to get
   1.130 + ready.
   1.131 + That way, a pipelined processor can take its time and fill up its pipeline
   1.132 + completely with no worries.
   1.133 + Once the soft-core starts producing samples, it must produce them at a
   1.134 + rate of at least 44khz forever.
   1.135 + If every soft-core in the chain obeys this timing condition, then the whole
   1.136 + chain will as well, so the entire chain of soft-cores can be treated as
   1.137 + a single big soft-core for timing purposes.
   1.138 + Our soft-cores are just Lab 5 processors preloaded with specific audio
   1.139 + processing algorithms.
   1.140 +\end_layout
   1.141 +
   1.142 +\begin_layout Standard
   1.143 +Eventually, the samples make their way to the end of the chain of soft-cores.
   1.144 + Every chain of soft-cores ends in a FIFO.
   1.145 + For this project, we will have 12 separate voices.
   1.146 + Therefore, there will be 12 soft-core chains, each with a FIFO at its end,
   1.147 + one for each voice.
   1.148 + Each of the 12 FIFOs leads to the mixer, which only begins operation once
   1.149 + all 12 FIFOs are full.
   1.150 + Because of the timing constraints we impose on our soft-cores, once every
   1.151 + FIFO has at least one sample, all 12 will forever more be able to supply
   1.152 + samples at 44khz.
   1.153 + The mixer therefore waits until all 12 FIFOs have elements and then reads
   1.154 + samples from all FIFOS at a rate of 44khz.
   1.155 + The mixer combines the samples through simple addition and scaling, creating
   1.156 + a single stream of sample data, which is sent back from the FPGA to the
   1.157 + host computer where we play the stream and/or save it to a file.
   1.158 + The mixer ensures that it outputs samples at a rate of 44khz by running
   1.159 + everything through its own internal buffer FIFO clocked at 44khz.
   1.160 +\end_layout
   1.161 +
   1.162 +\end_body
   1.163 +\end_document